#63712 closed defect (bug) (invalid)
Switching between Visual and Code editor in the Classic Editor (TinyMCE) generates new HTML elements
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 6.8.2 |
| Component: | TinyMCE | Keywords: | close |
| Focuses: | administration | Cc: |
Description
The issue happens when creating or editing a post with the Classic editor.
Whenever you switch between the Visual and Code editor, the following new block of content gets appended to the post body.
<div style="pointer-events: none; border: medium;"></div>
Every time the post is saved and the user is in the Visual Editor the following line gets re-appended to the post body, so we get...
<div style="pointer-events: none; border: medium;"></div> <div style="pointer-events: none; border: medium;"></div>
The only way to get rid of this code is to remove it from the Code editor and save the post again. However, every time you switch back to the Visual editor it gets added again.
Attachments (2)
Change History (6)
#2
@
5 months ago
For me, this issue first time came up while I was working on my project, where I needed to use a table in the WYSIWYG editor. I have a custom post type with "editor" support and "show_in_rest" set to false. I found this ticket just before I was about to create a new one.
Not div but it add " ".
Yes, I have tested it on a clean WordPress 6.8.2 installation, with no plugins and the default theme and the issue still occurs.
I’m attaching a video showing one of the scenarios.
#3
in reply to:
↑ 1
@
5 months ago
- Keywords close added; needs-test-info removed
- Resolution set to invalid
- Status changed from new to closed
Thanks @krupajnanda!
I did some additional digging and it seems that the problem is not in core WP but in the Harper extension for Firefox. I was using a version from this tree: https://github.com/Automattic/harper/tree/v0.51.0. Once I disabled the extension this additional content stopped being appended to the posts when switching between the editors.
I tried it in a fresh new WP install of 6.8.2 with only one additional plugin installed and activated - Classic Editor.
Though I was able to recreate what @vishalmori showed in his example, I think that's an entirely different issue.
Closing this ticket as invalid for WordPress core.
Hello @gocemitevski
Thank you for opening this ticket. Please check this report shared below.
Reproduction Report
Description
With the given details, I tried to reproduce the issue but I am not able to replicate the same. It works as expected for me. However, any extra details like Test environment, Steps are really helpful in oder to replicate the issue around what exactly you are facing.
Environment
Actual Results (Later Edit)