FIX- RTL text orientation in Messages, and LTR allways for CodeBlock
@@ -37,7 +37,7 @@
export let code = '';
export let attributes = {};
- export let className = 'my-2';
+ export let className = 'my-2 !text-left !direction-ltr';
export let editorClassName = '';
export let stickyButtonsClassName = 'top-0';
@@ -639,7 +639,12 @@
</Name>
<div>
- <div class="chat-{message.role} w-full min-w-full markdown-prose">
+ <div
+ class="chat-{message.role} w-full min-w-full markdown-prose {$settings.chatDirection ===
+ 'RTL'
+ ? 'text-right'
+ : ''}"
+ >
{#if (message?.statusHistory ?? [...(message?.status ? [message?.status] : [])]).length > 0}
{@const status = (
@@ -329,7 +329,7 @@
? `max-w-[90%] px-5 py-2 bg-gray-50 dark:bg-gray-850 ${
message.files ? 'rounded-tr-lg' : ''
}`
- : ' w-full'}"
+ : ' w-full'} {$settings.chatDirection === 'RTL' ? 'text-right' : ''}"
>
{#if message.content}
<Markdown id={`${chatId}-${message.id}`} content={message.content} {topPadding} />