Fixed #1050 - [Enhancement] - For editor component

pull/1073/head
Cagatay Civici 2021-03-10 12:37:58 +03:00
parent 7c9e6234c7
commit e29928b520
3 changed files with 5 additions and 3 deletions

View File

@ -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[];
}

View File

@ -93,7 +93,8 @@ export default {
htmlValue: html,
textValue: text,
delta: delta,
source: source
source: source,
instance: this.quill
});
}
});

View File

@ -92,7 +92,8 @@ import Editor from 'primevue/editor';
<td>event.delta: Representation of the change.<br/>
event.source: Source of change. Will be either "user" or "api".<br/>
event.htmlValue: Current value as html.<br/>
event.textValue: Current value as text.<br/></td>
event.textValue: Current value as text.<br/>
event.instance: Text editor instance.</td>
<td>Callback to invoke when text of editor changes.</td>
</tr>
<tr>