Skip to content

Commit 5df2240

Browse files
committed
fix(editor): base font size
1 parent 96559d6 commit 5df2240

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

app/components/Editor.vue

+8-2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const props = withDefaults(
2626
placeholder?: string;
2727
id?: string;
2828
readOnly?: boolean;
29+
editorClass?: string;
2930
}>(),
3031
{
3132
id: 'vidur-editor',
@@ -45,6 +46,11 @@ onMounted(() => {
4546
content: editorContent.value,
4647
extensions: [
4748
StarterKit.configure({
49+
paragraph: {
50+
HTMLAttributes: {
51+
class: 'text-sm',
52+
},
53+
},
4854
bold: {
4955
HTMLAttributes: {
5056
class: 'font-bold',
@@ -78,7 +84,7 @@ onMounted(() => {
7884
3: 'text-xl',
7985
4: 'text-lg',
8086
5: 'text-md',
81-
6: 'text-base',
87+
6: 'text-sm',
8288
};
8389
return [
8490
`h${level}`,
@@ -292,7 +298,7 @@ watchEffect(() => {
292298
</ToolbarToggleGroup>
293299
</ToolbarRoot>
294300
<EditorContent
295-
:class="readOnly ? '' : 'border-b border-x rounded-b-lg bg-white p-1'"
301+
:class="{ 'border-b border-x rounded-b-lg bg-white p-1': !readOnly, [editorClass || '']: !!editorClass }"
296302
:editor
297303
:disabled="readOnly"
298304
/>

0 commit comments

Comments
 (0)