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

feat: support copy/pasting tag link nodes in rich text mode #177

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

aalear
Copy link
Member

@aalear aalear commented Jul 13, 2022

This PR addresses tag link serialization for #56.

The core of the change is switching from NodeView to a schema definition with appropriate toDOM/parseDOM implementations.

It looks like we never wrote tests for the original NodeView nor do we have existing tests for other schema specifications. I'm happy to take a stab at adding some, but for now I left them out.

Also note that pasting from a final rendered document is not currently supported. Part of the issue is that public Q&A still uses .post-tag rather than .s-tag from Stacks. I'm not sure if it's worth adding .post-tag checks into the editor repo. Feels like we should be moving towards making the Q&A rendering use Stacks classes instead, although that's also a non-trivial undertaking.

@netlify
Copy link

netlify bot commented Jul 13, 2022

Deploy Preview for stacks-editor ready!

Name Link
🔨 Latest commit 0601f85
🔍 Latest deploy log https://app.netlify.com/sites/stacks-editor/deploys/630e4972483aa70008aafe4e
😎 Deploy Preview https://deploy-preview-177--stacks-editor.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@aalear aalear changed the title bkelly/tag link todom Support copy/pasting tag link nodes in rich text mode Jul 13, 2022
@aalear aalear marked this pull request as ready for review July 13, 2022 21:33
@aalear aalear requested a review from b-kelly July 13, 2022 21:35
@aalear aalear changed the title Support copy/pasting tag link nodes in rich text mode feat: support copy/pasting tag link nodes in rich text mode Jul 13, 2022
@aalear
Copy link
Member Author

aalear commented Aug 16, 2022

@b-kelly I re-tested this the other day and I think everything is good to go. No feature-related changes needed after #158 went in.

Copy link
Collaborator

@b-kelly b-kelly left a comment

Choose a reason for hiding this comment

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

TODO needs tests

I'll add these asap so we can merge.

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.

Ensure that custom nodes are serialized/deserialized to/from html properly
2 participants