wix-incubator / react-native-zss-rich-text-editor

React Native rich text editor based on ZSSRichTextEditor
Other
839 stars 310 forks source link

this.richtext.insertLink no work #48

Open MTTTM opened 7 years ago

MTTTM commented 7 years ago

===============render function======================== <RichTextEditor ref={(r)=>this.richtext = r} style={styles.richText} titlePlaceholder={'Title!!'} contentPlaceholder={'Hello World

this is a new paragraph

this is another new paragraph

'} editorInitializedCallback={() => this.onEditorInitialized()} /> <RichTextToolbar getEditor={() => this.richtext} actions={["setBold","insertLink","updateLink"]} iconMap={{setBold:require('../../img/icon/nav_fuli_normal.png'),insertLink:require('../../img/nav_shequ_nomal.png'),updateLink:require('../../img/nav_shequ_nomal.png')}} renderAction={(data)=>{return (<View key={data} style={{flex:1,width:100,backgroundColor:"blue"}}> <Text style={{textAlign:"center"}} onPress={this[data].bind(_this)}>{data} )}} />

===============method============================== insertLink(){ this.richtext.insertLink("http://img.dwstatic.com/www/1707/364930545550/1500975529856.jpg", "sfsafdfsadfd") } =====================my code end======================

The insertLink function is work,but “ this.richtext.insertLink” . I do not know that what i shoud do.