@hivegpt/hiveai-angular 0.0.282 → 0.0.283
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/hivegpt-hiveai-angular.umd.js +19 -1
- package/bundles/hivegpt-hiveai-angular.umd.js.map +1 -1
- package/bundles/hivegpt-hiveai-angular.umd.min.js +1 -1
- package/bundles/hivegpt-hiveai-angular.umd.min.js.map +1 -1
- package/esm2015/lib/components/bot-html-editor/bot-html-editor.component.js +19 -2
- package/fesm2015/hivegpt-hiveai-angular.js +18 -1
- package/fesm2015/hivegpt-hiveai-angular.js.map +1 -1
- package/hivegpt-hiveai-angular.metadata.json +1 -1
- package/lib/components/bot-html-editor/bot-html-editor.component.d.ts +3 -0
- package/lib/components/bot-html-editor/bot-html-editor.component.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -2333,12 +2333,30 @@
|
|
|
2333
2333
|
return rxjs.of(null);
|
|
2334
2334
|
}));
|
|
2335
2335
|
};
|
|
2336
|
+
// Function that gets called on editor content change
|
|
2337
|
+
BotHtmlEditorComponent.prototype.onEditorContentChanged = function (event) {
|
|
2338
|
+
var _this = this;
|
|
2339
|
+
console.log("On Editor changed call");
|
|
2340
|
+
// Clear the previous timeout if the function is called again before the delay
|
|
2341
|
+
if (this.timeout) {
|
|
2342
|
+
clearTimeout(this.timeout);
|
|
2343
|
+
}
|
|
2344
|
+
// Set a new timeout for 2-3 seconds delay
|
|
2345
|
+
this.timeout = setTimeout(function () {
|
|
2346
|
+
_this.handleEditorChange();
|
|
2347
|
+
}, 2000); // 2000ms = 2 seconds (adjust to 3000 for 3 seconds)
|
|
2348
|
+
};
|
|
2349
|
+
// Function to be called after delay
|
|
2350
|
+
BotHtmlEditorComponent.prototype.handleEditorChange = function () {
|
|
2351
|
+
this.saveContent();
|
|
2352
|
+
// Add your function logic here
|
|
2353
|
+
};
|
|
2336
2354
|
return BotHtmlEditorComponent;
|
|
2337
2355
|
}());
|
|
2338
2356
|
BotHtmlEditorComponent.decorators = [
|
|
2339
2357
|
{ type: i0.Component, args: [{
|
|
2340
2358
|
selector: 'lib-bot-html-editor',
|
|
2341
|
-
template: "<div style=\"padding: 12px\">\r\n <div style=\"margin-top: 42px\" class=\"form-group\">\r\n <input [(ngModel)]=\"documentName\" class=\"form-control\" type=\"text\" />\r\n <button (click)=\"saveContent()\" class=\"save-btn\">Save</button>\r\n </div>\r\n\r\n <quill-editor
|
|
2359
|
+
template: "<div style=\"padding: 12px\">\r\n <div style=\"margin-top: 42px\" class=\"form-group\">\r\n <input [(ngModel)]=\"documentName\" class=\"form-control\" type=\"text\" />\r\n <button (click)=\"saveContent()\" class=\"save-btn\">Save</button>\r\n </div>\r\n\r\n <quill-editor [(ngModel)]=\"editorContent\" [modules]=\"quillConfig\" (onContentChanged)=\"onEditorContentChanged($event)\"\r\n placeholder=\"Start typing or paste to get started...\"></quill-editor>\r\n\r\n</div>",
|
|
2342
2360
|
styles: [".save-btn{background-color:#f0f0f0;border:none;color:#333;margin-top:22px;position:absolute;right:16px;width:56px}"]
|
|
2343
2361
|
},] }
|
|
2344
2362
|
];
|