Repository navigation
feat(content): make adding HTML easy to find in the Content Editor - #1353
Merged
Merged
Conversation
The HTML block was behind a text-less </> icon. The toolbar's button now reads "Add HTML", and on an empty line between the page's blocks a small menu offers what can go there, as Webflow does: an HTML block, a table or an image on that line. It uses @tiptap/react's own FloatingMenu (already installed with it), and stays off an empty page, which shows its placeholder there. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Collaborator
Author
|
@gkhngyk this makes the HTML block easy to find: an 'Add HTML' label on the toolbar button, and an 'Add · HTML · Table · Image' menu on an empty line, using @tiptap/react's FloatingMenu (optional dep, already in yarn.lock; no new package). It touches the editor's page.test.tsx and en.json like #1347–#1351, in other places. |
gkhngyk
approved these changes
Oct 22, 2026
gkhngyk
left a comment
Contributor
There was a problem hiding this comment.
Looks good. One optional nit.
_toolbar.tsx:167withweb/messages/en.json:3628: the button now shows "Add HTML", but its accessible name is still "Add an HTML block". Someone using voice control who says "click Add HTML" won't match it (WCAG 2.5.3, label in name). Make the label contain the visible words, e.g. "Add HTML block".
Checked, and fine:
- HTML goes through the same paths. The menu's HTML opens the existing
HtmlBlockDialog. Its code is stored base64-encoded indata-html-block, shown as text in the editor and never run. Table and Image use the toolbar's own commands. A paste still goes throughcleanHtmlwithkeepHtmlBlocks: false, so a page pasted from elsewhere can't plant an HTML block, and every save is checked again bysanitizeDraftHtml. - No new package.
@tiptap/[email protected]is an optional dependency of@tiptap/reactand is already inyarn.lock. Its peer@floating-ui/domis there too (1.8.0).package.jsondoesn't change, so a frozen-lockfile install on Node 20 is unaffected.
Merge notes
- Merges cleanly on main and with #1346, #1347, #1348, #1349, #1350 and #1351. It only touches the toolbar, so it can go first. No migration.
Tested on top of main together with #1353, #1347, #1348, #1350 and #1351: web and server tests, tsc, lint and Prettier pass.
This was referenced Oct 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Content Editor feedback item 14: "Add HTML anywhere in the text, as in Webflow". The HTML block already existed (#1260), but only behind the toolbar's text-less
</>icon, so it went unnoticed.@tiptap/react/menus'FloatingMenu. Its@tiptap/extension-floating-menuis an optional dependency of@tiptap/reactand is already inyarn.lock, so no package is added.onEmptyLinedecides where it shows: an empty top-level paragraph, in a page with something on it. An empty page shows its placeholder there instead.mousedownprevented), so the block goes in where the cursor is.Not in this PR (possible follow-ups):
Related issue
Content Editor feedback round (no issue).
Type of change
feat— New featurefix— Bug fixchore— Maintenance / dependenciesdocs— Documentation onlyrefactor— Code change that neither fixes a bug nor adds a featuretest— Adding or updating testsHow to test
yarn testcoversonEmptyLinewith a real editor (_toolbar.test.ts) and the toolbar's label.Checklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/)yarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)Also run:
yarn test(2633 tests pass) andyarn build. Checked in the browser: the menu shows next to the empty line and opens the HTML block dialog.🤖 Generated with Claude Code