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
Redesigned Toolbar Custom Definition API #388
Comments
Ideas for the next version import React from "react";
import MDEditor, { Command, Title3 } from '@uiw/react-md-editor';
export default function App() {
const [value, setValue] = React.useState("**Hello world!!!**");
return (
<div className="container">
<MDEditor value={value} onChange={setValue}>
<Command>
<Title3 name="title3" keyCommand="title3" />
<Command>
<Title1 />
<Title2 />
<Title3 name="title3" keyCommand="title3" width="12" height="12" buttonProps={{ 'aria-label': 'Insert title'}}>
<Icon />
</Title3>
</Command>
</Command>
</MDEditor>
<MDEditor.Markdown source={value} style={{ whiteSpace: 'pre-wrap' }} />
</div>
);
} |
@am0029 add new toolbar, can remove Blod react-md-editor/core/src/commands/index.ts Lines 176 to 198 in 1439686
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is no good way to define icon size.
Because there needs to be an easier way to define toolbars. Unless we redesign the toolbar definition API.
Similar to the API design below:
This one has more work and can be considered for expansion in the next version. The only solution so far is as follows:
@jeepers3327
Originally posted by @jaywcjlove in #387 (comment)
The text was updated successfully, but these errors were encountered: