OpenDialog Docs
opendialog.aiStart BuildingTalk to an expert
  • GETTING STARTED
    • Introduction
    • Getting ready
    • Billing and plans
    • Quick Start AI Agents
      • Quick Start AI Agent
      • The "Start from Scratch" AI Agent
        • Chat Management Conversation
        • Welcome Conversation
        • Topic Conversation
        • Global No Match Conversation
        • Supporting LLM Actions
        • Semantic Classifier: Query Classifier
      • A Process Handling AI Agent
  • STEP BY STEP GUIDES
    • AI Agent Creation Overview
    • Add a new topic of discussion
    • Use knowledge sources via RAG
    • Adding a structured conversation
    • Add a 3rd party integration
    • Test and tweak your AI Agent
    • Publish your AI Agent
  • CORE CONCEPTS
    • OpenDialog Approach
      • Designing Conversational AI Agents
    • OpenDialog Platform
      • Scenarios
        • Conversations
        • Scenes
        • Turns and intents
      • Language Services
      • OpenDialog Account Management
        • Creating and managing users
        • Deleting OpenDialog account
        • Account Security
    • OpenDialog Conversation Engine
    • Contexts and attributes
      • Contexts
      • Attributes
      • Attribute Management
      • Conditions and operators
      • Composite Attributes
  • CREATE AI APPLICATIONS
    • Designing your application
      • Conversation Design
        • Conversational Patterns
          • Introduction to conversational patterns
          • Building robust assistants
            • Contextual help
            • Restart
            • End chat
            • Contextual and Global No Match
            • Contextual FAQ
          • Openings
            • Anatomy of an opening
            • Transactional openings
            • Additional information
          • Authentication
            • Components
            • Example dialog
            • Using in OpenDialog
          • Information collection
            • Components
            • Example dialog
            • Using in OpenDialog
            • Additional information
          • Recommendations
            • Components
            • Example dialog
            • Additional information
          • Extended telling
            • Components
            • Example dialog
            • Additional information
          • Repair
            • Types of repair
            • User request not understood
            • Example dialog
            • Additional information
          • Transfer
            • Components
            • Example dialog
            • Additional information
          • Closing
            • Components
            • Example dialog
            • Using in OpenDialog
            • Additional information
        • Best practices
          • Use Case
          • Subject Matter Expertise
          • Business Goals
          • User needs
            • Primary research
            • Secondary research
            • Outcome: user profile
          • Assistant personality
          • Sample dialogs
          • Conversation structure
          • API Integration Capabilities
          • NLU modeling
          • Testing strategy
          • The team
            • What does a conversation designer do
          • Select resources
      • Message Design
        • Message editor
        • Constructing Messages
        • Message Conditions
        • Messages best practices
        • Subsequent Messages - Virtual Intents
        • Using Attributes in Messages
        • Using Markdown in messages
        • Message Types
          • Text Message
          • Image Message
          • Button Message
          • Date Picker Message
          • Audio Message
          • Form Message
          • Full Page Message
          • Conversation Handover message
          • Autocomplete Message
          • Address Autocomplete Message
          • List Message
          • Rich Message
          • Location Message
          • E-Sign Message
          • File Upload Message
          • Meta Messages
            • Progress Bar Message
          • Attribute Message
      • Webchat Interface design
        • Webchat Interface Settings
        • Webchat Controls
      • Accessibility
      • Inclusive design
    • Leveraging Generative AI
      • Language Services
        • Semantic Intent Classifier
          • OpenAI
          • Azure
          • Google Gemini
          • Output attributes
        • Retrieval Augmented Generation
        • Example-based intent classification [Deprecated]
      • Interpreters
        • Available interpreters
          • OpenDialog interpreter
          • Amazon Lex interpreter
          • Google Dialogflow
            • Google Dialogflow interpreter
            • Google Dialogflow Knowledge Base
          • OpenAI interpreter
        • Using a language service interpreter
        • Interpreter Orchestration
        • Troubleshooting interpreters
      • LLM Actions
        • OpenAI
        • Azure OpenAI
        • Output attributes
        • Using conversation history (memory) in LLM actions
        • LLM Action Analytics
    • 3rd party Integrations in your application
      • Webhook actions
      • Actions from library
        • Freshdesk Action
        • Send to Email Action
        • Set Attributes Action
      • Conversation Hand-off
        • Chatwoot
    • Previewing your application
    • Launching your application
    • Monitoring your application
    • Debugging your application
    • Translating your application
    • FAQ
    • Troubleshooting and Common Problems
  • Developing With OpenDialog
    • Integrating with OpenDialog
    • Actions
      • Webhook actions
      • LLM actions
    • WebChat
      • Chat API
      • WebChat authentication
      • User Tracking
      • Load Webchat within page Element
      • How to enable JavaScript in your browser
      • SDK
        • Methods
        • Events
        • Custom Components
    • External APIs
  • Release Notes
    • Version 3 Upgrade Guide
    • Release Notes
Powered by GitBook
On this page
  • Adding custom attributes to your Markdown
  • Syntax highlighting
  1. CREATE AI APPLICATIONS
  2. Designing your application
  3. Message Design

Using Markdown in messages

PreviousUsing Attributes in MessagesNextMessage Types

Last updated 4 months ago

In order to add richness and enhance our end users' experience when using the WebChat interface, it is possible to use Markdown within message types that have a significant text component. The currently supported message types are: Text, Button, Form and Rich. OpenDialog supports all the of the Markdown syntax, as well as and .

Adding custom attributes to your Markdown

In addition to providing Markdown support, OpenDialog also supports the use of Markdown attributes within WebChat. This allows designers to add their own classes and IDs to elements within the message content so that they can be styled later using external CSS. To avoid any security concerns, only a limited set of HTML attributes will be accepted; these are:

class, id, rel, role, title

To specify a custom class & ID for an element, use the following syntax:

## How to change your email address. [[.header--green #header]]

// output
<h2 id="header" class="header--green">How to change your email address.</h2>

For classes and IDs, use . and # respectively, for the other supported attributes you can use the following syntax:

[[title="my amazing title"]]

Occasionally there may be some ambiguity over which element the attribute should be applied to. In the case of the list below for example, we can solve this using the placement of the attribute markdown:

- list item **bold**[[.red]]

// output
<ul>
    <li>list item <strong class="red">bold</strong></li> // the class is applied to the <strong> element
<ul>

- list item **bold** [[.red]]

// output
<ul>
    <li class="red">list item <strong>bold</strong></li> // adding a space applies the class to the <li>
</ul>

- list item **bold**
[[.red]]

// output
<ul class="red"> // putting the attribute markdown on a new line applies the class to the wrapping element
    <li>list item <strong>bold</strong></li>
</ul>

- item
  - nested item [[.a]]
[[.b]]

[[.c]]

// output
<ul class="c">
  <li>item
    <ul class="b">
      <li class="a">nested item</li>
    </ul>
  </li>
</ul>

Syntax highlighting

WebChat will add syntax highlighting to fenced code blocks so that code examples are easier to read for users. If no language is supplied, it will attempt to detect the language and highlight appropriately, however you can also specify the language using the following syntax (note the language name at the end of the first 'fence'):

```json
{
  "firstName": "John",
  "lastName": "Smith",
  "age": 25
}
```

For more information, you can check out the , but be aware that in OpenDialog we use [[ ]] to denote an attribute, NOT { } as used in the above link.

documentation here
basic features
tables
fenced code blocks
You can add your Markdown formatted content directly in the message editor