1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-06 12:02:45 +03:00

MD Editor: Added plaintext/cm switching

Also aligned the construction of the inputs where possible.
This commit is contained in:
Dan Brown
2025-07-22 10:34:29 +01:00
parent 6b4b500a33
commit d55db06c01
6 changed files with 82 additions and 43 deletions

View File

@@ -10,6 +10,10 @@ export class CodemirrorInput implements MarkdownEditorInput {
this.cm = cm;
}
teardown(): void {
this.cm.destroy();
}
focus(): void {
if (!this.cm.hasFocus) {
this.cm.focus();