Closed davidwandar closed 5 years ago
Trying out quill-autoformat with react-quill, but the editor ends up removing the hashtag I put in. Thoughts on why? Its like it detects it, deletes it, but doesnt put in anything new.
(sigh, cant get my code formatted here, sorry)
editorChange = (value:string, delta: any, source: any, editor: any ) => { this.setState({text: editor.getContents()}) } ... <ReactQuill value={this.state.text} onChange={this.editorChange} formats={[]} modules={{"toolbar": false, autoformat: { hashtag: { trigger: /[\s.,;:!?]/, find: /(?:^|\s)#[^\s.,;:!?]+/i, extract: /#([^\s.,;:!?]+)/i, transform: '$1', insert: 'hashtag'} } }} />
I'll take a look, an update might be needed.
react-quill uses Quill 1.3.4 while this is made for Quill 2.0.0-dev.3.
Trying out quill-autoformat with react-quill, but the editor ends up removing the hashtag I put in. Thoughts on why? Its like it detects it, deletes it, but doesnt put in anything new.
(sigh, cant get my code formatted here, sorry)
editorChange = (value:string, delta: any, source: any, editor: any ) => { this.setState({text: editor.getContents()}) } ... <ReactQuill value={this.state.text} onChange={this.editorChange} formats={[]} modules={{"toolbar": false, autoformat: { hashtag: { trigger: /[\s.,;:!?]/, find: /(?:^|\s)#[^\s.,;:!?]+/i, extract: /#([^\s.,;:!?]+)/i, transform: '$1', insert: 'hashtag'} } }} />