]> BookStack Code Mirror - bookstack/blobdiff - resources/js/wysiwyg/scrolling.js
Update docker-compose.yml
[bookstack] / resources / js / wysiwyg / scrolling.js
index f14ef4c643abe778c24e96ca0974aa8e4265bfb0..92f8f158323ca5b1c3a0ea5b828fb937dae1964b 100644 (file)
@@ -1,16 +1,3 @@
-/**
- * Scroll to a section dictated by the current URL query string, if present.
- * Used when directly editing a specific section of the page.
- * @param {Editor} editor
- */
-export function scrollToQueryString(editor) {
-    const queryParams = (new URL(window.location)).searchParams;
-    const scrollId = queryParams.get('content-id');
-    if (scrollId) {
-        scrollToText(editor, scrollId);
-    }
-}
-
 /**
  * @param {Editor} editor
  * @param {String} scrollId
@@ -26,4 +13,17 @@ function scrollToText(editor, scrollId) {
     editor.selection.select(element, true);
     editor.selection.collapse(false);
     editor.focus();
-}
\ No newline at end of file
+}
+
+/**
+ * Scroll to a section dictated by the current URL query string, if present.
+ * Used when directly editing a specific section of the page.
+ * @param {Editor} editor
+ */
+export function scrollToQueryString(editor) {
+    const queryParams = (new URL(window.location)).searchParams;
+    const scrollId = queryParams.get('content-id');
+    if (scrollId) {
+        scrollToText(editor, scrollId);
+    }
+}