Skip to content

Commit

Permalink
Merge pull request #165 from georgel-pop-lr/LPS-130834-source-code-sc…
Browse files Browse the repository at this point in the history
…roll-70x

fix: LPS-130834 CKEditor is not displaying the full source code text on 7.0.x
  • Loading branch information
julien authored Apr 23, 2021
2 parents 3f81362 + 8a5e73a commit 79822bc
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(
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 79822bc

Please sign in to comment.