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

Unable to edit pasted HTML tags in post title in the main editor #46823

Open
mjdewitt opened this issue Dec 29, 2022 · 5 comments
Open

Unable to edit pasted HTML tags in post title in the main editor #46823

mjdewitt opened this issue Dec 29, 2022 · 5 comments
Labels
[Block] Post Title Affects the Post Title Block [Type] Enhancement A suggestion for improvement.

Comments

@mjdewitt
Copy link

What problem does this address?

Pasted text that contains HTML tags cannot be edited visually as title has no block edit nor can it be edited as code as the title block appears to be rendered unlike the post content.

What is your proposed solution?

  1. the code editor should treat the post title like any other editable block
  2. add separate editor settings to control the stripping of HTML tags from pasted text for both the title and content.
  3. Give the post title a block editor.

Is there a work-around?

Yes, Quick edit allows for the editing of HTML Tags

@kathrynwp kathrynwp added the [Type] Enhancement A suggestion for improvement. label Dec 29, 2022
@kathrynwp
Copy link

Give the post title a block editor.

Hey there! With Site Editing, the Post Title is indeed an editable block. You can learn more about it here: https://wordpress.org/support/article/post-title-block/

This feature is available in block themes, like Twenty Twenty-Three, Twenty Twenty-Two, and any of the block themes you'll find here: https://wordpress.org/themes/tags/full-site-editing/

@bozzmedia
Copy link

bozzmedia commented Jan 12, 2023

I run into this issue regularly. I often have to manually copy and paste the code into a text editor to clean it up.

The Post Title block should not hide embedded html tags, or perhaps the view could be toggled to source view. It does not appear to render the <strong> tags in the editor I often encounter. It does not feel appropriate for post title to support html tags, but if that is a necessary function it should not filter out their view in the editor.

I am not using a block theme and don't intend to for all sites. Thanks

@Himshekhar07
Copy link

When I copy and paste bold words from a google document file or any other site, it shows tag in the admin backend for the Twenty-Three, Twenty Twenty-One, Twenty Twenty-Two themes. It does not feel appropriate for the post title to support HTML we must use some esc filter to remove such HTML tag.

For better understanding I am posting a video:
https://share.cleanshot.com/GTcXSfSJyBdM6rwDRTY4

@bozzmedia
Copy link

Related: #38668

@bozzmedia
Copy link

There's some detail on this also being an issue for the title block, as @kathrynwp referenced earlier.

"I discovered that there is a 'title block' in gutenberg. Probably this is the one that is used for the title.
Anyway: If you add a new title block to the existing page, it also has the problem with tags 'working' in visual view, but not (showing) in 'edit mode'.
So, the bug is in the title block."

Discussion here:
https://www.facebook.com/groups/advancedwp/posts/6172112669517562/

@skorasaurus skorasaurus added the [Block] Post Title Affects the Post Title Block label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Post Title Affects the Post Title Block [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

5 participants