Skip to content

Commit

Permalink
BUGFIX: Loading issue in secondary RTE
Browse files Browse the repository at this point in the history
Resolves: #63
  • Loading branch information
Sebobo committed Aug 24, 2023
1 parent 46e0c11 commit 729e336
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import HyphensFactory from "./plugins/hyphens";

const addPlugin = (Plugin) => (ckEditorConfiguration, options) => {
if (options.editorOptions.nbsp || options.editorOptions.hyphens) {
if (options.editorOptions && (options.editorOptions.nbsp || options.editorOptions.hyphens)) {
ckEditorConfiguration.plugins = ckEditorConfiguration.plugins || [];
ckEditorConfiguration.plugins.push(Plugin);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ export default ckEditorRegistry => {
style: 'transparent',
hoverStyle: 'brand',
tooltip: 'Shel.Neos.Hyphens:Main:ckeditor__toolbar__shy',
isVisible: (config, bar, foo) => config.hyphens,
isActive: (config) => config.hyphens,
isVisible: (config, bar, foo) => config && config.hyphens,
isActive: (config) => config && config.hyphens,
});

richtextToolbar.set('nbsp', {
Expand All @@ -92,8 +92,8 @@ export default ckEditorRegistry => {
style: 'transparent',
hoverStyle: 'brand',
tooltip: 'Shel.Neos.Hyphens:Main:ckeditor__toolbar__nbsp',
isVisible: (config) => config.nbsp,
isActive: (config) => config.nbsp,
isVisible: (config) => config && config.nbsp,
isActive: (config) => config && config.nbsp,
});

return richtextToolbar;
Expand Down
Loading

0 comments on commit 729e336

Please sign in to comment.