AIEditor provides many shortcut keys for operating the document.
CTRL + S SaveDuring the editing process, users may be accustomed to pressing ctrl + s (command + s for Mac computers) to save user documents. We can configure onSave
to listen to the user's save button, and then perform our own save logic operation.
As shown in the following code:
new LinwitDocEditor({
element: "#aiEditor",
placeholder: "Click to enter content...",
onSave:(editor: LinwitDocEditor)=>{
//Save logic operation here
}
})