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

Tweet fallback to text on copy #3088

Merged
merged 1 commit into from
Sep 30, 2022
Merged

Tweet fallback to text on copy #3088

merged 1 commit into from
Sep 30, 2022

Conversation

zurfyx
Copy link
Member

@zurfyx zurfyx commented Sep 29, 2022

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

@vercel
Copy link

vercel bot commented Sep 29, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
lexical ✅ Ready (Inspect) Visit Preview Sep 29, 2022 at 8:58PM (UTC)
lexical-playground ✅ Ready (Inspect) Visit Preview Sep 29, 2022 at 8:58PM (UTC)

@thegreatercurve
Copy link
Contributor

@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);
Copy link
Contributor

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.

@thegreatercurve thegreatercurve merged commit 7c1b1cd into main Sep 30, 2022
@thegreatercurve thegreatercurve deleted the clip-tweet branch September 30, 2022 09:10
@thegreatercurve
Copy link
Contributor

thegreatercurve commented Sep 30, 2022

@zurfyx Sorry, I merged this ahead of a sync in error. I think the suggestions can be applied in a separate PR though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants