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

How to use mentions? #490

Open
reinisg opened this issue Mar 14, 2023 · 2 comments
Open

How to use mentions? #490

reinisg opened this issue Mar 14, 2023 · 2 comments

Comments

@reinisg
Copy link

reinisg commented Mar 14, 2023

First of all, i saw this article:
#420 where is added nicely mentions
Then I was integrating this example and got renderTextarea is deprecated. I have no idea, how to build this into component to work as expected. Could someone help with this?

And additional thing, is it possible use nested array for mentions?

@jaywcjlove
Copy link
Member

* Use div to replace TextArea or re-render TextArea
* @deprecated Please use ~~`renderTextarea`~~ -> `components`
*/
renderTextarea?: ITextAreaProps['renderTextarea'];
/**
* re-render element
*/
components?: {
/** Use div to replace TextArea or re-render TextArea */
textarea?: ITextAreaProps['renderTextarea'];
/**
* Override the default command element
* _`toolbar`_ < _`command[].render`_
*/
toolbar?: ICommand['render'];
/** Custom markdown preview */
preview?: (source: string, state: ContextStore, dispath: React.Dispatch<ContextStore>) => JSX.Element;
};

@reinisg

@reinisg
Copy link
Author

reinisg commented Mar 14, 2023

Thank you for fast reply,
I think I have still problems to import those mentions, i also tried with different mentions plugin, still result is not as excepted https://codesandbox.io/s/ecstatic-bogdan-vxrdm7?file=/src/App.js

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