]> BookStack Code Mirror - bookstack/blobdiff - resources/assets/js/vues/page-editor.js
Adds edit icon to each header in the page.
[bookstack] / resources / assets / js / vues / page-editor.js
index 020e371b03021b85f9fe41fb7966c405032c18cb..3796fbf655dc21548105ab1dd30424d66701519c 100644 (file)
@@ -43,6 +43,13 @@ function mounted() {
     window.$events.listen('editor-markdown-change', markdown => {
         this.editorMarkdown = markdown;
     });
+
+    const scrollToText = window.location.hash ? window.location.hash.substr(1) : '';
+    if (scrollToText) {
+        setTimeout(() => {
+            window.$events.emit('editor-scroll-to-text', scrollToText);
+        }, 1000)
+    }
 }
 
 let data = {