Last updated

Use the editor

Realm offers an online editor where you can add, edit, or delete files and folders in your project. Since Realm projects are saved using Git, any updates are saved by committing changes, and opening, reviewing, and merging pull requests.

Before you begin

Make sure you have the following before you begin:

  • A project created in your organization in Reunite.

Create a new branch

Before you make any changes to your project, you should create a new branch. This new branch is a place where you can make changes without affecting the published site until you are ready. After you have iterated on your changes based on reviews by your team and the updates have been approved, you can merge your changes into the published site.

To create a new branch:

  1. Go to the project editor.

  2. Click the name of the current branch.

    Screenshot where current branch is on project page

  3. Enter the name for your new branch and select Create Branch.

Switch branches

If you need to change to a different branch from the branch you are working in, you can change the branch using the branch switcher at the top of the editor page.

Screenshot of the branch switcher

To switch branches, click the branch switcher and select the branch. If you don't see the branch, use the search field to find it.

Add files

After you have created a new branch, you can add or delete files or folders in the editor.

  • To add files or folders, click the + icon and select New file or New folder.
    • You can also drag and drop files from your computer into the file tree pane.
  • To delete files or folders, right-click the file or folder and select Delete.
  • To copy files or folders, right-click the file or folder and select Copy.
  • To rename files or folders, right-click the file or folder and select Rename.

Edit files

The editor includes an editor pane where you can edit the content in your files. To edit content, select the file in the file tree pane and make your edits in the editor pane. Your updates display in the Webview live preview pane. You can also use the toolbar at the top of the editor pane to add the following Markdown syntax automatically:

  • Headings
  • Bold text
  • Italics text
  • Links
  • Blockquote text
  • Code blocks
  • Ordered lists
  • Unordered lists
  • Checkbox lists
Drag and drop images and links

Another way you can add images and links is to drag the files from the file tree to the editor pane and drop them.

The toolbar also includes the following options to add Markdoc tag syntax automatically:

  • If
  • Else
  • Table
  • Partial
  • Admonition
  • Code snippet

See the Markdoc Tag Library for more information on both the built-in and custom Redocly tags.

Add images to Markdown files

You can add images to to Markdown files in the following ways:

  • Drag an image file from the file tree and drop it into an open Markdown file.
  • Drag an image file directly from your computer and drop it into an open Markdown file.
    The image is automatically saved to the closest images folder if one exists. If there isn't an images folder in the same location as the Markdown file, one is created.
  • Manually type the image link in the file.

Commit updates

Once you are finished making your updates, you must commit them to your branch.

To commit your updates:

  1. Click the Commit button, or the commit icon.

    Screenshot with commit icon

  2. Review the diff by clicking on the modified file.

    Screenshot with list of modified files under commit button

    When you are finished reviewing the diff, you can close the tab on the (changes) file.

  3. (Optional) you can deselect the files you want to exclude from the commit.

  4. Enter a commit message describing your updates. For example, "Update index.md"

  5. Click Commit.

After you have made the first commit to a branch, you can open a draft pull request.

Revert changes

If want to discard the changes you made before you commit them to the branch, you can revert the changes to put the files back into the state from the last commit. You can revert changes to all files since the last commit, or select the files to revert.

To revert changes:

  1. Above the file tree, click the Commit icon to access the Commit tab.
  2. Select the checkboxes of files you want to revert, or select All changes.
  3. Click the Revert icon and confirm the action.

Screenshot of modified files with revert icon highlighted

Search in files

You can search in the editor to find content or files or to find and replace content within the files of your project. To set search to files instead of content inside of files, click the Find a file icon above the search input field.

Screenshot of search files selector in UI

By default, search does not include a replace option. You can add the replace option by selecting the replace toggle.

Screenshot of replace toggle

Selecting the replace toggle again removes the option.

By default, searches include all folders, but you can specify a folder using the folder selector.

Screenshot of the folder selector

You can also specify whether search should match the case and whole word of your search query, and use regular expressions in your search query by clicking the icons in the search field.

Screenshot of search options

Sync with main

If you are working on a development branch, you may need to sync your branch with the main branch if changes have been added to main while you were working in the development branch.

You can sync your branch, pulling in the changes from main since you created your development branch, by clicking the Sync button at the bottom of the editor pane.

Screenshot of the Sync button at the bottom of the editor pane

  • Learn more about how you can access the deployment preview in Use previews.
  • See Use Webview to learn more about adjusting the live preview of your updates as you are editing your content in the editor.
  • To include files in a remote location in your project, see Add remote files.

Resources