Skip to content

Commit

Permalink
fix(wysiwyg): Upgrade Suneditor to 2.47.0 and set sticky toolbar config
Browse files Browse the repository at this point in the history
  • Loading branch information
welcoMattic committed Sep 10, 2024
1 parent f5dc440 commit d1e4520
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions assets/js/editors/editors/suneditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ const initEditor = () => {
codeMirror: CodeMirror,
height: 'auto',
plugins: suneditorPlugins,
buttonList: []
buttonList: [],
stickyToolbar: false,
});
}

Expand All @@ -23,7 +24,7 @@ export default {
const editorModel = initEditor();
target.querySelectorAll('[data-component="wysiwyg-editor"][data-editor-type="suneditor"]').forEach((component) => {

// SundEditor is ID based, so we need to make sure that the ID is unique
// SunEditor is ID based, so we need to make sure that the ID is unique
if (currentEditors.includes(component.id)) {
component.id = `${component.id}-${Math.random().toString(36).substring(7)}`;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
"gulp": "^4.0.2",
"highlight.js": "^11.10.0",
"mustache": "^4.0.1",
"suneditor": "^2.45.1"
"suneditor": "^2.47.0"
}
}
2 changes: 1 addition & 1 deletion src/Resources/public/js/rich-editor-highlight.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Resources/public/js/rich-editor.js

Large diffs are not rendered by default.

0 comments on commit d1e4520

Please sign in to comment.