cs-icon.svg

Ace Editor App Installation Guide

Ace Editor is a powerful code editor available in Contentstack that lets you write HTML, CSS, JavaScript, SQL, and other types of code. It provides an intuitive interface with syntax highlighting, auto-completion, and code folding features to make coding easier. It also supports multiple programming languages such as Java, .Net, PHP, Python, and more, making it a great choice for developers.

Contentstack Marketplace lets you integrate the Ace Editor app directly into your headless CMS. You can easily use this app to write, edit, and view code within the Contentstack environment.

Prerequisites

Let's follow this step-by-step guide to install and configure the Ace Editor app within your stack.

Steps for Execution

  1. Install and Configure the Ace Editor app in Contentstack Marketplace
  2. Use Ace Editor within your Stack Entry
  1. Install and Configure the Ace Editor app in Contentstack Marketplace

    Follow the steps to install the application in Contentstack.

    1. Log in to your Contentstack account.
    2. In the left-hand side primary navigation, click the Marketplace icon to go to the Marketplace.
      Marketplace-Icon
    3. Click Apps from the left panel.
    4. Within the Marketplace, you can see all the available apps. Hover over the Ace Editor app and click Install App.
      Ace-Editor-App
    5. In the popup window, select the stack where you want to install the Ace Editor app and click the Install button.
      Ace-Editor-Install-App
    6. On the UI Locations tab, you can see the predefined app locations. You can use the toggle button corresponding to each UI location to enable or disable it based on your requirements. Ace-Editor-UI-Locations

    7. Note: No additional configuration is required to use the Ace Editor app.

  2. Use Ace Editor within your Stack Entry

    To use the Ace Editor application within an entry of your stack, follow the steps given below:

    1. Go to your stack, click the Content Models icon in the left navigation panel, and click the + New Content Type button.
    2. Create a content type by adding relevant details as displayed below:
      Ace-Editor-Content-Type
    3. In the Content Type Builder page, add a Custom field in your content type by clicking the Insert a field link represented by a + sign.
    4. Under Select Extension/App, select Ace Editor, and click the Proceed button.
      Ace-Editor-Adding-In-Custom-Field
      Ace Editor is added in the custom field.
      Ace-Editor-Added-In-Custom-Field
    5. After adding the app in a custom field, click Save or Save and Close to save your changes.
    6. To use the Ace Editor app, create an entry for this content type. In the left navigation panel, navigate to the Entries page, click + New Entry to create a new entry for the above content type, and then click Proceed.
      You will see the Ace Editor custom field on your entry page as shown below:
      Ace-Editor-Sample-Entry
      Write, edit, and view code in the Ace Editor custom field. Let’s create a contact form using HTML:
      <form>
        <div class="input-fields">
          <input placeholder="Name*" />
        </div>
        <div class="input-fields">
          <input placeholder="Email*" />
        </div>
        <div class="text-field">
          <input type="text-area" placeholder="Message*" />
        </div>
        <button class="btn primary-btn">Send Message</button>
      </form>
      
      
      Ace-Editor-Example-Contact-Form
    7. After adding the code snippets, Save and Publish your entry.
      You can view the contact form on the web page.
      Ace-Editor-Example-Display-Contact-Form
Was this article helpful?
^