Days
Hours
Minutes
Seconds
x
Skip to content
Froala Documentation

AI Assist Plugin

Plugins are fully functional during your trial once you've added your trial key to the setup.

Give your users AI writing and editing tools directly inside the Froala editor. Generate content, adjust tone, and translate text in one click.

The plugin offer two powerful functions:

    1. Ask Anything
      Open a smart AI chat popup.
      • Generate content from scratch
      • Expand ideas or rewrite paragraphs
      • Ask questions and get contextual answers

      All without leaving the editing flow.

    2. Edit Smarter with One Click

      Select any text and instantly:

      • Change tone (Professional, Casual, Friendly, and more)
      • Translate content into multiple languages

      No prompts. No complexity. Just results.

To use AI features in Froala, you need to accept the AI Supplemental Terms by setting the aiSupplementalTermsAccepted option to true in your configuration.

Plugin options:

aiSupplementalTermsAccepted
Boolean

To use AI features in Froala, you need to accept the AI Supplemental Terms by setting this option to true in your configuration.


Default: false

aiAssistEndpoint
String | null

The API endpoint URL for AI requests. Required if not using a custom request handler.


Default: null

aiAssistHeaders
Object

Additional HTTP headers to include with AI requests (e.g., authentication tokens).


Default: {}

aiAssistRequest
Function | null

Custom function to handle AI requests. If provided, this overrides the default endpoint-based approach.


Default: null

aiAssistDataKeys
Object | null

Custom mapping for request data keys. Use this to match your API’s expected field names.


Default: null

aiAssistAdditionalData
Object | null

Additional custom data fields to include in the request payload.


Default: null

aiAssistResponseParserPath

String | null

Path to extract the AI response from the API response object. Supports dot notation and array indexing.


Default: null

aiAssistToneOptions
Array

Defines the available tone adjustment options in the AI Shortcuts dropdown

aiAssistTranslateOptions
Array

Defines the available translation languages in the AI Shortcuts dropdown.

aiAssistPromptTemplate
String

The base template/instructions prepended to all AI requests.

 

Plugin methods:

aiAssist.showPromptPopup () Opens the AI Assist prompt popup, allowing users to enter custom prompts for AI content generation.

Plugin events:

aiAssist.beforeInsert (event, responseContent) Triggered before AI-generated content is inserted into the editor.
● event: The code content to be inserted.
● responseContent: The HTML content about to be inserted
aiAssist.afterInsert () Triggered after AI-generated content has been successfully inserted into the editor.

Add Plugin to your code:

Plugin name: aiAssist

Plugin JS Script:
../js/plugins/ai_assist.min.js

Or from CDN https://cdn.jsdelivr.net/npm/froala-editor@latest/js/plugins/code_snippet.min.js

Plugin CSS link: ../css/plugins/ai_assist.min.js.min.css

Or from CDN https://cdn.jsdelivr.net/npm/froala-editor@latest/css/plugins/code_snippet.min.css

Keyboard Shortcuts

Open AI Assist popup: Ctrl+Shift+I (Windows/Linux) or Cmd+Shift+I (Mac)

Toolbar Buttons

Open AI Assist popup: [“aiAssist”] Open AI dropdown: [“aiShortCuts”]