]> BookStack Code Mirror - bookstack/blobdiff - resources/js/markdown/actions.js
Search: Prevented negated terms filling in UI inputs
[bookstack] / resources / js / markdown / actions.js
index 4909a59d066f9627b3756e951be2079940369083..86e25532802384f471bf6896f7d2c8f845a844f1 100644 (file)
@@ -1,4 +1,4 @@
-import * as DrawIO from '../services/drawio';
+import * as DrawIO from '../services/drawio.ts';
 
 export class Actions {
 
@@ -73,7 +73,12 @@ export class Actions {
             const selectedText = selectionText || entity.name;
             const newText = `[${selectedText}](${entity.link})`;
             this.#replaceSelection(newText, newText.length, selectionRange);
-        }, selectionText);
+        }, {
+            initialValue: selectionText,
+            searchEndpoint: '/search/entity-selector',
+            entityTypes: 'page,book,chapter,bookshelf',
+            entityPermission: 'view',
+        });
     }
 
     // Show draw.io if enabled and handle save.