From 3c53e14229b204347cfc3aa0e6982ff95592bfd0 Mon Sep 17 00:00:00 2001 From: Peter Stuifzand Date: Fri, 7 Jan 2022 20:37:44 +0100 Subject: [PATCH] Problem: there are no easy ways to create a page from search Solution: add create new page option to search results --- editor/src/search.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/editor/src/search.js b/editor/src/search.js index 8114831..6368ed7 100644 --- a/editor/src/search.js +++ b/editor/src/search.js @@ -20,6 +20,12 @@ function startQuery(query) { .then(res => res.json()) .then(data => { let actualResult = []; + actualResult.push({ + ref: query, + title: 'Create new page "' + query + '"', + line: 'New page', + text: 'New page', + }) $.each(data.hits, (key, value) => { actualResult.push({ ref: value.fields.page,