Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUGFIX: 3557 placeholder plugin with autoparagraph false #3558

Merged
merged 4 commits into from
Jul 3, 2023

Conversation

mhsdesign
Copy link
Member

@mhsdesign mhsdesign commented Jun 30, 2023

resolves: #3557
as the placeholder plugin was a bit hacky and broke in a regression from #3532
Because editor.getData now returned the new internal <neos-inline-wrapper> tags. The preprocessing to strip them is now applied earlier, so other calls to editor.getData now get the expected results.

also a problem is resolved that no placeholder is shown, if one chooses h1 tag when autoparagraph false is enabled

additionally it cleans up the codebase and uses the native ckeditor placeholder plugin instead of our hacky home-brewed solution.

before and after:

Bildschirmaufnahme.2023-07-03.um.10.13.27.mov
Bildschirmaufnahme.2023-07-03.um.10.15.44.mov
Bildschirmaufnahme.2023-07-03.um.10.14.14.mov

What I did

How I did it

How to verify it

@github-actions github-actions bot added Bug Label to mark the change as bugfix 7.3 labels Jun 30, 2023
@mhsdesign
Copy link
Member Author

mhsdesign commented Jul 3, 2023

So i was wondering why we even have our more or less hacky placeholder plugin.

When we initially integrated CKEditor 5 #1942 its latest version was v10. And only with v12 the "ckeditor5-editor-decoupled" had native support for placeholders.
https://github.com/ckeditor/ckeditor5-editor-decoupled/blame/3a6ddfe6644a539f8cff892d19f2d3f7b578317e/src/decouplededitorui.js#L132-L149

see docs: https://ckeditor.com/docs/ckeditor5/16.0.0/api/module_core_editor_editorconfig-EditorConfig.html#member-placeholder and https://ckeditor.com/docs/ckeditor5/16.0.0/features/editor-placeholder.html

luckily we use v12 in 7.3 and v16 in 8.3 so we can utilize this more stable native placeholder support as of right now.

@mhsdesign mhsdesign marked this pull request as ready for review July 3, 2023 08:32
Copy link
Member

@Sebobo Sebobo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and works in my tests, just one nitpick regarding a comment.

packages/neos-ui-ckeditor5-bindings/src/manifest.config.js Outdated Show resolved Hide resolved
Copy link
Member

@kdambekalns kdambekalns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me…

@mhsdesign mhsdesign requested a review from Sebobo July 3, 2023 10:40
@mhsdesign mhsdesign force-pushed the bugfix/3557-placeholder-plugin-autoparagraph-false branch from 42030fe to 19402f2 Compare July 3, 2023 10:48
Copy link
Contributor

@grebaldi grebaldi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works like a charm! 👍

@mhsdesign mhsdesign merged commit bb7dd82 into 7.3 Jul 3, 2023
9 checks passed
@mhsdesign mhsdesign deleted the bugfix/3557-placeholder-plugin-autoparagraph-false branch July 3, 2023 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
7.3 Bug Label to mark the change as bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants