Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions assets/plugins/codemirror/codemirror.plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,15 @@ function makeMarker(symbol) {
myCodeMirrors['{$el}'] = CodeMirror.fromTextArea(myTextArea, config);
if (window.evoElementNameHelper) {
window.evoElementNameHelper.installCodeMirror(myCodeMirrors['{$el}']);
}
// .CodeMirror is resize: vertical (custom.css), so the wrapper
// can be dragged taller. CodeMirror renders the lines its last
// measurement said would fit, so the new space stays blank
// until it is asked to measure again.
if (window.ResizeObserver) {
new ResizeObserver(function() {
myCodeMirrors['{$el}'].refresh();
}).observe(myCodeMirrors['{$el}'].getWrapperElement());
}
{$setHeight}
// reset onchange tab
Expand Down
6 changes: 6 additions & 0 deletions manager/media/style/default/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,12 @@ div.mce-fullscreen { margin-top:2.6rem; }
.mceEditor .mceToolbar td { height: 24px; float: left }
/* codeMirror */
.CodeMirror { width: 100%; margin: 0 !important; }
/* Drag the bottom edge to make any editor taller. The wrapper is already
overflow: hidden (codemirror.css), which is what lets resize apply to it.
CodeMirror only draws the lines its last measurement said would fit, so
the instance has to refresh on resize or the new space stays blank - the
CodeMirror plugin does that for the editors it creates. */
.CodeMirror { resize: vertical; }
.CodeMirror pre { word-break: break-all !important; }
.CodeMirror > div:first-child > textarea { /*opacity: 0;*/
z-index: -1; left: -9999rem; }
Expand Down