-
Notifications
You must be signed in to change notification settings - Fork 808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Markdown support as a Markdown-specific Gutenberg Block #9201
Comments
Related: #7786 |
Added mockups for each iteration in main issue. |
What do you think about exposing basic formatting in edit mode without the need to preview. Maybe only for headings, bold, italic, links, code. No need to do it for more complex constructs like tables. Here is what the in-editor formatting could look like: # Example## Sub-exampleHello, **surrounded by double asterisks** text is bold, _by underscores_ or *single asterisk* is italic, If we decide to include it, how does it affect your current iteration plan? |
One more question – why converting to markdown on the server and not on the client? What are the trade-offs? |
@nb That is something I was thinking about. While I don't think we should highlight them as a preview, I do think we should highlight them to make it clear what is being formatted. For example, Ulysses doesn't show a preview, but does highlight it in a way that is preview-ish. This way, the user gets a good idea of how their markdown is working. We also wouldn't be jumping between font sizes. I do think we'll eventually want a full preview that hides the markdown characters and renders it the way the rest of the standard blocks look. Here's a screenshot from Ulysses: |
I think this is an interesting idea. My initial thoughts are:
It would be interesting to test it.
In an additive way, it seems like a separate enhancement task which can be done anytime after the the first iteration.
This is a great question. I was given some guidance by @mtias, it included:
My current thoughts on this are as follows:
When I first began to map out the development path for this I thought that client side Markdown rendering would be ideal. I searched candidate open source parsers, deconstructed GitHub's parser a little, and analysed Calypso's Markdown parser. It seemed to me that, given the fact that server-side Markdown rendering is not going away, there were two options for the
I must say that, I would prefer that this be a client concern only and that we share a single dependency with Calypso for client side Markdown rendering. When choosing a development path, it seems to me, using server side rendering seems like a prudent first pass. I see client side rendering as another separate enhancement task to the previewing functionality. It does not fundamentally change the user experience just provides a little speed to see the preview. I have not researched the exact steps to execute each option. I will have to do it by the second iteration.
Server Side trade-offs
Client Side trade-offs
|
@MichaelArestad I agree with you and also think that it is worth differentiating, it is not really a "Preview" but rather a markup functionality hint.
|
Thanks for the answers, @nuzzio and @MichaelArestad. I totally agree with both of you that the exposing the formatting is just a hint and should independent from the full preview, which is both a helpful and a must-have feature. |
As for client side vs. server side, there is another option that I didn't see above – can we keep it 100% client-side by storing the rendered HTML in the serialized block in P.S. I so much wish GitHub had threaded conversations… |
One more question – how do we reconcile Jetpack’s per-post Markdown option and the per-block markdown rendering discussed here? |
I do think that this is the ultimate solution, I would like to avoid the dynamic block. I also agree that I think the Are there any examples of this that you would suggest looking at? Your second question:
I think the user contract of the classic implementation had two key parts:
I think we can stay true to those two things within the block metaphor. We could make the changes clear to the user in the settings text:
to something like
What do you think? |
One potential issue I see with the per-block vs. per-post issue: footnotes. With a per-post perspective, the footnotes end up at the bottom of the post. With a Gutenberg Markdown block, I assume the footnotes should still end up at the bottom of the post, but is that a given? |
That is a good point. The current footnote functionality exists in the Jetpack Markdown module in PHP. If it becomes 100% client side, there will be edge cases like this that will require parity. |
I will be continuing comments on the pull request: #9357 |
The reasoning behind this feature addition is to add the ability to save and edit Markdown in posts when using Gutenberg. This would restore the spirit of the classic editor Markdown implementation.
Additional reasons are:
By @MichaelArestad
By @mtias
Implementation Approach:
First Iteration
Implement a Markdown block as a simple field with no preview functionality.
Second Iteration
Implement a live preview functionality like in Calypso.
Third Iteration
Optimize UX by implementing formatting buttons which can wrap text elements in the chosen markup, i.e. bold to bold
I believe this one will require some discussion of the interactions with the toolbar since some of them may be unexpected in current patterns e.g.
vs
Those considerations are further down the road but worth noting.
Tasks for First Iteration
Sub-tasks to be added as specific changes are determined
TBD
The text was updated successfully, but these errors were encountered: