如何解决CKEditor5 - 如何在 React 的工具栏中添加剪贴板按钮
我正在尝试在 React jsx 文件中自定义 ckeditor5 工具栏,但我无法管理如何在内联编辑器中显示剪贴板“粘贴”按钮。
这是我的文件:
import React,{ Component } from 'react';
import { CKEditor } from '@ckeditor/ckeditor5-react';
import InlineEditor from '@ckeditor/ckeditor5-build-classic';
const editorConfiguration = {
toolbar: [ 'imageUpload','undo','redo','paste'],};
class Editable extends Component {
render() {
return (
<div id="Editable" className="Editable">
<CKEditor
editor={ InlineEditor }
data=""
config={ editorConfiguration }
onReady={ editor => {
// You can store the "editor" and use when it is needed.
console.log( 'Editor is ready to use!',editor );
} }
onChange={ ( event,editor ) => {
const data = editor.getData();
console.log( { event,editor,data } );
} }
onBlur={ ( event,editor ) => {
console.log( 'Blur.',editor );
} }
onFocus={ ( event,editor ) => {
console.log( 'Focus.',editor );
} }
/>
</div>
);
}
}
export default Editable;
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。