You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have lots of feature requests, but this is probably the most important one: it would be fantastic to be able to include formatting (bold, newlines, lists, and hyperlinks) in the text for each step, and the other text fields. This would require a change to the file format so, while I'm happy to update the viewer to make this possible, it would be really great to discuss with Tobey and the team which option is best. I see two viable ways of doing it:
Markdown (or similar), which has some advantages:
Easy to write
Human-readable in plain text
Doesn't confuse the XML parser (still shows up as a string)
Markdown also has some disadvantages:
No longer specified by an XML format (assuming at some point there will be a formal XML spec)
Requires some white space preservation, which isn't normal in XML docs
HTML tags in descriptions. The primary advantages are:
Unambiguous specification
It's valid XML and can be included in the DocuBricks format
The disadvantage is that it's less human-readable and could open security holes
I would propose that the XML specification is amended to allow a small subset of HTML tags in what are currently multiline text fields (the <description> and <long_description> elements). This can be converted to and from markdown for easy GUI editing (see the bottom example on the react page or to-markdown). A decent working selection of tags would be <b>, <i>, <u>, <em>, <a>, <br>, <ul>, <ol>, <li>, <p> although of course more could be added later. I'm not sure if <p> is a good idea or not - if it's allowed, then it suggests everything should be in a paragraph for consistency...
As a bonus, doing it this way doesn't constrain us to just what markdown allows - for example we could introduce a tag that highlights some text with a little warning icon, as commonly seen in instruction manuals.
As and when I get time, I might make a start on this approach - I am very open to being steered, however, because the last thing I want to do is diverge from the standard!
The text was updated successfully, but these errors were encountered:
Currently the descriptions of assembly steps in bricks, and the abstract, note, and long description of bricks are allowed to contain a small selection of safe-looking HTML tags (see the function I added to docubricksviewer.tsx). This should be fairly trivial to extend to other blocks of text.
I have lots of feature requests, but this is probably the most important one: it would be fantastic to be able to include formatting (bold, newlines, lists, and hyperlinks) in the text for each step, and the other text fields. This would require a change to the file format so, while I'm happy to update the viewer to make this possible, it would be really great to discuss with Tobey and the team which option is best. I see two viable ways of doing it:
Markdown also has some disadvantages:
The disadvantage is that it's less human-readable and could open security holes
I would propose that the XML specification is amended to allow a small subset of HTML tags in what are currently multiline text fields (the
<description>
and<long_description>
elements). This can be converted to and from markdown for easy GUI editing (see the bottom example on the react page or to-markdown). A decent working selection of tags would be<b>, <i>, <u>, <em>, <a>, <br>, <ul>, <ol>, <li>, <p>
although of course more could be added later. I'm not sure if<p>
is a good idea or not - if it's allowed, then it suggests everything should be in a paragraph for consistency...As a bonus, doing it this way doesn't constrain us to just what markdown allows - for example we could introduce a tag that highlights some text with a little warning icon, as commonly seen in instruction manuals.
As and when I get time, I might make a start on this approach - I am very open to being steered, however, because the last thing I want to do is diverge from the standard!
The text was updated successfully, but these errors were encountered: