I have a problem while trying to put ng2-ckeditor
within a md-tab
of angular-material2.
Here's the code:
HTML:
<md-tab-group> <md-tab> <ckeditor [(ngModel)]="content"></ckeditor> </md-tab> </md-tab-group>
The problem is that I get an error whenever I click on something in the 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)`
What is weird is that when it loads the tab (for like 1sec) it displays fine.
Are there any solutions? Thank you!