Code Menu

Overview

The Code Menu provides commands for the following:

  • Reverting Templates and generated CSS to their default state
  • Manual EPUB Generation (regeneration)
  • HTML markup insertion
  • HTML entity encoding

The arrangement of the HTML-related commands follows the HTML 5.2 Specification.

The Code Menu can be used in both the Text Editor and the Code Editor. However, the only a subset of the HTML-related commands are enabled in the Text Editor.

Commands

The effect of most commands depends on whether any text is selected.

CommandWith No SelectionWith Selection
CommentInserts comment tags (<!-- and -->) at the cursorWraps the selected text in comment tags (<!-- and -->)
UncommentDoes nothingWill remove any comment tags found in the selected text
Remove CommentsRemoves all comment tagsRemoves all comment tags
Revert to DefaultDisabledDisabled unless one of the following is selected in the Code Editor:

  • Templates<HTML> templateCSS templatePackage > XHTML > CSS folder


Reverts the selected item back to its default state.

Read Templates, Foundation Code and Default Resources for more information.
RegenerateDisabledDisabled unless one of the following is selected in the Code Editor:

  • Package
  • Package > XHTML folder
  • An automatically generated XHTML resource descendant of the XHTML folder


Causes the selected item and its children to be regenerated.

Read about the EPUB Generator for more information.
Document Metadata > HeadInserts <head> </head> at the cursorWraps the selected text in <head> and </head>
Document Metadata > TitleInserts <title> </title> at the cursorWraps the selected text in <title> and </title>
Document Metadata > LinkInserts <link rel="" href="" /> at the cursorInserts <link rel="" href="" /> at the start of the selection
Document Metadata > MetaInserts <meta name="" content="" /> at the cursorInserts <meta name="" content="" /> at the start of the selection
Document Metadata > StylesheetInserts <link href="" rel="stylesheet" media="screen" type="text/css" /> at the cursorInserts <link href="" rel="stylesheet" media="screen" type="text/css" /> at the start of the selection
Document Metadata > StyleInserts <style> </style> at the cursorWraps the selected text in <style> and </style>
Sections > HeaderInserts <header> </header> at the cursorWraps the selected text in <header> and </header>
Sections > BodyInserts <body> </body> at the cursorWraps the selected text in <body> and </body>
Sections > FooterInserts <footer> </footer> at the cursorWraps the selected text in <footer> and </footer>
Sections > Heading 1
Inserts <h1> </h1> at the cursorWraps the selected text in <h1> and </h1>
Sections > Heading 2Inserts <h2> </h2> at the cursorWraps the selected text in <h2> and </h2>
Sections > Heading 3Inserts <h3> </h3> at the cursorWraps the selected text in <h3> and </h3>
Sections > Heading 4Inserts <h4> </h4> at the cursorWraps the selected text in <h4> and </h4>
Sections > Heading 5Inserts <h5> </h5> at the cursorWraps the selected text in <h5> and </h5>
Sections > Heading 6Inserts <h6> </h6> at the cursorWraps the selected text in <h6> and </h6>
Sections > ArticleInserts <article> </article> at the cursorWraps the selected text in <article> and </article>
Sections > SectionInserts <section> </section> at the cursorWraps the selected text in <section> and </section>
Sections > Nav
Inserts <nav> </nav> at the cursorWraps the selected text in <nav> and </nav>
Sections > AsideInserts <aside> </aside> at the cursorWraps the selected text in <aside> and </aside>
Grouping Content > MainInserts <main> </main> at the cursorWraps the selected text in <main> and </main>
Grouping Content > DivInserts <div> </div> at the cursorWraps the selected text in <div> and </div>
Grouping Content > ParagraphInserts <p> </p> at the cursorWraps the selected text in <p> and </p>
Grouping Content > Horizontal RuleInserts <hr /> at the cursorInserts <hr /> at the start of the selection
Grouping Content > BlockquoteInserts <blockquote> </blockquote> at the cursorWraps the selected text in <blockquote> and </blockquote>
Grouping Content > Preformatted BlockInserts <pre> </pre> at the cursorWraps the selected text in <pre> and </pre>
Grouping Content > AddressInserts <address> </address> at the cursorWraps the selected text in <address> and </address>
Grouping Content > Ordered ListInserts the following at the cursor:

<ol>
<li></li>
<li></li>
<li></li>
</ol>
Inserts the following at the start of the selection:

<ol>
<li></li>
<li></li>
<li></li>
</ol>
Grouping Content > Unordered ListInserts the following at the cursor:

