> ## Documentation Index
> Fetch the complete documentation index at: https://moengage-analytics-query-api-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Drag and Drop Editor

> Customize every element of your MoEngage in-app campaign with the drag and drop editor. Start from scratch or use pre-built templates for quick setup.

The new **Drag and Drop editor** lets you customize everything about your In-app campaign. MoEngage allows you to customize and work with our pre-built templates or build a new campaign from scratch.

You can access the Drag and Drop editor in the content section of an In-app campaign. Here, you get two options.

* [Start with a blank canvas](#start-with-a-blank-canvas)
* [Explore pre-built templates](#explore-pre-built-templates)

<img src="https://mintcdn.com/moengage-analytics-query-api-docs/QM8Jxj1UOgs1MH53/images/moengage_75115f.png?fit=max&auto=format&n=QM8Jxj1UOgs1MH53&q=85&s=521f02f0628314496b493435b5514315" alt="" width="2744" height="1196" data-path="images/moengage_75115f.png" />

## Video Tutorial

<iframe src="https://www.youtube.com/embed/i2AaeVcd4OM" title="YouTube video player" frameborder="0" className="w-full aspect-video rounded-xl" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen />

# Start with a blank canvas

When you click on **Start with a blank canvas**, you will get redirected to the Drag and drop editor.

<img src="https://mintcdn.com/moengage-analytics-query-api-docs/FeDOaUaZp6fDSte_/images/moengage_810549.png?fit=max&auto=format&n=FeDOaUaZp6fDSte_&q=85&s=abe14f8800230edc2bcda85aa0892218" alt="" width="2732" height="2856" data-path="images/moengage_810549.png" />

## Content

The content section contains all the blocks you can add to your In-app campaign. To get started with your campaign, a row is automatically added where you must add the content blocks.

1. **Title**: The title block lets you add a title text to the campaign. You can change the styling and font of the title by clicking on the **Title block**. This will open a **Content Properties**section on the right-hand side where you can make further modifications. <img src="https://mintcdn.com/moengage-analytics-query-api-docs/nZu1UfmK3xhnLqhR/images/moengage_574013.png?fit=max&auto=format&n=nZu1UfmK3xhnLqhR&q=85&s=41a1c4df7fdf19f09566d4df3c1e2da0" width="2702" height="1442" data-path="images/moengage_574013.png" />
   * You can also delete or duplicate the block by clicking on the **Delete** and **Duplicate** icons below the block.
2. **Paragraph**: The paragraph block lets you add text to the campaign. You can make similar modifications to the text here as the title block.
3. **List**: The list block lets you add an unordered list to the campaign. You can make similar modifications to the text here as the title block.
4. **Image**: The image block lets you add an image to the campaign. You can either drag and drop an image on the block or click on **Browse**and upload a new image. <img src="https://mintcdn.com/moengage-analytics-query-api-docs/eJTcJrF1-vmsOukF/images/moengage_6f1075.png?fit=max&auto=format&n=eJTcJrF1-vmsOukF&q=85&s=6f9eb7e70b30204de5f06cb14aaa1cd0" width="834" height="572" data-path="images/moengage_6f1075.png" />
   * After adding your image, you can modify its width and alignment from the editor on the right-hand side. You can also click on **Apply Effect**to filter, resize, crop, or do more with your image.
   * You can add links to your image and enable click tracking on it by using attributes.
5. **Button**: The button block lets you add a button to the campaign. You can style the buttons and add actions to them as well. Drag and drop the button to the screen and click on it to get the edit options.
6. **Divider**: The divider block can be used to add a divider between two other content blocks or rows. You can modify the width and styling of the divider in the content properties section.
7. **Spacer**: The spacer block can be placed between two content blocks or rows to add some separation between the two.
8. **Social**: The social block lets you add social media links to your campaign. You can add the relevant URLs in the content properties section on the right-hand side of the editor. <img src="https://mintcdn.com/moengage-analytics-query-api-docs/sTa-MpGol_Z26FCg/images/moengage_58b653.png?fit=max&auto=format&n=sTa-MpGol_Z26FCg&q=85&s=3198200d23415ea9f2a9d423559a022e" width="444" height="134" data-path="images/moengage_58b653.png" />
   * You can also click on **New Element** in the content properties section to add any other social media links that you might want to include in the campaign.
9. **HTML**: The HTML block lets you add custom HTML to your campaign.
10. **Video**: The video block lets you add a video to your campaign. You can upload a YouTube video, a Vimeo video, or a URL for a video.
11. **Icons**: The icon block lets you add an icon to your campaign. You can click on **Apply Effects**in the content properties section to filter, resize, crop, or do more with your icon. <img src="https://mintcdn.com/moengage-analytics-query-api-docs/h_14varmBpj2xk72/images/moengage_4396fd.png?fit=max&auto=format&n=h_14varmBpj2xk72&q=85&s=6fbfbde87d33e4296eabadc97f8a1ca7" width="868" height="552" data-path="images/moengage_4396fd.png" />
    * Other than changing the icon image itself, you can also modify the URL of the icon and some text to the icon by enabling the **More options** button.
12. **Menu**: The menu block allows you to create a menu in your campaign. You can add multiple items here and modify them in the content properties section.
13. **Text**: The text block lets you add text to your campaign. You can edit the text directly inside the text block, and you can add font and styling options to it by clicking on the text block and accessing the editor above it.
14. **GIFs**: The GIFs block lets you add a video to your campaign. You can search for GIFs with Giphy and select the GIF that you want to add.
15. **Form**: The Form box allows you to add a form to your campaign to collect user information within your app. To learn more, see [Add Forms to your In-app Campaign](/user-guide/campaigns-and-channels/in-app-message/templates/drag-and-drop-editor/add-forms-to-your-in-app-campaign).

<Info>
  If you want to overwrite the CSS for a content block, you can toggle the **Block identifier** in the **Content Properties** section and retrieve the ID of the content block. You can use this ID to change the CSS for the content block by using it in the HTML element. Please take a look at the FAQs to learn more about how you can use this to modify fonts in the template.   <img src="https://mintcdn.com/moengage-analytics-query-api-docs/pVjheTiQ-imF5UPX/images/moengage_ff2e94.png?fit=max&auto=format&n=pVjheTiQ-imF5UPX&q=85&s=8c2b00394c45ed066c414aad1794c686" width="1630" height="440" data-path="images/moengage_ff2e94.png" />
</Info>

## Portrait vs. Landscape Mode

The rendering of your In-app campaign varies a lot between portrait mode and landscape mode. You can modify and edit the content blocks that you use to ensure that your campaigns do not look out of place.

1. You can choose to hide a content block in either portrait or landscape mode.
   * Navigate to **Block Options**in the **Content Properties**section.
   * Ensure that the **More options** button is enabled.
   * Click on the **Mobile**icon if you want to hide the content block in portrait mode.
   * Click on the **Desktop** icon if you want to hide the content block in landscape mode. <img src="https://mintcdn.com/moengage-analytics-query-api-docs/LWEH9kfXItHS8cCf/images/moengage_acd85d.png?fit=max&auto=format&n=LWEH9kfXItHS8cCf&q=85&s=19f651908836211ed08705f53021bb3f" width="784" height="572" data-path="images/moengage_acd85d.png" />
2. You can also use the **Auto width** section under **Content Properties**to modify your In-app campaign for landscape mode.
   * Select the **Full width on mobile**checkbox if you want the element to cover the width of the screen in portrait mode.
   * You can then modify the width of the content block on landscape mode by using the slider.
   * Alternatively, you can also select the **Auto width**option which fixes the width of the content block automatically. <img src="https://mintcdn.com/moengage-analytics-query-api-docs/Fzkx2KaNXjuqlb2f/images/moengage_4f787d.png?fit=max&auto=format&n=Fzkx2KaNXjuqlb2f&q=85&s=6103e98e31f5c7f5834e5a19525dae57" width="850" height="390" data-path="images/moengage_4f787d.png" />

## Attributes

You can add **attributes** to images, videos, buttons, and GIFs. To do so, scroll down in the **Content Properties** section on the right-hand side of the editor and click on **+ Add New Attribute**. You can either search from the attributes provided to you or add your own custom attributes.

<img src="https://mintcdn.com/moengage-analytics-query-api-docs/dKEqeh2ILfSrPmB2/images/moengage_26ebab.png?fit=max&auto=format&n=dKEqeh2ILfSrPmB2&q=85&s=663d81a09c7855745cac7a58f4c2815b" alt="" width="830" height="386" data-path="images/moengage_26ebab.png" />

The list of attributes provided by MoEngage is:

1. **Navigation**: This action will allow you to open a webpage inside your app in web view when your users click on the content block you assigned this attribute to. <img src="https://mintcdn.com/moengage-analytics-query-api-docs/c3B5-6wSDAwIjTIc/images/moengage_f236c1.png?fit=max&auto=format&n=c3B5-6wSDAwIjTIc&q=85&s=6f1c52a881d30b53da49c926674a2747" width="1412" height="806" data-path="images/moengage_f236c1.png" />
2. **Track Event**: This action allows you to track an event on click of the In-app message and also track an event attribute along with this. <img src="https://mintcdn.com/moengage-analytics-query-api-docs/QM8Jxj1UOgs1MH53/images/moengage_761878.png?fit=max&auto=format&n=QM8Jxj1UOgs1MH53&q=85&s=44e0704f7e5b69486f59e253cebfbdeb" width="1414" height="742" data-path="images/moengage_761878.png" />
3. **Set User Attribute**: This action will assign a value of your choice to any user attribute that you want to modify. As soon as the user clicks on a content block with this attribute, the user attribute that you chose will be set as the value you entered. <img src="https://mintcdn.com/moengage-analytics-query-api-docs/FInxxepvJ7fQg4D1/images/moengage_4aaa78.png?fit=max&auto=format&n=FInxxepvJ7fQg4D1&q=85&s=d17848e287478ddf43f0c3e08c7998fd" width="1416" height="794" data-path="images/moengage_4aaa78.png" />
4. **Copy Coupon Code**: This action allows you to add a Coupon code to a content block. When the user clicks on the content block, the coupon code will get copied in their keyboard. You can also add some personalization to this attribute. <img src="https://mintcdn.com/moengage-analytics-query-api-docs/hWQJFSyoPH_i3a3D/images/moengage_5e9f49.png?fit=max&auto=format&n=hWQJFSyoPH_i3a3D&q=85&s=713432915e0e8696d5e829c55c2a63d4" width="1412" height="792" data-path="images/moengage_5e9f49.png" />
5. **Call**: You can now call a user as soon as they click on on the content block you assigned this attribute to. Enter the *Mobile No.* to do so. <img src="https://mintcdn.com/moengage-analytics-query-api-docs/mRQ1JZ0HlweVAOSg/images/moengage_22518b.png?fit=max&auto=format&n=mRQ1JZ0HlweVAOSg&q=85&s=4e294b5796e9e7f800d8cb6f97f2aacb" width="1418" height="662" data-path="images/moengage_22518b.png" />
6. **SMS**: You can send a message to the user as soon as they click on your message. Enter the *Mobile No*. and the *Message* content to send your SMS. <img src="https://mintcdn.com/moengage-analytics-query-api-docs/tTfPzvGgGO8QS9Fo/images/moengage_b8b8eb.png?fit=max&auto=format&n=tTfPzvGgGO8QS9Fo&q=85&s=4101d8daf93cafeb2511940d2e20cdfe" width="1418" height="1040" data-path="images/moengage_b8b8eb.png" />
7. **Custom Action**: You can also define custom actions in your mobile app which can then be executed when the user clicks on the In-app campaign. <img src="https://mintcdn.com/moengage-analytics-query-api-docs/gqChNvoAV1K0IMzK/images/moengage_3a2aef.png?fit=max&auto=format&n=gqChNvoAV1K0IMzK&q=85&s=4196123c5668628cd0edcc44f84460ad" width="1418" height="712" data-path="images/moengage_3a2aef.png" />
8. **Navigate to Notification Settings**: When a user clicks on the content block with this attribute, they will be redirected to their notification settings for your app.

<Info>
  * Click tracking is automatically enabled for all content blocks where an action is added.
  * If you add multiple types of action on a single content block, then each action will account for one tracked click.
</Info>

## Rows

You can drag and drop a row onto the screen to create a layout for your In-app campaign. All content blocks are added to a row where their positioning and placement can be modified.

#### Row Properties

When you click on a Row on the editor, you can access the **Row Properties**section on the right-hand side of your screen. In this section, you can modify the background of the row, the layout of the row, the column structure, and more.

You can also modify the background color of the row, and add an image or video to it if you want.

<img src="https://mintcdn.com/moengage-analytics-query-api-docs/xmBTezCZOP5Q8cSU/images/moengage_e1685f.png?fit=max&auto=format&n=xmBTezCZOP5Q8cSU&q=85&s=532a418efe98e77aa73c1e044ce0bb65" alt="" width="878" height="1230" data-path="images/moengage_e1685f.png" />

<Info>
  The **Content area background color**option provides a background color to the text of the row. If you choose to use the **Row background color**option instead, it fills in the entirety of the background of the row.
</Info>

### Settings

The settings in the editor can be used to standardize a default font and link color for all your links.

<img src="https://mintcdn.com/moengage-analytics-query-api-docs/EmRO673igszh_zlm/images/moengage_176635.png?fit=max&auto=format&n=EmRO673igszh_zlm&q=85&s=93c421031afcddece66c7be21d9aee85" alt="" width="844" height="546" data-path="images/moengage_176635.png" />

# Explore pre-built templates

To find the pre-built templates for **drag and drop editor**, you can either click on **Explore pre-built templates** or find them through the filter.

* Search: Search for **Drag and drop** in the **Search templates**section. <img src="https://mintcdn.com/moengage-analytics-query-api-docs/MeUdCPw1UK4cXHEf/images/moengage_ce0710.png?fit=max&auto=format&n=MeUdCPw1UK4cXHEf&q=85&s=c5764b35464ef3a1526f469223e94c8d" width="1476" height="830" data-path="images/moengage_ce0710.png" />
* **Filter By Editor**: Select the **Drag and drop**checkbox and view the available templates. <img src="https://mintcdn.com/moengage-analytics-query-api-docs/ctBTwn9sDIr0LbBo/images/moengage_8a0363.png?fit=max&auto=format&n=ctBTwn9sDIr0LbBo&q=85&s=4532a5e4f733a9f5c3742743eec6d08f" width="456" height="358" data-path="images/moengage_8a0363.png" />

You can customize all of the blocks on the pre-built templates and create your In-app campaign.

## Templates

You can save, change, or reset a template by clicking on the **menu** icon on the top right-hand side of the editor. When you click on **Change template**, you will be redirected to the template selection menu where you can choose to work with a blank canvas or use one of MoEngage's prebuilt templates.

<img src="https://mintcdn.com/moengage-analytics-query-api-docs/wmiIN-H-PtSrzLh0/images/moengage_77eb0d.png?fit=max&auto=format&n=wmiIN-H-PtSrzLh0&q=85&s=baf9956c1715a3c4c8520e3451d10d5b" alt="" width="1304" height="454" data-path="images/moengage_77eb0d.png" />

<Info>
  The **Mirror Platforms**option on the top of the **Drag and drop editor**lets you simultaneously make the same changes in both iOS and Android platforms.

  <img src="https://mintcdn.com/moengage-analytics-query-api-docs/eJTcJrF1-vmsOukF/images/moengage_718723.png?fit=max&auto=format&n=eJTcJrF1-vmsOukF&q=85&s=31c408038cb6a07784516639acf74abd" alt="" width="986" height="156" data-path="images/moengage_718723.png" />
</Info>

### Template Settings

You can select the **Allowed device orientation**by navigating to **Template Settings**at the bottom of the editor. You can also select the device types where you want the In-app campaign to be visible.

<img src="https://mintcdn.com/moengage-analytics-query-api-docs/ifN61nrduWX4LCim/images/moengage_a200ff.png?fit=max&auto=format&n=ifN61nrduWX4LCim&q=85&s=cb6c4e60ba19490bedd3e726605c7ba8" alt="" width="1158" height="524" data-path="images/moengage_a200ff.png" />

# FAQs

## How to Use Custom Fonts in the In-App Drag and Drop Editor?

To incorporate custom fonts into your templates using MoEngage's in-app drag and drop editor, follow these detailed steps:

#### **1. Host Your Font File**

First, ensure that your custom font file is hosted on a secure domain or a publicly accessible URL. For example, you can use a URL like `https://yourdomain.com/fonts/yourfont.ttf`.

For demonstration purposes, here's a sample link to the Roboto font: `https://fonts.gstatic.com/s/roboto/v30/KFOmCnqEu92Fr1Mu5mxKKTU1Kvnz.woff2`

To confirm a successful upload, clicking the URL should initiate a font file download.

#### **2. Select a Template**

Choose a template within the editor that you wish to modify. This template should be compatible with the drag-and-drop functionality.

<img src="https://mintcdn.com/moengage-analytics-query-api-docs/EmRO673igszh_zlm/images/moengage_18cbde.png?fit=max&auto=format&n=EmRO673igszh_zlm&q=85&s=c83f9a1e530a7e8a8aac914c824d4eef" alt="inapp select template.png" width="2706" height="1542" data-path="images/moengage_18cbde.png" />

#### **3. Modify Element Identifiers**

Identify the elements (like text or headings) where you want to apply the custom font. Click on the element in the template to open its properties.

* **For a heading element:** Enable the block identifier feature and assign a unique identifier, such as `heading_id`.
* **For a text element:** Similarly, assign a unique identifier like `text_id`.

In this case, we want the same font to be applied to both elements, so we will use the text\_id identifier for both elements.

<img src="https://mintcdn.com/moengage-analytics-query-api-docs/Z6LOq1LQDBe-bvV8/images/moengage_e937bd.png?fit=max&auto=format&n=Z6LOq1LQDBe-bvV8&q=85&s=454e12966b26297e3988d63eb52b556f" alt="inapp add block id value.png" width="2216" height="1382" data-path="images/moengage_e937bd.png" />

#### **4. Add HTML Content Block**

Drag and drop an HTML content block into your template at the desired location. Note that this HTML element will not be visible to the user and we will use it to only modify the font style within the template.

<img src="https://mintcdn.com/moengage-analytics-query-api-docs/VA7EbWABunFQ0gfA/images/moengage_d46651.png?fit=max&auto=format&n=VA7EbWABunFQ0gfA&q=85&s=c73ff819142540fd4e76fa28c147c772" alt="inapp add html block.png" width="2684" height="1546" data-path="images/moengage_d46651.png" />

#### **5. Insert Custom Font Code**

Replace the existing code in the HTML content block with the following CSS to define and apply your custom font:

```html wrap theme={null}
<style> @font-face {  font-family: 'customfont',  src: url('https://yourdomain.com/fonts/yourfont.ttf'); /* Use your hosted font URL */ } div[class$="text_id"], #text_id {  p, h1 {   font-family: customfont !important;  } }</style>
```

This CSS snippet utilizes the `@font-face` rule to define 'customfont' using the font hosted at your provided URL. It then ensures that any paragraph (`p`) or heading (`h1`) within elements with IDs `text_id` will use the custom font.

<img src="https://mintcdn.com/moengage-analytics-query-api-docs/xqg7J9GuW1XHY7Tk/images/moengage_9b58a4.png?fit=max&auto=format&n=xqg7J9GuW1XHY7Tk&q=85&s=566e6a2a8e19590866aadf986e6846d2" alt="inapp add css code.png" width="2700" height="1258" data-path="images/moengage_9b58a4.png" />

#### **6. Preview and Publish**

Preview the changes in the editor to ensure the custom font is applied correctly. Once satisfied, you can proceed to publish your campaign.

## How to Add a Cross Button to Your Template?

To add a cross button to your template, follow the steps detailed below:

1. Have an image of the cross button available as an URL.
2. Add a new row element and drag and drop the image element as shown below. <img src="https://mintcdn.com/moengage-analytics-query-api-docs/ctBTwn9sDIr0LbBo/images/moengage_899dc9.png?s=8514fd2c81f293c638cfa8ace74805b2" alt="2025-03-25_17-38-51 (1).gif" width="1680" height="842" data-path="images/moengage_899dc9.png" />
3. Click the image element and enter the URL for your image in the **Url** field as shown below. <img src="https://mintcdn.com/moengage-analytics-query-api-docs/hWQJFSyoPH_i3a3D/images/moengage_5edddd.png?s=c30f16ff2623518b2e5fa1837075c1ad" alt="2025-03-25_17-43-41 (1).gif" width="1582" height="758" data-path="images/moengage_5edddd.png" />
4. Adjust the image according to your needs. <img src="https://mintcdn.com/moengage-analytics-query-api-docs/Y31ab75R1bS4e0sI/images/moengage_c64de3.png?s=67cdfe4c7e92309b278662918a9b5536" alt="2025-03-25_17-46-39 (1).gif" width="1570" height="776" data-path="images/moengage_c64de3.png" />
5. Under the **ATTRIBUTES** section, click **Add new attribute**.
6. Select *class* and set it as *close-btn*. <img src="https://mintcdn.com/moengage-analytics-query-api-docs/e-xTJgaB2EK9nPFr/images/moengage_ebe001.png?s=1bba6364c08927056abc198d2436f8a7" alt="2025-03-25_18-03-32 (1).gif" width="1574" height="798" data-path="images/moengage_ebe001.png" />
