Open Dnouv opened 1 year ago
@Dnouv This is a component that I need to use for organization information, Should I create it? Or Go with the normal text area component.
Hey @Dnouv, I researched this and thought about going for any of the below two text editors (WYSIWYG):
Each of them has its own advantages and disadvantages,
I am open to your suggestion :-) Thank you
@Dnouv, I have researched a lot about the component. As we later want to display the content of text editor to HTML, There is a package named SLATE, It is the most lightweight yet powerful because of its modular approach. This can be best for our use case.
Here is the current design and a working model screenshot of the text editor component for our app.
My Approach
I am open to your suggestions and design improvements, I Hope I explained my approach well. Thanks :-)
Hey @Aashray446
Thank you so much for researching more about this. I will get back a satisfying answer for you, so I would request you to wait two more days; please feel free to ping me on Open Server if I forgot to reply back (well, the chances of this are slim).
Thank you!
Hey @Dnouv, check out this text editor made with the help of the lexical package
I made a component called Editor which is plug-and-play and requires just three parameters i.e onChange, value, and placeholder
I will be drafting a PR soon, till then you can suggest any UI changes if you want?
Thank you :-)
Create a new form input component that allows the user to do some formatting such as "Bold", "Italic", "Lists", and "Links". However, please note in the backend, we only store the data in
html
format, so this component should export the formatted input as simplehtml
. Take care of data sanitization since on the client side we are usingdangerouslysetInnerHtml
Preview of the editor component:![image](https://user-images.githubusercontent.com/61188295/215283780-716f4733-2ba3-480d-a42f-2ec931982634.png)
Please feel free to comment and ask questions, if any. Thank you!