Skip to content

Commit a813b97

Browse files
BackendExpertJehanKandyAnupa1998
committed
Update README.md
Co-Authored-By: JehanKandy <[email protected]> Co-Authored-By: Anupa Gamage <[email protected]>
1 parent 9567929 commit a813b97

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,25 @@ import {Editor} from 'js-wysiwyg-editor'
2929
- - Now set the place that you want to use this packge
3030

3131
``` jsx
32-
32+
import React, { useState } from 'react'
33+
import { Editor } from 'js-wysiwyg-editor'
34+
const TestingPack = () => {
35+
36+
const [text, setText] = useState('');
37+
38+
return (
39+
<div className='my-8 mx-12'>
40+
<div className="">
41+
<Editor dataValue={text} OutputTest={setText}/>
42+
</div>
43+
<div className="w-full p-2 bg-white border border-gray-300 rounded-md shadow-sm">
44+
<div dangerouslySetInnerHTML={{ __html: text.replace(/\*\*(.*?)\*\*/g, '<b>$1</b>') }} />
45+
</div>
46+
</div>
47+
)
48+
}
49+
50+
export default TestingPack
3351

3452
```
3553

0 commit comments

Comments
 (0)