-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathindex.js
More file actions
22 lines (20 loc) · 829 Bytes
/
index.js
File metadata and controls
22 lines (20 loc) · 829 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
var editor = new ej.richtexteditor.RichTextEditor({
toolbarSettings: {
items: ['aicommands', 'aiquery']
},
aiAssistantSettings: {
prompts: [
{
prompt: 'What is Essential Studio ?',
response: 'Essential Studio is a software toolkit by Syncfusion that offers a variety of UI controls, frameworks, and libraries for developing applications on web, desktop, and mobile platforms. It aims to streamline application development with customizable, pre-built components.'
}
],
maxPromptHistory: 30
}
});
editor.appendTo('#editor');
document.getElementById('saveBtn').onclick = function (e) {
const promptHistory = editor.getAIPromptHistory();
console.log(promptHistory);
// Handle DB Post and save history to the DB.
};