[Feature] Use FMTTYPE to flag if description contains markdown codes #450
Replies: 4 comments 6 replies
-
But how would the app determine whether there is markdown text or not? |
Beta Was this translation helpful? Give feedback.
-
With a new item if the markdown editor is in use (app setting) then set
Of course an app might be created to always assume markdown in which case it should always set Perhaps we should go one step further and also use |
Beta Was this translation helpful? Give feedback.
-
Personally I frequently use the options to switch between plain text and markdown formatted text, depending on the context and what is faster for editing. I want to keep this idea. I don't see the need and the use of that additional field. Either it would restrict the user to stick to the initial setting after saving once, or it would give the user the full flexibility, but then we would end up in the same situation as now, just that there might be an FMTTYPE that in reality doesn't say anything about the content as again it could just be plain text without tags or text with tags shown as plain text. But we can keep this in the discussions. |
Beta Was this translation helpful? Give feedback.
-
I can see that we're going to have to agree to differ on this one. A final point: DESCRPITION property does allow
and FMTTYPE is a registered IANA param so is allowed. Aplications can ignore it but must preserve it and the value. So you could simply add a As a second step you could then read the parameter when getting a component and use it to set markdown display and editing on and off, still allowing your user to locally change the your setting. As a third step you could then change the parameter value as appropriate when saving the item Step 1 please - it should be easy |
Beta Was this translation helpful? Give feedback.
-
Earlier on there was a discussion about allowing/defaulting markdown codes in descriptions. Also the possible use of STYLED-DESCRIPTION ( rfc9073 ) to allow HTML versions.
Here is a simple non-breaking enhancement to flag the presence of markdown codes in the description text.
If markdown codes are present at a FMTTYPE=text/markdown parameter to the description.
eg DESCRIPTION;FMTTYPE=text/markdown:This is your description text
This shouldn't break any existing applications out there, but would allow me to tell when loading an entry from the server to determine whether to show a markdown editor or a plain text one for the description, and whether to bother to parse the description for markdown codes when displaying it (less of an issue since it is easy enough to always parse for markdown)
And correspondingly it would allow jtxBoard to be able to parse markdown and show the markdown editor according to the content fmttype rather than relying on a global setting.
I'm pretty sure that other applications will simply ignore, but preserve, the format type parameter if they don't know what to do with it (that's how I read the spec, but I could be wrong)
Beta Was this translation helpful? Give feedback.
All reactions