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

Support replacing the built in ProseMirror nodes and marks with custom nodes and marks #3648

Merged
merged 3 commits into from
May 5, 2021

Conversation

jacksleight
Copy link
Contributor

I've been looking into extending the Paragraph and Heading nodes to allow the addition of extra attributes. While it is currently possible to add new node types to the ProseMirror renderer, it is not possible to replace the built in ones. This functionality exists in the ProseMirror Renderer (Statamic is already using it to replace the Image node), but the Augmentor class does not expose a way for addons etc. to access it. This commit adds that ability.

…m nodes and marks

I've been looking into extending the Paragraph and Heading nodes to allow the addition of extra attributes. While it is currently possible to add new node types to the ProseMirror renderer, it is not possible to replace the built in ones. This functionality exists in the ProseMirror Renderer (Statamic is already using it to replace the Image node), but the Augmentor class does not expose a way for addons etc. to access it. This commit adds that ability.
@jackmcdade jackmcdade requested a review from jasonvarga May 5, 2021 17:20
Copy link
Member

@jasonvarga jasonvarga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jasonvarga jasonvarga merged commit c5a32c7 into statamic:master May 5, 2021
@jasonvarga
Copy link
Member

Oops, I didn't realize you targeted the master branch. Should have been 3.1.

jasonvarga pushed a commit that referenced this pull request May 5, 2021
@jacksleight
Copy link
Contributor Author

Oh whoops, sorry. Should I resubmit?

jasonvarga added a commit that referenced this pull request May 5, 2021
PR #3648 was merged without noticing it was targeting the wrong branch.
@jasonvarga
Copy link
Member

Nope, sorted.

@jacksleight jacksleight deleted the patch-1 branch May 6, 2021 10:37
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

Successfully merging this pull request may close these issues.

2 participants