AIAssistantSettings
16 Dec 20253 minutes to read
Configures AI Assistant functionality for the Rich Text Editor component.
This class provides options to customize the appearance, behavior, and content of the AI Assistant feature.
Properties
bannerTemplate string|Function
Specifies the template for the banner in the AI Assistant component.
Represents the content or layout used to render the banner. Can be a string or a function.
Defaults to ’’
commands AICommands[]
Defines the predefined AI command options displayed in the command dropdown menu.
Each command contains text, prompts, icons, and optional nested items.
Defaults to [{text: “Edit & Improve”,items: [{text: “Improve Content”,prompt: “Improve the clarity, coherence, and overall quality of the following content:”},{text: “Shorten”,prompt: “Shorten the following content without losing its core message:”},{text: “Elaborate”,prompt: “Expand on the following content with more detail and explanation:”},{text: “Simplify”,prompt: “Simplify the language and make the following content easier to understand:”},{text: “Summarize”,prompt: “Summarize the following content in a concise and clear way:”},{text: “Check Grammar & Spelling”,prompt: “Check the following content for grammar and spelling mistakes, and correct them:”}]},{text: “Change Tone”,items: [{text: “Professional”,prompt: “Rewrite the following content in a professional tone:”},{text: “Casual”,prompt: “Rewrite the following content in a casual, conversational tone:”},{text: “Direct”,prompt: “Rewrite the following content to be more direct and to the point:”},{text: “Friendly”,prompt: “Rewrite the following content in a friendly and approachable tone:”},{text: “Inspirational”,prompt: “Rewrite the following content in an inspirational and motivational tone:”},{text: “Persuasive”,prompt: “Rewrite the following content in a persuasive tone to convince the reader:”}]},{text: “Change Style”,items: [{text: “Business”,prompt: “Rewrite the following content in a business writing style:”},{text: “Legal”,prompt: “Rewrite the following content in a formal legal writing style:”},{text: “Journalistic”,prompt: “Rewrite the following content in a journalistic/reporting style:”},{text: “Academic”,prompt: “Rewrite the following content in an academic writing style:”}]},{text: “Translate”,prompt: ““,items: [{text: “English”,prompt: “Translate the following content into English:”},{text: “German”,prompt: “Translate the following content into German:”},{text: “Spanish”,prompt: “Translate the following content into Spanish:”},{text: “French”,prompt: “Translate the following content into French:”},{text: “Japanese”,prompt: “Translate the following content into Japanese:”},{text: “Simplified Chinese”,prompt: “Translate the following content into Simplified Chinese:”},{text: “Hindi”,prompt: “Translate the following content into Hindi:”},{text: “Arabic”,prompt: “Translate the following content into Arabic:”}]}]
headerToolbarSettings []
Configures the toolbar in the header section of the AI Assistant interface.
Allows customization of toolbar items, appearance, and behavior.
Defaults to [‘AIcommands’, ‘Close’]
maxPromptHistory number
Defines the maximum number of prompts that can be stored in the editor’s
history stack.
Once the limit is reached, the oldest entries are removed as new ones
are added to maintain the maximum size.
Defaults to 20
placeholder string
Specifies the placeholder text shown in the AI prompt textarea.
Defaults to ‘Ask AI to rewrite or generate content.’
popupMaxHeight string|number
Sets the max height of the AI Assistant popup.
Accepts CSS height values (e.g., ‘350px’, ‘500’) or numbers (treated as pixels).
Defaults to ‘400px’
popupWidth string|number
Sets the width of the AI Assistant popup.
Accepts CSS width values (e.g., ‘400px’, ‘500’) or numbers (treated as pixels).
Defaults to ‘600px’
promptToolbarSettings []
Configures the toolbar in the prompt editor (user input) section.
Allows customization of toolbar items, appearance, and behavior for the input area.
Defaults to [‘Edit’, ‘Copy’]
prompts PromptModel[]
Defines the collection of predefined prompts and their corresponding responses.
These prompts can be presented to the user as quick-access options.
Defaults to []
responseToolbarSettings []
Configures the toolbar in the AI response viewer section.
Allows customization of toolbar items, appearance, and behavior for the response area.
| Defaults to *[‘Regenerate’, ‘Copy’, ‘ | ’, ‘Insert’]* |
suggestions string[]
Defines suggestion prompts displayed to the user as guidance.
These suggestions help users understand what kinds of queries they can make.
Defaults to []