<ul>
<li></li>
<li></li>
<li></li>
</ul>
Inserts the following at the start of the selection:

<ul>
<li></li>
<li></li>
<li></li>
</ul>
Grouping Content > List ItemInserts <li> </li> at the cursorWraps the selected text in <li> and </li>
Grouping Content > Term-Description ListInserts the following at the cursor:

<dl>
<dt></dt>
<dd></dd>
<dd></dd>
</dl>
Inserts the following at the start of the selection:

<dl>
<dt></dt>
<dd></dd>
<dd></dd>
</dl>
Grouping Content > TermInserts <dt> </dt> at the cursorWraps the selected text in <dt> and </dt>
Grouping Content > DescriptionInserts <dd> </dd> at the cursorWraps the selected text in <dd> and </dd>
Grouping Content > FigureInserts <figure> </figure> at the cursorWraps the selected text in <figure> and </figure>
Grouping Content > Figure CaptionInserts <figcaption> </figcaption> at the cursorWraps the selected text in <figcaption> and </figcaption>
Text-level Semantics > LinkInserts <a> </a> at the cursorWraps the selected text in <a> and </a>
Text-level Semantics > EmphasisInserts <em> </em> at the cursorWraps the selected text in <em> and </em>
Text-level Semantics > StrongInserts <strong> </strong> at the cursorWraps the selected text in <strong> and </strong>
Text-level Semantics > Small Inserts <small> </small> at the cursorWraps the selected text in <small> and </small>
Text-level Semantics > Subscript Inserts <sub> </sub> at the cursorWraps the selected text in <sub> and </sub>
Text-level Semantics > SuperscriptInserts <sup> </sup> at the cursorWraps the selected text in <sup> and </sup>
Text-level Semantics > ItalicsInserts <i> </i> at the cursorWraps the selected text in <i> and </i>
Text-level Semantics > BoldInserts <b> </b> at the cursorWraps the selected text in <b> and </b>
Text-level Semantics > UnderlineInserts <u> </u> at the cursorWraps the selected text in <u> and </u>
Text-level Semantics > SpanInserts <span> </span> at the cursorWraps the selected text in <span> and </span>
Text-level Semantics > Line BreakInserts <br /> at the cursorInserts <br /> at the start of the selection
Text-level Semantics > Line Break OpportunityInserts <wbr /> at the cursorInserts <wbr /> at the start of the selection
Text-level Semantics > Inaccurate/IrrelevantInserts <s> </s> at the cursorWraps the selected text in <s> and </s>
Text-level Semantics > Citation Inserts <cite> </cite> at the cursorWraps the selected text in <cite> and </cite>
Text-level Semantics > QuotationInserts <q> </q> at the cursorWraps the selected text in <q> and </q>
Text-level Semantics > DefinitionInserts <dfn> </dfn> at the cursorWraps the selected text in <dfn> and </dfn>
Text-level Semantics > Abbreviation/AcronymInserts <abbr> </abbr> at the cursorWraps the selected text in <abbr> and </abbr>
Text-level Semantics > Ruby AnnotationsInserts <ruby> </ruby> at the cursorWraps the selected text in <ruby> and </ruby>
Text-level Semantics > Ruby Base Text Component Inserts <rb> </rb> at the cursorWraps the selected text in <rb> and </rb>
Text-level Semantics > Ruby TextInserts <rt> </rt> at the cursorWraps the selected text in <rt> and </rt>
Text-level Semantics > Ruby Text ContainerInserts <rtc> </rtc> at the cursorWraps the selected text in <rtc> and </rtc>
Text-level Semantics > Ruby FallbackInserts <rp> </rp> at the cursorWraps the selected text in <rp> and </rp>
Text-level Semantics > DataInserts <data value=""> </data> at the cursorWraps the selected text in <data value=""> and </data>
Text-level Semantics > TimeInserts <time> </time> at the cursorWraps the selected text in <time> and </time>
Text-level Semantics > CodeInserts <code> </code> at the cursorWraps the selected text in <code> and </code>
Text-level Semantics > VariableInserts <var> </var> at the cursorWraps the selected text in <var> and </var>
Text-level Semantics > Sample Inserts <samp> </samp> at the cursorWraps the selected text in <samp> and </samp>
Text-level Semantics > Keyboard InputInserts <kbd> </kbd> at the cursorWraps the selected text in <kbd> and </kbd>
Text-level Semantics > Marked TextInserts <mark> </mark> at the cursorWraps the selected text in <mark> and </mark>
Text-level Semantics > Bidirectional TextInserts <bdi> </bdi> at the cursorWraps the selected text in <bdi> and </bdi>
Text-level Semantics > Directional TextInserts <bdo dir=""> </bdo> at the cursorWraps the selected text in <bdo dir=""> and </bdo>
Edits > InsertionInserts <ins> </ins> at the cursorWraps the selected text in <ins> and </ins>
Edits > DeletionInserts <del> </del> at the cursorWraps the selected text in <del> and </del>
Embedded Content > PictureInserts <picture> </picture> at the cursorWraps the selected text in <picture> and </picture>
Embedded Content > SourceInserts <source src="" /> at the cursorInserts <source src="" /> at the start of the selection
Embedded Content > ImageInserts <img src="" alt="" width="" height="" /> at the cursorInserts <img src="" alt="" width="" height="" /> at the start of the selection
Embedded Content > iFrameInserts <iframe> </iframe> at the cursorWraps the selected text in <iframe> and </iframe>
Embedded Content > Embedded ElementInserts <embed> </embed> at the cursorWraps the selected text in <embed> and </embed>
Embedded Content > ObjectInserts <object> </object> at the cursorWraps the selected text in <object> and </object>
Embedded Content > ParamInserts <param name="" value="" /> at the cursorInserts <param name="" value="" /> at the start of the selection
Embedded Content > VideoInserts <video src=""> </video> at the cursorWraps the selected text in <video src=""> and </video>
Embedded Content > AudioInserts <audio src=""> </audio> at the cursorWraps the selected text in <audio src=""> and </audio>
Embedded Content > TrackInserts <track src="" /> at the cursorInserts <track src="" /> at the start of the selection
Embedded Content > MapInserts <map name=""> </map> at the cursorWraps the selected text in <map name=""> and </map>
Embedded Content > AreaInserts <area> </area> at the cursorWraps the selected text in <area> and </area>
Tabular Data > TableInserts the following at the cursor:

<table>
<caption></caption>
<thead>
<tr><th></th><th></th></tr>
</thead>
<tbody>
<tr><td></td><td></td></tr>
</tbody>
</table>
Inserts the following at the start of the selection:

<table>
<caption></caption>
<thead>
<tr><th></th><th></th></tr>
</thead>
<tbody>
<tr><td></td><td></td></tr>
</tbody>
</table>

Tabular Data > Table HeaderInserts <thead> </thead> at the cursorWraps the selected text in <thead> and </thead>
Tabular Data > Header CellInserts <th> </th> at the cursorWraps the selected text in <th> and </th>
Tabular Data > Table BodyInserts <tbody> </tbody> at the cursorWraps the selected text in <tbody> and </tbody>
Tabular Data > CaptionInserts <caption> </caption> at the cursorWraps the selected text in <caption> and </caption>
Tabular Data > Column GroupInserts <colgroup> </colgroup> at the cursorWraps the selected text in <colgroup> and </colgroup>
Tabular Data > ColumnInserts <col /> at the cursorInserts <col /> at the start of the selection
Tabular Data > RowInserts <tr> </tr> at the cursorWraps the selected text in <tr> and </tr>
Tabular Data > Data CellInserts <td> </td> at the cursorWraps the selected text in <td> and </td>
Tabular Data > Table FooterInserts <tfoot> </tfoot> at the cursorWraps the selected text in <tfoot> and </tfoot>
Interactive Elements > DetailsInserts <details> </details> at the cursorWraps the selected text in <details> and </details>
Interactive Elements > SummaryInserts <summary> </summary> at the cursorWraps the selected text in <summary> and </summary>
Interactive Elements > DialogInserts <dialog> </dialog> at the cursorWraps the selected text in <dialog> and </dialog>
Scripting > ScriptInserts <script> </script> at the cursorWraps the selected text in <script> and </script>
Scripting > No ScriptInserts <noscript> </noscript> at the cursorWraps the selected text in <noscript> and </noscript>
Scripting > TemplateInserts <template> </template> at the cursorWraps the selected text in <template> and </template>
Scripting > CanvasInserts <canvas> </canvas> at the cursorWraps the selected text in <canvas> and </canvas>
Encode EntitiesEncodes all unencoded entities in the Document, Chapter or XHTML Resource — but will not encode any HTML tags or symbols in properly encoded HTML entities.Encodes all unencoded entities in the selected text — but will not encode any HTML tags or symbols in properly encoded HTML entities.