mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-12 02:00:28 +03:00
Add editor history (#1284)
* add slate editor history * reset mark on editor reset
This commit is contained in:
parent
bc5e7445d9
commit
41f67cabc0
6 changed files with 30 additions and 6 deletions
|
|
@ -124,6 +124,15 @@ export const resetEditor = (editor: Editor) => {
|
|||
});
|
||||
|
||||
toggleBlock(editor, BlockType.Paragraph);
|
||||
removeAllMark(editor);
|
||||
};
|
||||
|
||||
export const resetEditorHistory = (editor: Editor) => {
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
editor.history = {
|
||||
undos: [],
|
||||
redos: [],
|
||||
};
|
||||
};
|
||||
|
||||
export const createMentionElement = (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue