From a14a51ad381ab6a923411af96b9a6daf0d7e717a Mon Sep 17 00:00:00 2001 From: Mickael Lecoq Date: Wed, 22 Jun 2022 17:51:28 +0200 Subject: [PATCH] feat(ts): add sendAction method in definition file --- index.d.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/index.d.ts b/index.d.ts index ed48e23..3dc172e 100644 --- a/index.d.ts +++ b/index.d.ts @@ -54,7 +54,7 @@ export interface RichEditorProps extends WebViewProps { * String value to set return key type * See: https://reactnative.dev/docs/textinput#returnkeytype */ - enterKeyHint?: 'done' | 'go' | 'next' | 'search' | 'send' + enterKeyHint?: 'done' | 'go' | 'next' | 'search' | 'send'; /** * Boolean value to enable paste as plain text. The default value is false. @@ -111,7 +111,7 @@ export interface RichEditorProps extends WebViewProps { /** * Callback Enter the position of the cursor */ - onCursorPosition?: (offsetY: number)=> void; + onCursorPosition?: (offsetY: number) => void; /** * Callback after height change @@ -120,6 +120,9 @@ export interface RichEditorProps extends WebViewProps { onMessage?: (message: {type: string; id: string; data?: any}) => void; + /** Custom action sent to editor */ + sendAction(type: string, action: string, data?: any, options?: any): void; + /** * When first gaining focus, the cursor moves to the end of the text * Default is true @@ -202,13 +205,13 @@ export class RichEditor extends React.Component { * The background color of the selected text * @param color */ - setHiliteColor: (color: string)=> void; + setHiliteColor: (color: string) => void; /** * The color of the selected text * @param color */ - setForeColor: (color: string)=> void; + setForeColor: (color: string) => void; /** * $ = document.querySelector