mirror of
https://github.com/muerwre/markdown-home-tab.git
synced 2025-04-25 00:46:41 +07:00
moved delete button to editor
This commit is contained in:
parent
02333e6049
commit
ece7395b26
5 changed files with 14 additions and 20 deletions
|
@ -11,6 +11,7 @@ interface MarkdownEditorContainerProps {
|
|||
id: string;
|
||||
locked: boolean;
|
||||
startEditing: () => void;
|
||||
remove: () => void;
|
||||
}
|
||||
|
||||
const RichEditor = lazy(() =>
|
||||
|
@ -23,6 +24,7 @@ export const MarkdownEditorContainer: FC<MarkdownEditorContainerProps> = ({
|
|||
id,
|
||||
locked,
|
||||
startEditing,
|
||||
remove,
|
||||
}) => {
|
||||
const {
|
||||
settings: { richEditorEnabled },
|
||||
|
@ -39,7 +41,7 @@ export const MarkdownEditorContainer: FC<MarkdownEditorContainerProps> = ({
|
|||
);
|
||||
|
||||
const editor = (
|
||||
<EditorWrapper onSave={startEditing}>
|
||||
<EditorWrapper save={startEditing} remove={remove}>
|
||||
{richEditorEnabled ? (
|
||||
<RichEditor value={value} onChange={setValue} locked={locked} />
|
||||
) : (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue