CKEditor AI Integration
The CKEditor AI integration within the ADITO platform empowers users to efficiently generate, transform, and enhance textual content directly in the editor using natural language inputs. By leveraging either an external AI service (e.g., OpenAI) or our in-house AI model, the integration delivers advanced capabilities such as content summarization, translation, rewriting for clarity or tone, and text generation. This functionality supports both freeform natural-language requests and predefined reusable commands, thereby enhancing productivity and writing quality across diverse use cases.
Key benefits of the AI Assistant include:
- Efficient content summarization
- Accurate text translation
- Context-aware rewriting for improved clarity or tone
- Intelligent text continuation and suggestion generation
This documentation provides a step-by-step guide to configuring and enabling the CKEditor AI features within the ADITO platform.
📎 CKEditor AI Assistant Demo
Features​
-
AI Assistant
Allows freeform input for natural-language requests applied to the entire document or selected text. -
AI Commands
Supports predefined, reusable prompts enabling rapid text transformations.
Creating an AI Alias​
To define a new AI alias in your project:
- Right-click the
alias
folder in your project tree. - Select New and then select the AI type.
- Deploy the project changes to activate the alias.
Figure: Creating an AI alias
Configuring the AI Alias​
A new configuration entry becomes available under System Configuration.
- Right-click and select Create.
- In the properties tool window, specify the following:
Figure: Creating alias configuration entry
Required Properties​
Property | Description |
---|---|
endpointUrl | Endpoint URL for AI requests |
token | API key for authenticating requests |
requestParameters | JSON object specifying parameters for the AI endpoint |
timeout (since core Version 2025.1.3) | Defines the timeout duration in milliseconds for requests to the AI service. The default value is 300000 (5 minutes). |
For detailed AI provider configuration options, see the AI Provider Configuration section below.
Figure: Alias properties configuration
An AI alias must be created in order to use any AI features in the client.
Enabling AI Features in CKEditor​
Use the Project Preferences (XML Editor) to enable and customize CKEditor AI features.
Figure: Configuring AI properties
Preferences Properties​
Property | Description |
---|---|
ckeditorAIAlias | Reference to the AI alias containing URL, token, and parameters |
ckeditorAIAssistantEnabled | Enables the AI Assistant for freeform natural-language requests |
ckeditorDefaultAISystemPromptProcess | Specifies a process that returns the default AI system prompt that should be used for AI requests from the CKEditor. The default prompt can be overwritten by the property ckeditorAISystemPromptProcess in the entityField of the CKEditor. |
ckeditorDefaultAICommandsProcess | Specifies a process that returns the default AI commands that should be visible in the CKEditor. The default commands can be overwritten by the property ckeditorAICommandsProcess in the entityField of the CKEditor. If no process is set or an empty value is returned from the process then no commands will be shown in the CKEditor (can still be overwritten by the entityField) |
An alias must be configured in order to use the AI features in the editor. Otherwise no features will be available.
Example: ckeditorDefaultSystemPromptProcess​
import {result} from "@aditosoftware/jdito-types";
result.string("Custom default system prompt that is used for every AI request from the CKEditor");
Example: ckeditorDefaultAICommandsProcess​
import {result} from "@aditosoftware/jdito-types";
result.string("[{\"groupId\": \"customGroupId\", \"groupLabel\": \"My group of commands\", \"commands\": [{\"id\": \"translateSpanish\", \"label\": \"Translate to Spanish\", \"prompt\": \"Translate this text to Spanish.\"}]}]");
The default commands can be localized to the users language by using the translate.text
methods within the
ckeditorDefaultAICommandsProcess
.
For detailed information on official API integration, refer to the CKEditor AI Assistant Documentation.
Entityfield Properties​
AI Features can be enabled/disabled for specific entity fields by using the following properties:
Property | Description |
---|---|
ckeditorAIAssistantEnabled | Determines whether the AI Assistant is active for this CKEditor instance.Behavior:null (default): inherits the global ckeditorAIAssistantEnabled flag from the preferences.true: enable the AI Assistant for this instance of the CKEditor (Overrides the global setting).false: disable the AI Assistant for this instance of the CKEditor (Overrides the global setting). |
ckeditorAISystemPromptProcess | Overrides the global default setting. Specifies a process that overwrites the default AI system prompt that is set in the ckeditorDefaultAISystemPromptProcess in the preferences. The process should return a string that describes how the AI should behave. If null is returned, then the default CKEditor prompt is used: "Your task is to generate HTML content accordingly to the given instruction. Never include img tag in your response even if asked for. Your answer must be a well-structured and properly formatted HTML code. Answer only with the generated HTML content. Do not add any additional remarks or notes. Do not act like a chatbot or a real person." |
ckeditorAICommandsProcess | Overrides the global default setting. Specifies a process that returns the default AI commands that should be visible for this instance of the CKEditor. If an empty value is returned from the process then no commands will be shown in the CKEditor. |
Permissions​
Only users with the INTERNAL_AI
role will be able to see and use the AI features of the CKEditor. (since core version 2025.1.1)
CKEditor Toolbar Integration​
After restarting the system, AI features become accessible directly within the CKEditor toolbar.
Figure: CKEditor toolbar with AI features enabled
Ensure that the AI alias is properly configured and the project has been redeployed for the AI features to appear in the toolbar.
AI Provider Configuration​
ADITO AI Model Configuration​
To use the internal ADITO AI model, configure the AI alias with the following values:
Property | Value |
---|---|
endpointUrl | https://ai.adito.cloud/chat/completions |
token | <your-adito-api-key> |
requestParameters | See JSON configuration below |
{
"model": "adito-llm",
"stream": true
}
OpenAI Configuration​
To use OpenAI as the AI provider, configure the AI alias with the following values:
Property | Value |
---|---|
endpointUrl | https://api.openai.com/v1/chat/completions |
token | <your-openai-api-key> |
requestParameters | See JSON configuration below |
{
"model": "gpt-3.5-turbo",
"max_tokens": 2000,
"temperature": 1,
"top_p": 1,
"stream": true
}
Ensure that your API key has access to the required OpenAI model and enough usage quota.