diff --git a/mobile/src/components/features/chat-input/tiptap.styles.css b/mobile/src/components/features/chat-input/tiptap.styles.css index 8d852e438..e68dec20f 100644 --- a/mobile/src/components/features/chat-input/tiptap.styles.css +++ b/mobile/src/components/features/chat-input/tiptap.styles.css @@ -1,4 +1,4 @@ -.tiptap p.is-editor-empty:first-child::before { +.tiptap-editor p.is-editor-empty:first-child::before { color: var(--gray-8); content: attr(data-placeholder); float: left; @@ -9,7 +9,7 @@ pointer-events: none; } -.tiptap.ProseMirror { +.tiptap-editor.ProseMirror { max-height: 240px; overflow: auto; } diff --git a/mobile/src/components/features/chat-space/chat-view/components/TiptapRenderer/TiptapRenderer.styles.css b/mobile/src/components/features/chat-space/chat-view/components/TiptapRenderer/TiptapRenderer.styles.css new file mode 100644 index 000000000..9395e22a1 --- /dev/null +++ b/mobile/src/components/features/chat-space/chat-view/components/TiptapRenderer/TiptapRenderer.styles.css @@ -0,0 +1,9 @@ +.tiptap-renderer blockquote { + border-left: 3px solid var(--gray-11); + padding-left: 0.8rem; + margin: 1rem; +} + +.tiptap-renderer a { + color: var(--accent-11); +} \ No newline at end of file diff --git a/mobile/src/components/features/chat-space/chat-view/components/TiptapRenderer/TiptapRenderer.tsx b/mobile/src/components/features/chat-space/chat-view/components/TiptapRenderer/TiptapRenderer.tsx index 83eef6843..2ce0cc2e8 100644 --- a/mobile/src/components/features/chat-space/chat-view/components/TiptapRenderer/TiptapRenderer.tsx +++ b/mobile/src/components/features/chat-space/chat-view/components/TiptapRenderer/TiptapRenderer.tsx @@ -19,6 +19,8 @@ import { CustomUnderline } from './Underline' import { Image } from '@tiptap/extension-image' import { clsx } from 'clsx' import Italic from '@tiptap/extension-italic'; +import './TiptapRenderer.styles.css' + const lowlight = createLowlight(common) lowlight.register('html', html) @@ -42,7 +44,7 @@ export const TiptapRenderer = ({ message, user, isScrolling = false, isTruncated editable: false, editorProps: { attributes: { - class: isTruncated ? 'line-clamp-3' : '' + class: isTruncated ? 'tiptap-renderer line-clamp-3' : 'tiptap-renderer ' } }, enableCoreExtensions: true, diff --git a/mobile/src/index.css b/mobile/src/index.css index e4c4abcbf..422507cf7 100644 --- a/mobile/src/index.css +++ b/mobile/src/index.css @@ -2,7 +2,15 @@ @tailwind components; @tailwind utilities; + @layer base { + + ul, + ol { + list-style: revert; + } + + :root { --background: 0 0% 100%; --foreground: 224 71.4% 4.1%; diff --git a/raven-app/src/components/feature/chat/ChatMessage/Renderers/TiptapRenderer/TiptapRenderer.tsx b/raven-app/src/components/feature/chat/ChatMessage/Renderers/TiptapRenderer/TiptapRenderer.tsx index 0008b1e31..d3463c791 100644 --- a/raven-app/src/components/feature/chat/ChatMessage/Renderers/TiptapRenderer/TiptapRenderer.tsx +++ b/raven-app/src/components/feature/chat/ChatMessage/Renderers/TiptapRenderer/TiptapRenderer.tsx @@ -54,6 +54,11 @@ export const TiptapRenderer = ({ message, user, isScrolling = false, isTruncated codeBlock: false, bold: false, italic: false, + orderedList: { + HTMLAttributes: { + class: 'list-decimal' + } + }, listItem: { HTMLAttributes: { class: 'ml-5 rt-Text text-sm'