---
title: "How to use Source Editor for Confluence DC"
canonical: "https://support.appfire.com/space/SOURCE/234160490/How%20to%20use%20Source%20Editor%20for%20Confluence%20DC"
format: markdown
---
> Macro (aura-html)

> ⚠️ Consider migrating to Source Editor for Confluence’s Data Center version.
> ⚠️ 
> ⚠️ Migrating to Cloud? Make sure you do not lose your data/configurations in the process. Check out the [Migration guide](https://appfire.atlassian.net/wiki/x/CIAXCQ) for information on how to migrate the app’s data to Cloud. Contact our [support team](https://appfire.atlassian.net/servicedesk/customer/portal/11) if you have any questions.


## Accessing the source editor

To open the source editor, click the :source_server: button located in the top-right corner of any editable page. You can access the source editor when editing pages, blog posts, and comments.

![image](media://34157f5a-1265-4cc0-b044-5d2bb174201c)

> ℹ️ You must be logged in and have editing privileges to edit the Confluence page source.

## Editing Confluence source

The source editor provides direct access to the Confluence page source. Confluence pages are stored in an XML-based format called [Confluence Storage Format](https://confluence.atlassian.com/doc/confluence-storage-format-790796544.html). Pages can be edited using either Storage (XHTML) or Atlassian Document Format (ADF/JSON). For detailed instructions, see [How to edit in ADF (JSON) and Storage (XHTML)](https://appfire.atlassian.net/wiki/spaces/SOURCE/pages/3450011727).

> ⚠️ **Compatibility with Confluence Source Editor**:
> ⚠️ 
> ⚠️ It is recommended to disable or uninstall the native *Confluence Source Editor* app (if you are using it along with this app) to avoid performance issues.

> ℹ️ Confluence Storage Format is a subset of HTML. It does not support all features of HTML.

### Code editing

The Source Editor for Confluence is designed to be lightweight but contains a set of features that allows easy and intuitive editing of a Confluence page source. 

![image](media://281b4e63-ed5a-498d-a9ee-c6f90f302985)

Every feature in the image is marked with a number to help you identify it. The following table describes the features:

| **Number** | **Editing feature** | **Description** |
| --- | --- | --- |
|  | *Automatic indentation and syntax highlighting * | Automatic indentation and syntax highlighting are available and enabled |
| 1 | *Beautify* | Click this button to make your code more readable. |
| 2 | *Wrap text* | Click this button to wrap the long code into the next line. |
| 3 | *Find/Replace* | Click this button to easily search for and replace code in the editor or use the **Regex** button to allow a [regex](https://en.wikipedia.org/wiki/Regular_expression) string input.  
For more information see, [Find/Replace](https://appfire.atlassian.net/wiki/spaces/SOURCE/pages/234160490/How+to+use+Source+Editor+for+Confluence+DC#Find%2FReplace). |
| 4 | *Help* | This button allows you to quickly find the important links that you might want to access. |
| 5 | *Code folding* | Use the markers next to the line numbers to fold XHTML tags. |
| 6 | *Lights off/on* | Click this button to switch between the dark and light modes of the window. |
| 7 | *Expand/Collapse* | Click this button to minimize or maximize the source editor window. |
| 8 | *Page preview* | This section allows you to know which part of the code you are editing. |
| 9 | *Save* | Click this button to save the edits you have made. |
| 10 | *Cancel* | Click this button to not save the edits you have made. |


#### Find/Replace

The following features are available in the Find/Replace option:

![image](media://a50d4e08-19aa-4a84-b370-e4568078b286)

Every feature in the image is marked with a number to help you identify it. The following table describes the features:

| **Number** | **Parameter** | **Description** |
| --- | --- | --- |
| 1 | *Match Case* | Click this button to start a case-sensitive word search. |
| 2 | *Match Whole Word* | Click this button to start a search to find the exact match. This is not a case-sensitive search option. |
| 3 | *Use Regular Expressions* | Click this button to use regular expressions for the search. |
| 4 | *Previous match* | Click the up arrow button to highlight the previous match. |
| 5 | *Next match* | Click the down arrow button to highlight the next identified match. |
| 6 | *Find in selection* | Click this button to highlight all identified matches. |
| 7 | *Close* | Click this button to close the Find/Replace window. |
| 8 | *Preserve Case* | Click this button to replace the identified word with the same case as that of the searched text. |
| 9 | *Replace* | Click this button to go over each word and replace it. |
| 10 | *Replace All* | Click this button to replace all identified words at a time. |
| 11 | *Find* | Enter the text you want to search. |
| 12 | *Replace* | Enter the text you want to replace with. |

### Source validation

To save any edits made to a Confluence page, the XHTML source must be valid. To confirm the validity of your source, click `Submit` and the editor will perform the verification. If your source is valid, the page will be saved. If your source contains an error, a message will display indicating the nature of the error and the location in the code where it was discovered.