File tree Expand file tree Collapse file tree 2 files changed +23
-6
lines changed
src/components/TextEditor Expand file tree Collapse file tree 2 files changed +23
-6
lines changed Original file line number Diff line number Diff line change 1515 <TextEditorFloatingMenu :buttons =" floatingMenu" />
1616 <slot name =" top" :editor />
1717 <slot name =" editor" :editor =" editor" >
18- <EditorContent
19- :editor =" editor"
20- class =" prose prose-sm prose-table:table-fixed prose-td:p-2 prose-th:p-2 prose-td:border prose-th:border prose-td:relative prose-th:relative prose-th:bg-surface-gray-2"
21- />
18+ <EditorContent :editor =" editor" />
2219 </slot >
2320 <slot name =" bottom" :editor />
2421 </div >
@@ -88,7 +85,7 @@ function defaultUploadFunction(file: File) {
8885const props = withDefaults (defineProps <TextEditorProps >(), {
8986 content: null ,
9087 placeholder: ' ' ,
91- editorClass: ' ' ,
88+ editorClass: ' prose-sm ' ,
9289 editable: true ,
9390 autofocus: false ,
9491 bubbleMenu: false ,
@@ -117,7 +114,7 @@ const attrsWithoutClassStyle = computed(() => {
117114const editorProps = computed (() => {
118115 return {
119116 attributes: {
120- class: normalizeClass (props .editorClass ),
117+ class: normalizeClass ([ ' prose ' , props .editorClass ] ),
121118 },
122119 }
123120})
Original file line number Diff line number Diff line change @@ -111,6 +111,26 @@ img.ProseMirror-selectednode {
111111 background-color : var (--surface-gray-2 , # f3f3f3 );
112112}
113113
114+ .ProseMirror table {
115+ table-layout : fixed;
116+ }
117+
118+ .ProseMirror td ,
119+ .ProseMirror th {
120+ padding : 0.5rem ;
121+ border : 1px solid var (--outline-gray-2 );
122+ position : relative;
123+ }
124+
125+ .ProseMirror td p ,
126+ .ProseMirror th p {
127+ margin : 0 ;
128+ }
129+
130+ .ProseMirror th {
131+ background-color : var (--surface-gray-2 );
132+ }
133+
114134/* Edit prose classes to be more functional */
115135.prose-v2 {
116136 line-height : 1.5 !important ;
You can’t perform that action at this time.
0 commit comments