Repository navigation
fix(pages): edit the stored markdown even when editor says wysiwyg - #26
Open
davidgibbons wants to merge 1 commit into
Open
davidgibbons wants to merge 1 commit into
davidgibbons wants to merge 1 commit into
Conversation
Pages created through the API with a markdown body report editor "wysiwyg". selectSource trusted the label, patched raw_html and wrote html back, which made BookStack clear the markdown source. Clients that read that source, such as ha-bookstack-sync, then saw a different page. A non-empty markdown field now wins, since BookStack empties it whenever html is saved.
davidgibbons
force-pushed
the
fix/markdown-source-over-editor-label
branch
from
October 3, 2026 01:01
ed944d8 to
5e2f38b
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pages created through the BookStack API with a
markdownbody reporteditor: "wysiwyg".selectSourcetrusted that label, sobookstack_pages_edit,bookstack_pages_appendand the section tools patchedraw_htmland wrotehtmlback. BookStack then cleared the page'smarkdown, and any client that reads that source sees a different page. ha-bookstack-sync, for example, flags every such page as tampered and stops updating it.A non-empty
markdownfield now selects the markdown path regardless ofeditor. BookStack emptiesmarkdownwhenever html is saved, so a non-empty value is the page's real source. The empty-markdown-page case keeps its existing behaviour. A unit test covers the wysiwyg-labelled markdown page, and all 226 unit tests pass.