From e29928b52016c341375ba00ef2a6a2a86d57e263 Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Wed, 10 Mar 2021 12:37:58 +0300 Subject: [PATCH] Fixed #1050 - [Enhancement] - For editor component --- src/components/editor/Editor.d.ts | 2 +- src/components/editor/Editor.vue | 3 ++- src/views/editor/EditorDoc.vue | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/editor/Editor.d.ts b/src/components/editor/Editor.d.ts index d601f880f..0a39b2a64 100755 --- a/src/components/editor/Editor.d.ts +++ b/src/components/editor/Editor.d.ts @@ -11,7 +11,7 @@ interface EditorProps { declare class Editor { $props: EditorProps; $emit(eventName: 'input', event: string): this; - $emit(eventName: 'text-change', e: { htmlValue: string, textValue: any, delta: any, source: string}): this; + $emit(eventName: 'text-change', e: { htmlValue: string, textValue: any, delta: any, source: string, instance: any}): this; $slot: { toolbar: VNode[]; } diff --git a/src/components/editor/Editor.vue b/src/components/editor/Editor.vue index 7cf20f70a..6534cb1fa 100755 --- a/src/components/editor/Editor.vue +++ b/src/components/editor/Editor.vue @@ -93,7 +93,8 @@ export default { htmlValue: html, textValue: text, delta: delta, - source: source + source: source, + instance: this.quill }); } }); diff --git a/src/views/editor/EditorDoc.vue b/src/views/editor/EditorDoc.vue index 9dc5d4432..f89d35f22 100755 --- a/src/views/editor/EditorDoc.vue +++ b/src/views/editor/EditorDoc.vue @@ -92,7 +92,8 @@ import Editor from 'primevue/editor'; event.delta: Representation of the change.
event.source: Source of change. Will be either "user" or "api".
event.htmlValue: Current value as html.
- event.textValue: Current value as text.
+ event.textValue: Current value as text.
+ event.instance: Text editor instance. Callback to invoke when text of editor changes.