Table of Contents
User Guide
Source Editor
Source Editor Overview
Use the Source Editor to view and edit a topic's underlying XML.
Editing the DITA Markup
Use the Topic Editor to edit a topic's source code.
Searching in the Source Editor
Use the find feature in the Source Editor to search for content.
Source Editor Overview

Use the Source Editor to view and edit a topic’s underlying XML.
You can view, edit, and search a topic’s underlying XML using the Source Editor. The Source Editor uses syntax coloring to help you identify elements, attributes, values, and invalid XML. Existing XML will already conform to the syntax coloring, while new text is configured as you type.
With a topic open, you can access the Source Editor from any topic by doing any of the following:
  • Click Edit -> Source Code

  • Press Ctrl+Shift+”,” or Cmd+Shift+”,”

The Source Editor makes switching between editing in the Topic Editor and editing in the Source Editor seamless. If you have text selected in the topic before opening the Source Editor, the text will still be selected in the Source Editor. So you can quickly begin editing the XML from where you left off in the Topic Editor.  
You can also use Ctrl+F or Cmd+F to search for text in the Source Editor. You can enter a search term or use regular expression to search for text.
Any saved changes made in the Source Editor are applied to the topic. If the changes you made result in invalid XML, the invalid areas will display in red and the Source Editor will not close and save.
Editing the DITA Markup

Use the Topic Editor to edit a topic’s source code.
You have a topic open and want to edit the DITA markup.
  1. Click Edit -> Source Code.

    Step Information

    Expected Result
    The Source Editor displays the DITA markup for the topic.

  2. Modify the XML.
  3. Click Save.

    Step Information
    Attention:If you enter invalid XML, the XML Source Editor will not allow you to save and close. If you click the Save button and the Source Editor doesn’t close, then the DITA you have entered is not valid, and you should double check your code.

You’re viewing and editing the topic’s source code.
Searching in the Source Editor

Use the find feature in the Source Editor to search for content.
You have a topic open and want to search for a term.
  1. Click Edit -> Source Code.

    Step Information

    Expected Result
    The Source Editor displays the DITA markup for the topic.

  2. Press Ctrl+F or press Cmd+F.

    Expected Result
    The Source Editor’s search field displays.
  3. Type a search term and press Enter.

    Example
    Search for “edit”.
    Expected Result
    All matches are highlighted.
  4. To navigate the search results, do any of the following:

    1. To navigate to the next search result, press Ctrl+G or Cmd+G.
    2. To navigate to the previous search result, press Shift+Ctrl+G or Shift+Cmd+G.
  5. To replace the search result, do any of the following:

    1. To only replace the selected search result, press Shift+Ctrl+F or Cmd+Option+F and then enter the new text.

      Step Information
      The Replace field displays the selected search result that you’ll replace.
    2. To replace all matching search results, press Shift+Ctrl+R or Shift+Cmd+Option+F and then enter the next text.

      Step Information
      The Replace all field displays the search result that you’ll replace.
  6. To run a search where the Search field doesn’t autoclose, press Alt+F. Enter a search term and press Enter to find the next search result or press Shift-Enter to find the previous search result.
  7. To jump to a line, press Alt+G.
Matches to your search display.