mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-21 22:36:05 +08: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 #1675
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user