Commit 9db94598 by 胡悦

禁用富文本参数

1 parent 81ef3648
...@@ -137,7 +137,7 @@ const back = () => { ...@@ -137,7 +137,7 @@ const back = () => {
// 编辑器实例,必须用 shallowRef,重要! // 编辑器实例,必须用 shallowRef,重要!
const editorRef = shallowRef(); const editorRef = shallowRef();
const toolbarConfig: Partial<IToolbarConfig> = { const toolbarConfig: Partial<IToolbarConfig> = {
excludeKeys: ["insertImage", "group-video"] excludeKeys: ["insertImage", "group-video", "blockquote", "code", "insertTable", "codeBlock", "todo"]
}; };
const mode = 'default' const mode = 'default'
const valueHtml = ref('') const valueHtml = ref('')
...@@ -160,11 +160,11 @@ const editorConfig: Partial<IEditorConfig> = { ...@@ -160,11 +160,11 @@ const editorConfig: Partial<IEditorConfig> = {
const handleCreated = (editor: IDomEditor) => { const handleCreated = (editor: IDomEditor) => {
editorRef.value = editor; // 记录 editor 实例,重要! editorRef.value = editor; // 记录 editor 实例,重要!
// 获取工具栏的key // 获取工具栏的key
// setTimeout(() => { setTimeout(() => {
// const toolbar = DomEditor.getToolbar(editor); const toolbar = DomEditor.getToolbar(editor);
// const toolbarKeys = toolbar?.getConfig().toolbarKeys const toolbarKeys = toolbar?.getConfig().toolbarKeys
// console.log('toolbarKeys', toolbarKeys) console.log('toolbarKeys', toolbarKeys)
// }) })
}; };
const handleChange = (editor: IDomEditor) => { const handleChange = (editor: IDomEditor) => {
if (valueHtml.value == '<p><br></p>') { if (valueHtml.value == '<p><br></p>') {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!