0
0
Fork 0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-05-18 22:31:04 +00:00

Improved markdown mobile editor experience

- Updated styles of codemirror area to be a bit more forefull in taking
up space.
- Added a fullscreen toggle as a backup option.

For 
This commit is contained in:
Dan Brown 2019-12-22 14:21:18 +00:00
parent e06f9f7fe3
commit 865e8d4ec5
No known key found for this signature in database
GPG key ID: 46D9F943C24A2EF9
7 changed files with 39 additions and 6 deletions
resources/js/components

View file

@ -76,6 +76,7 @@ class MarkdownEditor {
return;
}
if (action === 'insertDrawing') this.actionStartDrawing();
if (action === 'fullscreen') this.actionFullScreen();
});
// Mobile section toggling
@ -480,6 +481,13 @@ class MarkdownEditor {
});
}
// Make the editor full screen
actionFullScreen() {
const alreadyFullscreen = this.elem.classList.contains('fullscreen');
this.elem.classList.toggle('fullscreen', !alreadyFullscreen);
document.body.classList.toggle('markdown-fullscreen', !alreadyFullscreen);
}
// Scroll to a specified text
scrollToText(searchText) {
if (!searchText) {