@@ -17,8 +17,8 @@ class Playground extends Component {
17
17
const rawContent = convertToRaw ( inputEditorState . getCurrentContent ( ) ) ;
18
18
const html = draftToHtml ( rawContent ) ;
19
19
const contentBlock = htmlToDraft ( html ) ;
20
- console . log ( '1' , htmlToDraft ( html ) && htmlToDraft ( html ) . contentBlocks )
21
- console . log ( '2' , convertFromHTML ( html ) && convertFromHTML ( html ) )
20
+ // console.log('1', htmlToDraft(html) && htmlToDraft(html).contentBlocks)
21
+ // console.log('2', convertFromHTML(html) && convertFromHTML(html))
22
22
if ( contentBlock ) {
23
23
const contentState = ContentState . createFromBlockArray ( contentBlock . contentBlocks ) ;
24
24
const outputEditorState = EditorState . createWithContent ( contentState ) ;
@@ -33,7 +33,22 @@ class Playground extends Component {
33
33
return (
34
34
< div >
35
35
< div style = { { height : 200 } } >
36
- < Editor onEditorStateChange = { this . onInputEditorChange } />
36
+ < Editor
37
+ onEditorStateChange = { this . onInputEditorChange }
38
+ mention = { {
39
+ separator : ' ' ,
40
+ trigger : '@' ,
41
+ suggestions : [
42
+ { text : 'A' , value : 'a' , url : 'href-a' } ,
43
+ { text : 'AB' , value : 'ab' , url : 'href-ab' } ,
44
+ { text : 'ABC' , value : 'abc' , url : 'href-abc' } ,
45
+ { text : 'ABCD' , value : 'abcd' , url : 'href-abcd' } ,
46
+ { text : 'ABCDE' , value : 'abcde' , url : 'href-abcde' } ,
47
+ { text : 'ABCDEF' , value : 'abcdef' , url : 'href-abcdef' } ,
48
+ { text : 'ABCDEFG' , value : 'abcdefg' , url : 'href-abcdefg' } ,
49
+ ] ,
50
+ } }
51
+ />
37
52
</ div >
38
53
< div style = { { height : 200 } } >
39
54
< textarea
0 commit comments