chore(ckeditor5/plugins): integrate markdown inline

This commit is contained in:
Elian Doran
2025-05-03 17:22:49 +03:00
parent 2f09411c0d
commit a44eaeaf10
4 changed files with 6 additions and 5 deletions

View File

@@ -0,0 +1,25 @@
import { ButtonView, Plugin } from 'ckeditor5';
import markdownIcon from '../icons/markdown-mark.svg?raw';
export default class MarkdownImportPlugin extends Plugin {
init() {
const editor = this.editor;
editor.ui.componentFactory.add( 'markdownImport', locale => {
const view = new ButtonView( locale );
view.set( {
label: 'Markdown import from clipboard',
icon: markdownIcon,
tooltip: true
} );
// Callback executed once the image is clicked.
view.on( 'execute', () => {
glob.importMarkdownInline();
} );
return view;
} );
}
}