Updated WYSIWYG edtitor to be iOS scrollable

Fixes #1058
This commit is contained in:
Dan Brown 2019-06-16 11:55:01 +01:00
parent fbb2b7ac6a
commit 7b506447c7
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9
2 changed files with 7 additions and 5 deletions

View File

@ -69,8 +69,8 @@ let methods = {
autoSave = window.setInterval(() => {
// Return if manually saved recently to prevent bombarding the server
if (Date.now() - lastSave < (1000 * autoSaveFrequency)/2) return;
let newTitle = document.getElementById('name').value.trim();
let newHtml = this.editorHTML;
const newTitle = document.getElementById('name').value.trim();
const newHtml = this.editorHTML;
if (newTitle !== currentContent.title || newHtml !== currentContent.html) {
currentContent.html = newHtml;
@ -84,14 +84,14 @@ let methods = {
saveDraft() {
if (!this.draftsEnabled) return;
let data = {
const data = {
name: document.getElementById('name').value.trim(),
html: this.editorHTML
};
if (this.editorType === 'markdown') data.markdown = this.editorMarkdown;
let url = window.baseUrl(`/ajax/page/${this.pageId}/save-draft`);
const url = window.baseUrl(`/ajax/page/${this.pageId}/save-draft`);
window.$http.put(url, data).then(response => {
draftErroring = false;
if (!this.isNewDraft) this.isUpdateDraft = true;

View File

@ -47,6 +47,8 @@
display: flex !important;
flex-direction: column;
align-items: stretch;
-webkit-overflow-scrolling:touch;
overflow:auto;
iframe {
flex: 1;
}