We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Исходная компонента
import React from 'react'; import { MarkdownEditorView, useMarkdownEditor, } from '@gravity-ui/markdown-editor'; import { toaster } from '@gravity-ui/uikit/toaster-singleton-react-18'; import { configure } from '@gravity-ui/markdown-editor'; configure({ lang: 'ru', }); type Props = { onChange: (value: string) => void; }; export function Editor({ onChange }: Props) { const editor = useMarkdownEditor({ initial: { toolbarVisible: true, }, }); React.useEffect(() => { function changeHandler() { const value = editor.getValue(); onChange(value); } editor.on('change', changeHandler); return () => { editor.off('change', changeHandler); }; }, [editor, onChange]); return ( <MarkdownEditorView stickyToolbar toaster={toaster} editor={editor} settingsVisible={false} className="markdown-editor-wrapper" /> ); }
Проблема - если наш эдитор поставить в тег тогда при клике будет срабатывать кнопка "Отменить"
<label> <Editor onChange={setDescription} /> </label>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
Исходная компонента
Проблема - если наш эдитор поставить в тег тогда при клике будет срабатывать кнопка "Отменить"
Screen.Recording.2024-10-25.at.18.18.20.mov
The text was updated successfully, but these errors were encountered: