-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Tweet fallback to text on copy #3088
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@zurfyx Maybe want to do the same for YouTube nodes as well? |
@@ -175,6 +175,8 @@ export class TweetNode extends DecoratorBlockNode { | |||
exportDOM(): DOMExportOutput { | |||
const element = document.createElement('div'); | |||
element.setAttribute('data-lexical-tweet-id', this.__id); | |||
const text = document.createTextNode(this.getTextContent()); | |||
element.append(text); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would even say a link for this type of thing - differs by decorator, I suppose.
@zurfyx Sorry, I merged this ahead of a sync in error. I think the suggestions can be applied in a separate PR though. |
Very opinionated PR but I think having a fallback to text for non-Lexical editors is a much better experience
Screen.Recording.2022-09-29.at.4.53.50.pm.mov