Add HistoryPlugin to the Editor UI component (#8603)

* Add HistoryPlugin to the Editor UI component

* Fix ESLint errors

---------

Co-authored-by: Praneeth Bhogaraju <praneeth.bhogaraju@ni.com>
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
pull/8585/head
Praneeth Bhogaraju 2023-05-02 19:59:52 +05:30 committed by GitHub
parent 1cea7f9760
commit 4b4c1200cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import { ListItemNode, ListNode } from "@lexical/list";
import { TRANSFORMERS } from "@lexical/markdown"; import { TRANSFORMERS } from "@lexical/markdown";
import { LexicalComposer } from "@lexical/react/LexicalComposer"; import { LexicalComposer } from "@lexical/react/LexicalComposer";
import { ContentEditable } from "@lexical/react/LexicalContentEditable"; import { ContentEditable } from "@lexical/react/LexicalContentEditable";
import { HistoryPlugin } from "@lexical/react/LexicalHistoryPlugin";
import { LinkPlugin } from "@lexical/react/LexicalLinkPlugin"; import { LinkPlugin } from "@lexical/react/LexicalLinkPlugin";
import { ListPlugin } from "@lexical/react/LexicalListPlugin"; import { ListPlugin } from "@lexical/react/LexicalListPlugin";
import { MarkdownShortcutPlugin } from "@lexical/react/LexicalMarkdownShortcutPlugin"; import { MarkdownShortcutPlugin } from "@lexical/react/LexicalMarkdownShortcutPlugin";
@ -87,6 +88,7 @@ export const Editor = (props: TextEditorProps) => {
<ListPlugin /> <ListPlugin />
<LinkPlugin /> <LinkPlugin />
<AutoLinkPlugin /> <AutoLinkPlugin />
<HistoryPlugin />
<MarkdownShortcutPlugin <MarkdownShortcutPlugin
transformers={ transformers={
props.disableLists props.disableLists