Using markdown to document the nodes while adhering to node-red style guide #60
Replies: 3 comments 3 replies
-
Like it 😊 Will it be possible to break into html as well if needed? |
Beta Was this translation helpful? Give feedback.
-
@knolleary what are you thoughts on this making its way into 2.1? Is there time? Regarding the question about enabling/disabling/globally applied to markdown, I think the syntax is sufficiently specific (see example below) as to not be stumbled upon by accident. Also, as we would want this to work in the node description markdown, there are not may other places this would cause a problem example... |
Beta Was this translation helpful? Give feedback.
-
PR Here |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Request
As raised by mannharleen in the forum...
Additional info
Node documentation already supports markdown documentation via a script tag with
type
attribute set to"text/markdown"
......however, there is currently no means of styling the markdown to node-red documentation style guildlines.
Proposed Solution
marked
extensions to convert markup from markdown text to generate HTML that adheres to the Node help style guideProposed markup
Result before custom extensions...
Result after custom extensions...
Issues / Hurdles
marked
adds a<p>
to ordered lists. This causes the text after a number in the numbered list to be on a new line. To fix this, a new style rule is required...enableExtensions
in the custom extensions callbacks and return tokens/renderings based on its state.Working demo
http://jsfiddle.net/4uwfeb6n/6/
Additional
Tables are currently rendered with very little style making them hard to read. This proposal would also like to include CSS for node-help tables...
Markdown (standard table syntax)...
Current rendering of table in node-red help side-bar...

With proposed CSS...

Beta Was this translation helpful? Give feedback.
All reactions