We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
普通模式(编)
在编辑模式下使用 vditor 时出现两个错误。即使内容为空也会出现问题。
渲染 vditor 时不应出现错误。
对于问题#1:我可以看到 ute.min.js 已正确下载。当尝试在单一画面中使用 3 4 个独立的 vditor 实例时,我注意到了 this.vditor.lute 问题。我使用以下程式码来初始化编辑器。
对于问题 #2:TypeError(e 为 null)间歇性发生。
try{ const activeEl = document.activeElement as HTMLElement const lang = this.getEditorLanguage(); this.vditor = new Vditor(this.id, { lang: lang, minHeight: this.getMinimumHeight(), height: 'auto', placeholder: this.placeHolder ? this.placeHolder : '', toolbar: [ "headings", "bold", "italic", "strike", "link", "|", "list", "ordered-list", "check", "outdent", "indent", "|", "quote", "line", "code", "inline-code", "insert-before", "insert-after", "|", "table", "|", "undo", "redo", "|", "fullscreen", "edit-mode", { name: "more", toolbar: [ "both", "code-theme", "content-theme", "export", "outline", "preview", "devtools", "info", "help", ], }, ], toolbarConfig: { pin: true, }, cache: { enable: false, }, value: this.value === undefined || this.value ==="" || this.value=== null ? " " : this.value , after: () => { this.vditor?.setValue(this?.value); // stop autofocus setTimeout(() => { activeEl.focus() }, 100) }, blur: (value) =>this.change.emit({id: this.id,value : value}), }) } catch(error){ console.log("Error caught while initializing Vditor",error); }
The text was updated successfully, but these errors were encountered:
this.vditor.lute 是在哪里使用过?是不是作用域不对? Demo 上没有这样的问题。
Sorry, something went wrong.
No branches or pull requests
编辑模式
普通模式(编)
描述问题
在编辑模式下使用 vditor 时出现两个错误。即使内容为空也会出现问题。
预期成绩
渲染 vditor 时不应出现错误。
萤幕截图或录影
版本资讯
其他资讯
对于问题#1:我可以看到 ute.min.js 已正确下载。当尝试在单一画面中使用 3 4 个独立的 vditor 实例时,我注意到了 this.vditor.lute 问题。我使用以下程式码来初始化编辑器。
对于问题 #2:TypeError(e 为 null)间歇性发生。
The text was updated successfully, but these errors were encountered: