markup

This element can be used to pass a literal piece of format-specific markup through to the rendered topic. In general, this element is only used by custom build components to pass markup through after modifying the conceptual topic in some manner (i.e. to colorize code). Other non-component uses might be to include a video or other such items in the topic that is currently not handled by MAML.

  Note

It is recommended that you avoid using this element unless there is no MAML equivalent for what you are trying to do. Usage should be restricted to the output of custom build components when needed.

Usage

Enter the element in the topic and specify the format-specific markup as the content. It can be used as a block or an inline element.

An optional contentType attribute is supported that defines the type of content (Html, OpenXml, or Markdown). This allows only rendering the content based on the content type supported by the presentation style.

When specified, presentation styles that only support Open XML will only render markup element content with a content type of "OpenXml". Presentation styles that only support Markdown will only render markup element content with a content type of "Html" or "Markdown". All others (Help 1, Microsoft Help Viewer, and website) will only render the content if the type is "Html". If the attribute is omitted, the content will be rendered regardless of the presentation style's formats whether or not they actually support it.

Example

 
<para>Here are some literal markup examples:
<markup><br /><br />
This content is compatible with the all presentation style formats.
<br /><br />
It is NOT recommended that you use the markup element for normal conceptual content
when an equivalent MAML element already exists.  Its use should be restricted to
custom build components.
</markup>

<markup contentType="Html"><br /><br />
<p>This content is only compatible with <strong>HTML</strong> and <strong>Markdown</strong>
presentation style formats.</p>

<p>It is <strong>NOT</strong> recommended that you use the <em>markup</em> element for
normal conceptual content when an equivalent <u>MAML element</u> already exists.
Its use should be restricted to custom build components.</p>
</markup>

<markup contentType="Markdown"><br /><br />
This content is only compatible with **Markdown** presentation style formats.

It is **NOT** recommended that you use the _markup_ element for normal conceptual
content when an equivalent <u>MAML element</u> already exists.  Its use should be
restricted to custom build components.

</markup>

<!-- For Open XML, span elements are converted to the appropriate matching style after transformation
as long as it is a recognized style name used by the transformation.  Line breaks are supported as-is.
Open XML namespaces could be used if they are added to the namespace list at the top of the topic. -->
<markup contentType="OpenXml"><br /><br />
This content is only compatible with <span class="Bold">Open XML</span> presentation style formats.
<br /><br />
It is <span class="Bold">NOT</span> recommended that you use the <span class="Emphasis">markup</span>
element for normal conceptual content when an equivalent <span class="Underline">MAML element</span> already
exists.  Its use should be restricted to custom build components.
</markup>
</para>

Example Output

Here are some literal markup examples:

This content is compatible with the all presentation style formats.

It is NOT recommended that you use the markup element for normal conceptual content when an equivalent MAML element already exists. Its use should be restricted to custom build components.

This content is only compatible with HTML and Markdown presentation style formats.

It is NOT recommended that you use the markup element for normal conceptual content when an equivalent MAML element already exists. Its use should be restricted to custom build components.

See Also

Other Resources