diff --git a/apps/client/src/ee/ai-chat/components/chat-input.tsx b/apps/client/src/ee/ai-chat/components/chat-input.tsx index d0138187..d99479d0 100644 --- a/apps/client/src/ee/ai-chat/components/chat-input.tsx +++ b/apps/client/src/ee/ai-chat/components/chat-input.tsx @@ -255,6 +255,7 @@ export default function ChatInput({ }, content: "", editable: true, + textDirection: "auto", immediatelyRender: true, shouldRerenderOnTransaction: false, autofocus: autofocus ? "end" : false, diff --git a/apps/client/src/ee/template/components/readonly-template-editor.tsx b/apps/client/src/ee/template/components/readonly-template-editor.tsx index ca3c4b2c..6088cb86 100644 --- a/apps/client/src/ee/template/components/readonly-template-editor.tsx +++ b/apps/client/src/ee/template/components/readonly-template-editor.tsx @@ -41,6 +41,7 @@ export default function ReadonlyTemplateEditor({ diff --git a/apps/client/src/ee/template/pages/template-editor.tsx b/apps/client/src/ee/template/pages/template-editor.tsx index 7fadf05c..1c8810ce 100644 --- a/apps/client/src/ee/template/pages/template-editor.tsx +++ b/apps/client/src/ee/template/pages/template-editor.tsx @@ -87,6 +87,7 @@ export default function TemplateEditor() { const editor = useEditor({ extensions: templateExtensions, content: "", + textDirection: "auto", editorProps: { scrollThreshold: 80, scrollMargin: 80, diff --git a/apps/client/src/features/comment/components/comment-editor.tsx b/apps/client/src/features/comment/components/comment-editor.tsx index eeb0983a..520877c8 100644 --- a/apps/client/src/features/comment/components/comment-editor.tsx +++ b/apps/client/src/features/comment/components/comment-editor.tsx @@ -103,6 +103,7 @@ const CommentEditor = forwardRef( }, content: defaultContent, editable, + textDirection: "auto", immediatelyRender: true, shouldRerenderOnTransaction: false, autofocus: (autofocus && "end") || false, diff --git a/apps/client/src/features/editor/components/transclusion/transclusion-content.tsx b/apps/client/src/features/editor/components/transclusion/transclusion-content.tsx index 94629122..828c42bb 100644 --- a/apps/client/src/features/editor/components/transclusion/transclusion-content.tsx +++ b/apps/client/src/features/editor/components/transclusion/transclusion-content.tsx @@ -40,6 +40,7 @@ export default function TransclusionContent({ content }: Props) { diff --git a/apps/client/src/features/editor/page-editor.tsx b/apps/client/src/features/editor/page-editor.tsx index 7149e793..77233f34 100644 --- a/apps/client/src/features/editor/page-editor.tsx +++ b/apps/client/src/features/editor/page-editor.tsx @@ -249,6 +249,7 @@ function CollabPageEditor({ { extensions, editable, + textDirection: "auto", immediatelyRender: true, shouldRerenderOnTransaction: false, editorProps: { @@ -484,6 +485,7 @@ function StaticPageEditor({ @@ -93,6 +94,7 @@ export default function ReadonlyPageEditor({ { diff --git a/apps/client/src/features/editor/styles/table.css b/apps/client/src/features/editor/styles/table.css index 32a42793..7d9018a1 100644 --- a/apps/client/src/features/editor/styles/table.css +++ b/apps/client/src/features/editor/styles/table.css @@ -54,7 +54,7 @@ var(--mantine-color-dark-5) ); font-weight: bold; - text-align: left; + text-align: start; } .column-resize-handle { diff --git a/apps/client/src/features/editor/title-editor.tsx b/apps/client/src/features/editor/title-editor.tsx index 04317099..26925b15 100644 --- a/apps/client/src/features/editor/title-editor.tsx +++ b/apps/client/src/features/editor/title-editor.tsx @@ -86,6 +86,7 @@ export function TitleEditor({ }, editable: editable, content: title, + textDirection: "auto", immediatelyRender: true, shouldRerenderOnTransaction: false, editorProps: { diff --git a/apps/client/src/features/page-history/components/history-editor.tsx b/apps/client/src/features/page-history/components/history-editor.tsx index 3773f6bc..18a7dfda 100644 --- a/apps/client/src/features/page-history/components/history-editor.tsx +++ b/apps/client/src/features/page-history/components/history-editor.tsx @@ -31,6 +31,7 @@ export function HistoryEditor({ const editor = useEditor({ extensions: mainExtensions, editable: false, + textDirection: "auto", }); useEffect(() => { diff --git a/apps/server/src/collaboration/collaboration.util.ts b/apps/server/src/collaboration/collaboration.util.ts index 7ee5ba4a..ed182cf7 100644 --- a/apps/server/src/collaboration/collaboration.util.ts +++ b/apps/server/src/collaboration/collaboration.util.ts @@ -50,7 +50,12 @@ import { Footnote, FootnoteReference, } from '@docmost/editor-ext'; -import { generateText, getSchema, JSONContent } from '@tiptap/core'; +import { + extensions as coreExtensions, + generateText, + getSchema, + JSONContent, +} from '@tiptap/core'; import { generateHTML, generateJSON } from '../common/helpers/prosemirror/html'; // @tiptap/html library works best for generating prosemirror json state but not HTML // see: https://github.com/ueberdosis/tiptap/issues/5352 @@ -61,6 +66,7 @@ import * as Y from 'yjs'; import { Logger } from '@nestjs/common'; export const tiptapExtensions = [ + coreExtensions.TextDirection.configure({ direction: 'auto' }), StarterKit.configure({ document: false, codeBlock: false,