BookStack icon indicating copy to clipboard operation
BookStack copied to clipboard

Reliable Search Feature in Markdown Editor

Open rfde opened this issue 2 months ago • 1 comments

Describe the feature you'd like

I would like a reliable search functionality in the markdown editor. Search capabilities in the markdown editor are very limited, as already discussed in #5186. When using the browser search (with Firefox 144 on Linux), I encounter the following issues:

  1. If the preview window is enabled, the browser prefers to search the preview pane, even if the editor is in focus
  2. If the preview window is disabled, it is possible to search in the markdown editor. However, if the page has a lot of content, the browser search does not cover all of it. I assume that, for long pages, the editor control does not render the bits of the page that are far out of view. You have to scroll down to search the full page (and, of course, you need to be aware of this issue -- otherwise, you might wrongly assume that your search did not yield any results).
  3. For long pages, I would also like to be able to use the search as a navigation feature (e.g., if I want to edit a paragraph somewhere in the middle of the page, I just search for the first few words of that paragraph to place the caret there). This is currently also impractical (due to issue 2).

For these reasons, I would love a reliable search functionality in the markdown editor (be it a functioning browser search or a JS implementation).

Describe the benefits this would bring to existing BookStack users

  • Users would be able to search in the markdown editor more easily and intuitively
  • Users would not be mislead by an empty search result despite there being matches outside the current view
  • Users could navigate long pages more easily

Can the goal of this request already be achieved via other means?

Recently, the plaintext view was introduced. While it addresses issues 1 and 2 to a certain extent (and with a limited editing experience), it does not solve the search-to-navigate issue. In particular, it is not possible to switch to the plaintext view, perform the search to scroll to a particular paragraph, and then switch back to the CodeMirror editor, because the editor scrolls back to the top whenever toggling between those views.

Have you searched for an existing open/closed issue?

  • [x] I have searched for existing issues and none cover my fundamental request

How long have you been using BookStack?

3 months to 1 year

Additional context

No response

rfde avatar Nov 12 '25 11:11 rfde

Same issue here, it's really difficul to update existing pages using the markdown editor.

morrolinux avatar Nov 12 '25 13:11 morrolinux