Skip to content

Commit

Permalink
Merge pull request #21 from mhsdesign/feature/eraser
Browse files Browse the repository at this point in the history
Add Neos / CKEditor 5 removeFormat support
  • Loading branch information
SimonPaidla authored Oct 15, 2021
2 parents 4a59c1c + 6251d28 commit c7e3c9c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ export default (presetIdentifier, presetConfiguration) =>
{ allowAttributes: `blockStyles-${presetIdentifier}`}
);

// https://ckeditor.com/docs/ckeditor5/latest/features/remove-format.html
this.editor.model.schema.setAttributeProperties(
`blockStyles-${presetIdentifier}`,
{ isFormatting: true }
);

// Model configuration
const config = {
model: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ export default (presetIdentifier, presetConfiguration) =>
{ allowAttributes: `inlineStyles-${presetIdentifier}` }
);

// https://ckeditor.com/docs/ckeditor5/latest/features/remove-format.html
this.editor.model.schema.setAttributeProperties(
`inlineStyles-${presetIdentifier}`,
{ isFormatting: true }
);

// Model configuration
const config = {
model: {
Expand Down
6 changes: 6 additions & 0 deletions Resources/Public/JavaScript/CkStyles/Plugin.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Resources/Public/JavaScript/CkStyles/Plugin.js.map

Large diffs are not rendered by default.

0 comments on commit c7e3c9c

Please sign in to comment.