Skip to content

Commit

Permalink
Fixed #2145 - Add onLoad property to Editor
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Jun 25, 2021
1 parent cc4c7ed commit 1bd6913
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
11 changes: 11 additions & 0 deletions api-generator/components/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,17 @@ const EditorEvents = [
description: 'Source of change. Will be either "user" or "api".'
}
]
},
{
name: 'onLoad',
description: 'Callback to invoke when the quill modules are loaded.',
arguments: [
{
name: 'quill',
type: 'any',
description: 'Quill instance'
}
]
}
];

Expand Down
1 change: 1 addition & 0 deletions src/components/editor/Editor.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export interface EditorProps {
headerTemplate?: React.ReactNode;
onTextChange?(e: EditorTextChangeParams): void;
onSelectionChange?(e: EditorSelectionChangeParams): void;
onLoad?(quill: any): void;
}

export declare class Editor extends React.Component<EditorProps, any> { }
5 changes: 5 additions & 0 deletions src/showcase/editor/EditorDoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,11 @@ const header = (
event.source: Source of change. Will be either "user" or "api".</td>
<td>Callback to invoke when selected text of editor changes.</td>
</tr>
<tr>
<td>onLoad</td>
<td>quill: Quill instance</td>
<td>Callback to invoke when the quill modules are loaded.</td>
</tr>
</tbody>
</table>
</div>
Expand Down

0 comments on commit 1bd6913

Please sign in to comment.