mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-22 10:08:45 +02:00
N°5298 - Fix CKEditor not using width/height from the datamodel since upgrade to v5 in the backoffice
This commit is contained in:
@@ -49,6 +49,16 @@ const CombodoCKEditorHandler = {
|
||||
return this.instances_promise[sElem] = new Promise((resolve, reject) => {
|
||||
ClassicEditor.create($(sElem)[0], aConfiguration)
|
||||
.then(editor => {
|
||||
// Adjust size if passed in configuration
|
||||
// - Width
|
||||
if (aConfiguration.width !== undefined) {
|
||||
editor.editing.view.change( writer => { writer.setStyle( 'width', aConfiguration.width, editor.editing.view.document.getRoot() ); } );
|
||||
}
|
||||
// - Height
|
||||
if (aConfiguration.height !== undefined) {
|
||||
editor.editing.view.change( writer => { writer.setStyle( 'height', aConfiguration.height, editor.editing.view.document.getRoot() ); } );
|
||||
}
|
||||
|
||||
this.instances[sElem] = editor;
|
||||
resolve(editor);
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user