Closed patrikengborg closed 7 years ago
Just tried to remount it manually. Obviously not the prettiest solution, but it seems to work fine. Could it come with any drawbacks?
document.querySelector('#target').appendChild(document.querySelector('.ct-app'))
Hi @patrikengborg so I can't see any issue with this how it's probably advisable to override the mount function instead, so in JS:
var editorCls = ContentTools.EditorApp.getCls();
editorCls.prototype.mount = function () {
this._domElement = editorCls.createDiv(['ct-app']);
document.querySelector('#target').appendChild(this._domElement, null);
this._addDOMEventListeners();
}
You're a star, thanks! Will post questions to Stackoverflow from now on, didn't see the guidelines until after this. Sorry!
Hi,
Is there any way to mount (or remount) the ct-app to a specific element instead of the body?
I'm trying to avoid some tricky z-index issues and this would be the easiest way to get around it.
Thanks!