Open akmyta opened 5 months ago
Previously, it was possible to add HTML tags in the visual editor.
@akmyta I think HTML tags have to be added via the code editor and not the visual editor. Possibly this was changed at some point, but I'm not exactly sure of the history.
I've tested, and adding tags is possible if you do it via the code editor. Via the visual editor the tags are escaped.
Possibly this was changed at some point, but I'm not exactly sure of the history.
This was not the case prior to 6.5's rollout this week. Has disrupted our editorial workflow significantly.
@talldan If I complete the same steps in WordPress version 6.4.3 - it works as expected.
https://github.com/WordPress/gutenberg/assets/35075802/ae7564ba-31a1-4b1c-b6b9-051d680e7992
I researched this issue via Playground and it works as expected from WP6.1 to WP6.4. In WP6.5, HTML tags are escaped. I don't yet know if this is an intentional change.
I have confirmed that this change was intentional and was made by #54718.
The main purpose seems to be to match the look of the title in the editor and the frontend. It's also mentioned that we can't add or edit HTML in visual mode, so perhaps the ideal approach would be to implement a formatting toolbar in the title.
IMO, the change takes things in the right direction. It makes more sense to add the tags in the code editor view, since that's where html is generally added, and it's now also possible to view the result of the html tags in visual mode.
As @t-hamano mentioned, it's perhaps an issue that there's no way to add formatting visually and some users may have the code editor disabled. Perhaps we keep this issue open to discuss that aspect?
I've removed the bug label since it works as intended currently.
It might be better to keep this issue open as an "Enhancement" that adds a formatting toolbar to the post title when in visual mode.
Yeah, keeping this open for discussion on adding a formatting toolbar to the post title is great.
So you understand the use-case here:
Proper formatting of titles (books, albums, movies, etc) is to italicize them. The publication I work for has covered culture for 50 years, and regularly italicizes titles in their headlines (happened 3-4 times the day after the 6.5 update and nobody knew what was happening). Asking our editors to fire up the code editor to do something that should be part of normal editorial workflow seems like a lot, not to mention that inevitibly they will break something in the process.
Asking our editors to fire up the code editor to do something that should be part of normal editorial workflow seems like a lot, not to mention that inevitibly they will break something in the process.
@dansinker Another option is to use 'Quick Edit' from the post list to add the formatting, not sure if that's any easier.
@talldan yes, that's what we've instructed them to do, but it's still a slower process than what they had before. ultimately it really does seem like if the idea is that the visual editor should allow for visual editing only, then adding visual editing to the title is the correct solution.
+1 to the idea of the Post Title box having a basic toolbar for formatting, such as Italics. Our users don't have the ability to access Code Editor, but still need to be able to use italics (for things like the scientific name of plants). Thanks @talldan so much for the suggestion of using Quick Edit as a workaround for now!
+1 for the formatting toolbar for the Post Title.
I've observed since updating to 6.5 that the &
character is converted to &
in the post title as soon as it's typed, regardless of the user's role or capabilities. The encoded character then gets saved to the database.
Having &
converted by KSES on save for users without the necessary capabilities has been a longstanding problem (see #20490), but this seems different.
I'm not positive that this change in behavior is caused by the same change being discussed here, so feel free to direct my comment to a better place if there is one.
Description
Since the most recent update, adding HTML tags in the visual editor no longer work. Not only will it not apply the requested HTML but also appears visibly in the published post title.
Previously, it was possible to add HTML tags in the visual editor. HTML tags do appear as expected when inputted in the code editor.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
This is how it would look in the visual editor:![html-tag1](https://github.com/WordPress/gutenberg/assets/35075802/dbafcacb-469e-481c-aab7-f3b65c90f061)
This is the expected outcome:![html-tag3](https://github.com/WordPress/gutenberg/assets/35075802/e35e8d7b-b088-487f-8141-1f2e6bec7f90)
And this was the actual result:![html-tag2](https://github.com/WordPress/gutenberg/assets/35075802/8120c9a1-5e0f-4924-9aa1-671cdeb32119)
Environment info
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes