Skip to content

Commit

Permalink
fix: LPS-130834 CKEditor is not displaying the full source code text …
Browse files Browse the repository at this point in the history
…on 7.0.x because code mirror is not syncronize with the height of editor config
  • Loading branch information
georgel-pop-lr committed Apr 22, 2021
1 parent bd6d766 commit 8a5e73a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion plugins/codemirror/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@

instance.codeMirrorEditor.setValue(oldData);

var editableParent = editable.getParent();
var contentsSize = editableParent.getClientSize();
if (contentsSize.height) {
instance.codeMirrorEditor.setSize(

This comment has been minimized.

Copy link
@julien

julien Apr 23, 2021

Contributor

@georgel-pop-lr thanks for updating this bit. As far as I'm concerned this is good to go.
I'll just wait a little bit more to see if any one else has something to say.

null,
contentsSize.height
);
}

instance.codeMirrorEditor.on(
'change',
instance._handleCodeMirrorChange.bind(
Expand Down Expand Up @@ -74,7 +83,7 @@
},

_handleEditorResize: function (event) {
this.codeMirrorEditor.setSize(null, event.data.outerHeight);
this.codeMirrorEditor.setSize(null, event.data.contentsHeight);
},

hidpi: true,
Expand Down

0 comments on commit 8a5e73a

Please sign in to comment.