import BalloonEditor from '@ckeditor/ckeditor5-editor-balloon/src/ballooneditor';
import Essentials from '@ckeditor/ckeditor5-essentials/src/essentials';
import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';
import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic';
BalloonEditor
.create( elem, {
plugins: [ Markdown, Essentials, Paragraph, Bold, Italic ],
toolbar: [ 'bold' ]
})
.then((editor) => {
....
})
.catch( error => {
console.error( error );
} );
我尝试使用https://ckeditor.com/docs/ckeditor5/latest/api/module_engine_view_placeholder.html#static-function-attachPlaceholder中的attachPlaceholder
import { attachPlaceholder } from "@ckeditor/ckeditor5-engine/src/view/placeholder";
您能否向我展示如何使用此方法(attachPlaceholder)或如何使用此方法的简单示例。