我在我的应用程序中使用dijit / Editor,我想使用autourllink插件,因为我希望用户直接点击编辑器中的超链接并打开页面。
他们网站上列出的示例不起作用: https://dojotoolkit.org/reference-guide/1.10/dojox/editor/plugins/AutoUrlLink.html#dojox-editor-plugins-autourllink
并且,在下载Dojo并尝试之后,我收到以下错误:
AutoUrlLink.js:169 Uncaught TypeError: Cannot read property 'previousSibling' of null
at Object._findLastEditingNode (AutoUrlLink.js:169)
at Object._recognize (AutoUrlLink.js:77)
at Object.<anonymous> (lang.js:383)
at Object.dispatcher [as onClick] (aspect.js:101)
at HTMLDocument.<anonymous> (lang.js:383)
以下是代码段:
var myEditor = new Editor({
plugins: ['cut','copy','paste','|','bold','italic','underline','strikethrough','subscript','superscript','|', 'indent', 'outdent', 'justifyLeft', 'justifyCenter', 'justifyRight'],
extraPlugins: [AlwaysShowToolbar, 'createLink', 'autourllink']
}, parentNode);
myEditor.startup();
使用此插件的任何帮助将不胜感激。谢谢!