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

Custom markdown tag with action #493

Open
jstiburek opened this issue Mar 27, 2023 · 9 comments
Open

Custom markdown tag with action #493

jstiburek opened this issue Mar 27, 2023 · 9 comments

Comments

@jstiburek
Copy link

Hello,
I have kinda similar use case as issue #454.

Is there way to catch a char in actual writing with rehypeRewrite ?
I want to detect when user write @ and show him options to select users to tag. Then replace text behind @ with selected option.

Thank you

@jaywcjlove
Copy link
Member

I think it should be possible. @jstiburek

@jstiburek
Copy link
Author

jstiburek commented Mar 27, 2023

I tried it but it's detecting whole string not by a character. :/
I mean all text from editor, it doesn't detect when I'm typing. @jaywcjlove

@jaywcjlove
Copy link
Member

It may not be easy to achieve, but would you like to listen to the input event of the input box in the preview area? @jstiburek

@jstiburek
Copy link
Author

jstiburek commented Mar 28, 2023

why preview area? shouldn't that be an editor area? or you mean listen in preview area and do action in an editor area? kinda confused @jaywcjlove

@jstiburek
Copy link
Author

@jaywcjlove any idea here? or will I have to go another way?

thanks

@jaywcjlove
Copy link
Member

This is easy to achieve if you replace @xxx in the preview area, I don't know if you think so.

@jstiburek

@jstiburek
Copy link
Author

@jaywcjlove

I will look more into it. You mean to add tag in editor mode and check and pop submenu in editor mode right?

@jaywcjlove
Copy link
Member

Oh, you confuse me, I don't understand what you want?

Do you need the following 👇 this effect?

image

Or 👇:

image

@jstiburek
Copy link
Author

@jaywcjlove sorry for confusion, first one

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

No branches or pull requests

2 participants