Feat: Integrate codemirror-toolbar with markdownItems into e_app_codemirror_v5.svelte for basic rich text editing.
This commit is contained in:
@@ -44,6 +44,8 @@ import { markdown, markdownLanguage } from '@codemirror/lang-markdown';
|
|||||||
// import { html } from '@codemirror/lang-html';
|
// import { html } from '@codemirror/lang-html';
|
||||||
import { oneDark } from "@codemirror/theme-one-dark";
|
import { oneDark } from "@codemirror/theme-one-dark";
|
||||||
|
|
||||||
|
import toolbar, { markdownItems } from 'codemirror-toolbar';
|
||||||
|
|
||||||
// Props
|
// Props
|
||||||
export let content: string = 'test test test test';
|
export let content: string = 'test test test test';
|
||||||
export let new_content: string = '';
|
export let new_content: string = '';
|
||||||
@@ -161,6 +163,9 @@ $: editor_extensions = [
|
|||||||
// css(),
|
// css(),
|
||||||
// html(),
|
// html(),
|
||||||
theme,
|
theme,
|
||||||
|
toolbar({
|
||||||
|
items: markdownItems,
|
||||||
|
}),
|
||||||
|
|
||||||
...extensions
|
...extensions
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user