Difference between revisions of "Modo Markup"

From The Foundry MODO SDK wiki
Jump to: navigation, search
m
(Restrictions)
 
Line 13: Line 13:
 
     \                              Escape character.  Any character typed after this is not parsed, and inserted directly
 
     \                              Escape character.  Any character typed after this is not parsed, and inserted directly
 
     {{{...}}}                      Everything inside the curly braces is not parsed.
 
     {{{...}}}                      Everything inside the curly braces is not parsed.
 +
 +
== Icon Resources ==
 +
Icons can actually come from multiple sources.  There are a few special definitions that are mostly internal to the application, which means that you'll primarily be using the prefix `iconresource_`.  For example:
 +
 +
![icon][iconresource_yourIconResourceHere]
 +
 +
Where only the "yourIconResourceHere" part is replaced with your icon resource name.
  
 
== Restrictions ==
 
== Restrictions ==
 
* Font styles cannot be nested.  You can't do ''*_text_*'' to get a bold italics.  This is a limitation of the underlying rich text system.
 
* Font styles cannot be nested.  You can't do ''*_text_*'' to get a bold italics.  This is a limitation of the underlying rich text system.
* The ''![][]'' inserts can be wrapped in the font styles, for situations where you want to display input mappings or icons with bold or italic text, for example.
+
* The ''![...][...]'' inserts can be wrapped in the font styles, for situations where you want to display input mappings or icons with bold or italic text, for example.
 
* Fixed width fonts are slightly offset, due to the underlying implementation.  This isn't expected to be used very often, so it will likely stay this way for the time being.
 
* Fixed width fonts are slightly offset, due to the underlying implementation.  This isn't expected to be used very often, so it will likely stay this way for the time being.
 
* ``inputcommand`` key assignments are always found in the global map, not in view-specific maps.
 
* ``inputcommand`` key assignments are always found in the global map, not in view-specific maps.

Latest revision as of 20:39, 23 September 2019

modo Markup (introduced in 12.2) is a simplified text markup feature that exposes rich text styling for tooltips and other strings commonly displayed to the user. It borrows features from other systems like Markdown and Slack's markup, but tailored to modo.

Syntax

   *text*                          Bold
   _text_                          Italics
   `text`                          Fixed Width Font
   ~text~                          Small Font
   ==text==                        Heading (bold and centered)
   * text                          Bullet (note the space after the asterisk; must be at the beginning of a line)
   ![icon][iconResource]           Icon Resource
   ![inputevent][eventHash]        Key assigned to the an event hash (hash format is the same as is stored in the config)
   ![inputcommand][commandString]  Key assigned to the command string in the global input map
   \                               Escape character.  Any character typed after this is not parsed, and inserted directly
   {{{...}}}                       Everything inside the curly braces is not parsed.

Icon Resources

Icons can actually come from multiple sources. There are a few special definitions that are mostly internal to the application, which means that you'll primarily be using the prefix `iconresource_`. For example:

![icon][iconresource_yourIconResourceHere]

Where only the "yourIconResourceHere" part is replaced with your icon resource name.

Restrictions

  • Font styles cannot be nested. You can't do *_text_* to get a bold italics. This is a limitation of the underlying rich text system.
  • The ![...][...] inserts can be wrapped in the font styles, for situations where you want to display input mappings or icons with bold or italic text, for example.
  • Fixed width fonts are slightly offset, due to the underlying implementation. This isn't expected to be used very often, so it will likely stay this way for the time being.
  • ``inputcommand`` key assignments are always found in the global map, not in view-specific maps.
  • Special hidden rich text codes are inserted into parsed strings, which means that they can be parsed a second time without causing problems. However, these hidden codes can result in unprintable characters being displayed for clients that don't support rich text (window titles, edit fields, OpenGL, etc). Most internal code detects and deletes these codes where necessary, but plug-in code in particular may not and may have to strip them with ``ILxMessageService::StripRichText()``.

Support in modo

  • Any message table lookup, often done in the form of @table@message@ when passed to things like dialog.msg. This further encourages the use of message tables.
  • Tooltips in command dialogs and forms also support markup.