Edit non-markdown content in the WYSIWYG mode of the Static Site Editor
Problem to solve
Static site generators rely on markdown pages to organize content, but the content is almost never exclusively written in markdown. Many generators rely on additional markup to provide additional options not provided by Markdown and it is completely valid to write raw HTML alongside markdown content.
The problem is that when the Static Site Editor loads the markdown page contents, it expects to be able to render markdown into HTML for rich text formatting. If that content is not valid markdown, the editor can get tripped up and will attempt to format the code as standard paragraph content.
Intended users
User experience goal
The user should be able to edit content in the Static Site Editor that has been identified as something other than markdown and have it render appropriately.
Proposal
Building off of #216836 (closed), we should allow a user to edit the non-markdown content inline with the WYSIWYG editor.
A user should see a clear distinction between the rich-text formatting of markdown content in the WYSIWYG editor and the non-markdown content.
Further details
Ideas, no necessarily direction:
- We could format this as a kind of in-line code block and make the format feel like a code editor? Use a mono-spaced font and a dark background to make it clear that this rendering is of "code" and not what it will look like in the end.
- We would have to make a very clear distinction between this and an actual code block in markdown.
Documentation
Availability & Testing
What does success look like, and how can we measure that?
Acceptance criteria
- User can edit non-markdown content such as HTML, Ruby, or page includes using the WYSIWYG mode of the Static Site Editor.