我在试图将ng2-ckeditor
放入angular-material2的md-tab
中时遇到了问题。
以下是代码:
HTML:
<md-tab-group>
<md-tab>
<ckeditor [(ngModel)]="content"></ckeditor>
</md-tab>
</md-tab-group>
问题在于我每次单击ckeditor中的某个内容时会出现错误:
ckeditor.js:438 Uncaught TypeError: Cannot read property 'getSelection' of undefined at CKEDITOR.dom.selection.getNative (ckeditor.js:438) at CKEDITOR.dom.selection (ckeditor.js:436) at a.CKEDITOR.editor.getSelection (ckeditor.js:434) at $.onOpen (ckeditor.js:721) at $.d.onShow (ckeditor.js:697) at $.showBlock (ckeditor.js:716) at $.e [as click] (ckeditor.js:696) at Object.execute (ckeditor.js:690) at ckeditor.js:691 at ckeditor.js:31 at Object.callFunction (ckeditor.js:31) at HTMLAnchorElement.onclick (VM30482 -KkkPBxTMDSipcy86VCV:1)
奇怪的是,当它加载选项卡(大约为1秒)时,它显示正常。
有没有解决方法?谢谢!