-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add Block: Bookmark/HTML Anchor #1734
Comments
I've been thinking a bit about this one and I believe we should add it as an optional (maybe advanced) setting to all blocks. It could look like "add anchor id" or "link directly to this block" with an explanation of how it works. We could check that the id is unique. It'd be nice if this setting could live at the bottom of the inspector, somehow. Maybe together with a trash this block? It shouldn't get in the way. |
+1+1 that sounds like a great approach, and good use of the advanced block interface. |
I would also +1 to this being an advanced setting over a new block. |
Punting. |
Some technical thoughts about this: An advanced option for all blocks: Does this mean we create a wrapper for all blocks? It would have a big impact on parsing. |
Feature request for html anchor on image blocks. Or better still added to all blocks! |
FYI, Header blocks already have an anchor field (inside 'Advanced'); it works. In actuality, all it does is apply a custom ID to the Header block, which you can link to as an anchor. This is according to HTML5 spec. Technically all Gutenblocks could have a custom ID, useful for all kinds of things, not just anchors. As for an actual Anchor block, personally I would find it useful because I like to place hidden anchors higher up on a page so that when the user clicks an anchor link, the anchor content starts 1/3 down the screen rather than the top edge --- a more pleasant experience. This is done with something like |
This is true, but we should have an option to hide the heading also, so that the user can create an anchor without having to display a heading block |
This could either be a separate block, as this ticket suggests, or a part of #887. The purpose would be to let you create an HTML anchor — a bookmark down the page, so you could link to a specific section.
What would it look like? Would it be somehwat like #983? Would it be visible on the front-end, like perhaps a small hash mark in the side? It seems worth looking at how WYSIWYG HTML editors like Dreamweaver has done this in the past.
The text was updated successfully, but these errors were encountered: