Javascript “整合困难”;tui-editor-1.0.3“;

Javascript “整合困难”;tui-editor-1.0.3“;,javascript,jquery,tui,Javascript,Jquery,Tui,我在将“”集成到网页中时遇到困难。 它抛出一个错误:“未捕获的TypeError:无法读取未定义的属性'scrollIntoView'” 错误源位于tui Editor Editor.js的行号19122,其中存在null值this.\u currentButton并尝试访问this.\u currentButton.scrollIntoView() 在访问this.\u currentButton.scrollIntoView之前,我试图检查null值,但它无法生成适当的编辑器视图。 如何确

我在将“”集成到网页中时遇到困难。

它抛出一个错误:
“未捕获的TypeError:无法读取未定义的属性'scrollIntoView'”
错误源位于
tui Editor Editor.js
的行号
19122
,其中存在
null
this.\u currentButton
并尝试访问
this.\u currentButton.scrollIntoView()

在访问
this.\u currentButton.scrollIntoView
之前,我试图检查
null
值,但它无法生成适当的编辑器视图。


如何确保
this.\u currentButton
始终不能为空?或者,还有其他解决方案吗?

我今天也面临同样的问题

我对尝试TUI编辑器很陌生,所以不确定什么是正确的解决方案。但是根据read the code,指定
codeBlockLanguages
选项可能会避免此错误

var editor = new tui.Editor({
    el: document.querySelector('#editor'),
    initialEditType: 'markdown',
    previewStyle: 'vertical',
    height: '300px',
    codeBlockLanguages: ['ruby', 'PHP', 'javascript'],
});

我今天也面临同样的问题

我对尝试TUI编辑器很陌生,所以不确定什么是正确的解决方案。但是根据read the code,指定
codeBlockLanguages
选项可能会避免此错误

var editor = new tui.Editor({
    el: document.querySelector('#editor'),
    initialEditType: 'markdown',
    previewStyle: 'vertical',
    height: '300px',
    codeBlockLanguages: ['ruby', 'PHP', 'javascript'],
});

非常感谢,这确实有帮助,应该标记为正确答案!非常感谢,这确实有帮助,应该标记为正确答案!