Repository navigation
CMS: link button for the Context fields - #388
Merged
Merged
Conversation
Switch the 12 Work/Events Context fields from the plain text widget to the markdown widget, limited to bold, italic, link and lists. The site already renders Context as Markdown, so editors no longer have to type [text](https://url) by hand.
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.
Why
Editors add hyperlinks to Context by typing
[text](https://url)by hand. The project and event templates already render Context as Markdown (MarkdownView), so the only thing missing was an editor with a link button.Change
static/admin/config.yml: all 12 Context fields (7 Work + 5 Events collections) change fromwidget: "text"towidget: "markdown":editor_components: [], so there are no image or code-block inserts in Context.No template or content changes.
Verified: real Decap 3 (same bundle as production), local
decap-serveron a scratch copy of the repo[Kerala](https://…)pluscontext: >→>-(trailing newline only). CORD's single line breaks are kept.budgets-for-justice(list + 4 links + bold): adding a link via the button saved cleanly. Context changes only-→*list markers.<li>, existing links untouched.Decap re-serializes the whole front matter on any save (e.g. flow-style
resources→ block style,nullfor empty fields), with either widget. That already happens today and is not caused by this change.Fixes #389