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

Allow to add markup in HTML mode #298

Open
peerfischer opened this issue Apr 26, 2024 · 1 comment
Open

Allow to add markup in HTML mode #298

peerfischer opened this issue Apr 26, 2024 · 1 comment
Labels
feature request New feature or request

Comments

@peerfischer
Copy link

What are you trying to do?

I try to add a custom CSS class to a H2 tag

What's your proposed solution?

allow custom markup if HTML mode ist enabled in config

Additional context

No response

@peerfischer peerfischer added the feature request New feature or request label Apr 26, 2024
@engram-design
Copy link
Member

This is by design with ProseMirror and its schema. You can't just add arbitrary HTML and have it save against a node. So while you can edit the raw HTML of the field, it won't necessarily save everything as you input it. This is to ensure that the HTML can be effectively represented as blocks of content (JSON).

This is true for HTML elements (the tags) and the attributes on the tag. We would need to modify the default Heading tag to allow for any additional attributes we want to support.

See #255

We need to look at ways to force-save node attributes in some fashion, but it's going against both Tiptap and ProseMirror.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants