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
Support @ mentions #420
Comments
@enahs Example: https://codesandbox.io/embed/markdown-editor-for-react-uiwjs-react-md-editor-issues-420-vto6ge?fontsize=14&hidenavigation=1&theme=dark import React from "react";
import ReactDOM from "react-dom";
import { MentionsInput, Mention } from "react-mentions";
import Mentions from "rc-mentions";
import MDEditor from "@uiw/react-md-editor";
import "./index.css";
const mkdStr = `# Markdown Editor for [React]
**Hello world!!!**`;
function App() {
const [value, setValue] = React.useState(mkdStr);
return (
<div className="container">
<MDEditor
renderTextarea={(props, { onChange }) => {
return (
<Mentions
value={props.value}
onChange={(newValue) => setValue(newValue)}
>
<Mentions.Option value="light">Light</Mentions.Option>
<Mentions.Option value="bamboo">Bamboo</Mentions.Option>
<Mentions.Option value="cat">Cat</Mentions.Option>
</Mentions>
);
}}
height={200}
value={value}
onChange={setValue}
/>
</div>
);
}
ReactDOM.render(<App />, document.getElementById("container")); |
Super helpful. very useful feature. should add to the readme! |
33 tasks
This crashes whole markdown editor when trying to do other tasks |
hi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
allowing users to @ mention would be a helpful feature
The text was updated successfully, but these errors were encountered: