-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Some toolbar items are active when editing html embed #8798
Comments
This could be an issue in the |
Looks like the media feature works the same. |
It could be we decided to implement it this way because we didn't have the widget type around sub-feature and that was the only way, for instance, to insert content after an image if it was the last child of the editing root. |
ResearchI have done some research regarding inserting things when something is selected and I would distinguish between two cases:
So, regarding the first case: WordSet caret in the text box -> Insert a table -> The table is being inserted inside the text box Gogle DocsThere is nothing to test on. TinyMCEThe code sample can not be edited in the scope of the editor (it is edited in the pop-up). ProseMirrorThe embedded code editor doesn’t allow inserting things. Only the horizontal line is allowed and it lands before the code block, but it feels more like a bug. ConclusionI think we should just disable the commands for inserting things that are not allowed to be in the HTML snippet. |
Since the html-embed widget is the We decided to disable the |
…html Fix (table): The `insertTable` command should be disabled if any object is selected. Closes #8798. Fix (media-embed): The `insertMediaEmbed` command should be disabled if any non-media object is selected (see #8798). Other (widget): The `checkSelectionOnObject` function should be exported by the `@ckeditor/ckeditor5-widget/src/utils package` (see #8798). Tests (html-embed): The manual test should show the insert table and insert media buttons and describe their correct state (see #8798).
Hello @oleq @magda-chrzescian, Would you please tell me step by step what should I do if I also want to disable command in embed html? |
📝 Provide detailed reproduction steps (if any)
Edit source
✔️ Expected result
Table / media embed icons should be deactivated
❌ Actual result
Table / media embed is added after the html embed:
If you'd like to see this fixed sooner, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: