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

Change a text block wrapper after it is specified. #50

Closed
jarrodhroberson opened this issue Nov 16, 2023 · 4 comments
Closed

Change a text block wrapper after it is specified. #50

jarrodhroberson opened this issue Nov 16, 2023 · 4 comments

Comments

@jarrodhroberson
Copy link

If you click on the / and select H1 and later want to make it an H2 is there a way to do this?
Or any other root level text block definition after the fact?

If would be nice to be able to click on the H1 in this example and change it after you have written something and not have to do a copy/delete/paste with no formatting dance that I seem to have to do now.

Am I missing something?

@areknawo
Copy link
Collaborator

Currently, the easiest way to switch formatting is with Markdown shortcuts. For headings, just add # to ###### before the text. You can learn about all the shortcuts here.

That said, I see how adding UI for that could be useful. It can be e.g. a separate button/switch next to the block (e.g. H1 to H6 indicators now) or a select in the formatting toolbar (like in Notion).

Do you have any recommendations for that?

@jarrodhroberson
Copy link
Author

jarrodhroberson commented Nov 18, 2023

The principle of least surprise way of doing it would be able to just click on the H1 and get the drop down like you initially do.

I have tried to figure out how to make it work and submit a pull request but not having any luck.

Thanks for the hints about the short cuts, I did not realize I could do that.

@areknawo
Copy link
Collaborator

Makes sense. Originally, the "heading badges" were meant to easily distinguish between headings - especially the smaller ones (e.g. H4 - H6). They're :before elements, so making them interactive will require a very different approach.

Still, that's a good suggestion and I'll look into/experiment with it.

@areknawo
Copy link
Collaborator

areknawo commented Feb 6, 2024

Screenshot 2024-02-06 at 20 18 47

v0.4 adds a new drag handle which, upon clicking, displays a menu to switch text and list node types.
For heading nodes, the HX badge is used as a drag handle and menu activator.

@areknawo areknawo closed this as completed Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants