mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-17 05:42:06 +00:00
Changed autosave handling for better editor performance
This changes how the editors interact with the parent page-editor compontent, which handles auto-saving. Instead of blasting the full editor content upon any change to that parent compontent, the editors just alert of a change, without the content. The parent compontent then requests the editor content from the editor component when it needs that data for an autosave. For #3981
This commit is contained in:
parent
31495758a9
commit
6545afacd6
5 changed files with 64 additions and 31 deletions
resources/js/components
|
@ -137,4 +137,13 @@ export class MarkdownEditor extends Component {
|
|||
return drawioAttrEl.getAttribute('drawio-url') || '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the content of this editor.
|
||||
* Used by the parent page editor component.
|
||||
* @return {{html: String, markdown: String}}
|
||||
*/
|
||||
getContent() {
|
||||
return this.editor.actions.getContent();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue