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

Feature: Highlight special strings #6610

Open
mbohovic opened this issue Sep 8, 2024 · 6 comments · May be fixed by #6860
Open

Feature: Highlight special strings #6610

mbohovic opened this issue Sep 8, 2024 · 6 comments · May be fixed by #6860
Labels
enhancement Improvement over existing feature

Comments

@mbohovic
Copy link

mbohovic commented Sep 8, 2024

Description

Maybe someone has already mentioned it somewhere, but I haven't seen anything like that.

I would like a specific string in the text to be highlighted, but I don't know what functions to use for that (if they exist).

The reason is that in the text I use e.g. actually variables in the form [variableName] and I would like to have them highlighted in the editor.

e.g. I have a text:
What is Lorem Ipsum?
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown [printer] took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries

and I want to automatically have [printer] highlighted in the text, e.g. backgroundColor: yellow.

Thank you for any advice

@mbohovic mbohovic added the enhancement Improvement over existing feature label Sep 8, 2024
@mbohovic mbohovic changed the title Feature: Feature: Highlight special chars Sep 8, 2024
@mbohovic mbohovic changed the title Feature: Highlight special chars Feature: Highlight special strings Sep 8, 2024
@tope96
Copy link

tope96 commented Sep 26, 2024

I am also looking for a solution to this!

@citruscai
Copy link
Contributor

@etrepum do you think it would be good idea to try tackling this?

@etrepum
Copy link
Collaborator

etrepum commented Nov 5, 2024

@citruscai I think it could be worth making an example, maybe another kind of node + plugin in the playground or a standalone example. I think the useLexicalTextEntity facility would be appropriate for this, you can use the Hashtag plugin as a reference for how something like this could be done.

@citruscai
Copy link
Contributor

@citruscai I think it could be worth making an example, maybe another kind of node + plugin in the playground or a standalone example. I think the useLexicalTextEntity facility would be appropriate for this, you can use the Hashtag plugin as a reference for how something like this could be done.

hi im trying to make a node and plugin and is there common procedure i should be aware of when making one? this would be my first time trying to make a package. im getting the "Are you sure this file exists" error when i try to test it

@etrepum
Copy link
Collaborator

etrepum commented Nov 13, 2024

It's not really clear to me what you're trying to do that prints that error but I would start with adding your code to the playground. Creating new packages is for stable, generic and reusable code.

@citruscai
Copy link
Contributor

It's not really clear to me what you're trying to do that prints that error but I would start with adding your code to the playground. Creating new packages is for stable, generic and reusable code.

i realized that i was overcomplicating it a lot by trying to create an entire new package for this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement over existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants