Text Editor Window

  Note

This topic applies to the text editor in the standalone GUI. The Visual Studio package utilizes the built-in XML file editor. As such, it provides IntelliSense support for the MAML schema to make creating the documents easier provided you have installed them. It is highly recommended that you do so using the Sandcastle Installer. You can re-run it and skip forward to the step that installs the schemas if necessary.

The general text editor window is used for editing various file types such as MAML topics, HTML files, style sheets, XML files, etc. It provides various features that make editing the files easier such as color syntax highlighting, automatic closing tag insertion, matching character insertion for quotes and parentheses, and various options to perform common actions such as HTML encoding text and inserting common MAML elements.

Tool bar Options

The tool bar at the top of the window provides access to some of the most common options. They are (from left to right):

Text Editor Window
  • Bold - Insert a legacyBold element.

  • Italic - Insert a legacyItalic element.

  • Underline - Insert a legacyUnderline element.

  • Code Inline - Insert a codeInline element.

  • Bulleted List - Insert a bulleted list element with two default listItem elements.

  • Numbered List - Insert a numbered list element with two default listItem elements.

  • Table - Insert a table element with a default table header and row.

  • In-page link - Insert a link element with an in-page address target (i.e. the value of another element's address attribute within the same page).

  • External link - Insert an externalLink element for linking to an outside target such as a website.

  • Various elements dropdown - The dropdown will allow you to insert various other common MAML elements. The ones above the divider are block elements. The rest below it are inline elements. If the tool bar button is clicked, the default action is to insert the last selected element from the dropdown. By default, it inserts an alert element.

  • HTML Encode - HTML encode the currently selected text. This is useful for inline code samples within code elements or URLs containing restricted characters such as ampersands.

  • Cut, Copy, and Paste - Standard Windows clipboard cut, copy, and paste operations.

  • Undo and Redo - Undo and redo edits.

  • Spell Check - Spell check the current document. A spell check tool window will open and will reposition the cursor to the first misspelled word if there is one.

  Tip

For most commands that insert MAML elements in the standalone GUI, both from the tool bar and the keyboard shortcuts, if any text is currently highlighted when the command is executed, the selected text will be wrapped in the inserted element. This also applies when a topic is dragged and dropped from the content layout editor onto selected text to create a link. The selected text will become the link's inner text.

Keyboard Shortcuts

The text editor supports various common keyboard shortcuts such as Ctrl+C for copy and Ctrl+V for paste. In addition, the following keyboard shortcuts can be used:

  • Ctrl+B - Insert a legacyBold element.

  • Ctrl+I - Insert a legacyItalic element.

  • Ctrl+U - Insert a legacyUnderline element.

  • Ctrl+K - Insert a codeInline element.

  • Ctrl+F - This opens the Find Text tool window. If already open and search text has been entered, hitting Ctrl+F again finds the next occurrence of the search text.

  • Ctrl+H - This opens the Find and Replace tool window. If already open and find and replace text has been entered, hitting Ctrl+H again replaces the last instance found if the cursor is still on it and finds the next occurrence of the search text.

  • Ctrl+G - This opens the Goto Line tool window. Enter a line number and click OK to jump to the specified line number in the document.

  • Ctrl+Shift+K - Spell check the current document. A spell check tool window will open and will reposition the cursor to the first misspelled word if there is one.

  • Tab - If you are within an XML element's opening tag, the closing element will be inserted automatically and the cursor will be placed between them ready to enter the inner text.

  • Matching characters - When you type a double quote, an opening parentheses, an angle bracket ('<'), a square bracket ('['), or a curly brace ('{'), the matching closing character is inserted automatically and the cursor is placed between them.

Drag and Drop

The text editor window also supports drag and drop operations from the Content Layout Editor and the Site Map Editor to insert links to other topics in the project. It also supports drag and drop from the Entity References Window to insert token references, image links, code entity reference links, code snippet references, and table of contents links.

By default, links to MAML topics are inserted as self-closing link elements and will use the topic's title from the content layout file when converted to HTML at build-time. If necessary, you can modify the link element to specify inner text which will be used instead of the title text. Dropping the link on some selected text will automatically make the selected text the inner text of the link.

See Also