Modo Markup

From The Foundry MODO SDK wiki
Revision as of 10:09, 15 November 2018 by Jangell (Talk | contribs) (Created page with "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...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.

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.