diff --git a/lib/zin/wg/editor/css/v1.css b/lib/zin/wg/editor/css/v1.css index 911b4b5122..ec16ea734f 100644 --- a/lib/zin/wg/editor/css/v1.css +++ b/lib/zin/wg/editor/css/v1.css @@ -2,10 +2,11 @@ textarea[size="sm"], tiptap-editor[size="sm"] {min-height: 142px;} textarea[size="lg"], tiptap-editor[size="lg"] {min-height: 250px;} +textarea[size="full"] {min-height: 100%; height: 100%;} [data-tippy-root] tiptap-menu-item > button {font-size: inherit; font-family: Arial; line-height: normal;} -.editor-container {height: auto; width: 100%;} +.editor-container {width: 100%;} .editor-container tiptap-editor {display: none;} .editor-container textarea {height: initial;} [data-loaded-editor] .editor-container tiptap-editor {display: block;} diff --git a/lib/zin/wg/editor/v1.php b/lib/zin/wg/editor/v1.php index 51b5b664fc..66c6d6064b 100644 --- a/lib/zin/wg/editor/v1.php +++ b/lib/zin/wg/editor/v1.php @@ -38,7 +38,8 @@ class editor extends wg $editor = new h ( setTag('tiptap-editor'), - setClass('form-control', 'p-0', 'h-auto'), + setClass('form-control', 'p-0'), + $this->prop('size') === 'full' ? setStyle('height', '100%') : setClass('h-auto'), ); $props = $this->props->pick(array('createInput', 'uploadUrl', 'placeholder', 'fullscreenable', 'resizable', 'exposeEditor', 'size', 'hideMenubar', 'bubbleMenu', 'menubarMode', 'collaborative', 'hocuspocus', 'docName', 'username', 'userColor')); foreach($props as $key => $value) @@ -57,6 +58,7 @@ class editor extends wg return div ( setClass('editor-container'), + $props['size'] === 'full' ? setStyle('height', '100%') : setClass('h-auto'), $editor, textarea (