Skip to content

Commit edbc0e3

Browse files
committed
Feat: Add resize bar to HTMLField
1 parent 6a76c81 commit edbc0e3

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

private/css/cms.tiptap.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ p:not(.is-empty) > br.ProseMirror-trailingBreak {
3838
&.textarea.fixed .tiptap {
3939
border-top-left-radius: 0;
4040
border-top-right-radius: 0;
41+
resize: vertical;
42+
overflow-y: auto;
4143
}
4244
position: relative;
4345
a {

private/js/cms.editor.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,8 @@ class CMSEditor {
226226

227227
// CMS Editor: init_all
228228
initAll () {
229+
// Save the active element
230+
const active = document.activeElement;
229231
// Get global options from script element
230232
try {
231233
this._options = JSON.parse(document.getElementById('cms-editor-cfg').textContent);
@@ -238,6 +240,10 @@ class CMSEditor {
238240
);
239241
// Register all plugins on the page for inline editing
240242
this.initInlineEditors();
243+
// Re-focus the active element
244+
if (active) {
245+
active.focus();
246+
}
241247
}
242248

243249
// CMS Editor: destroy

0 commit comments

Comments
 (0)