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 #1675
This commit is contained in:
parent
e06f9f7fe3
commit
865e8d4ec5
7 changed files with 39 additions and 6 deletions
resources/js/components
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue