bigbinary / neeto-editor

https://neeto-editor.neeto.com
MIT License
14 stars 3 forks source link

Convert neetoEditor to a controlled component #1163

Closed deepakjosp closed 3 hours ago

deepakjosp commented 2 weeks ago

Part of https://github.com/bigbinary/neeto-editor/issues/1100

@deepakjosp _a

deepakjosp commented 4 days ago

@AbhayVAshokan I was not able to work on this in this milestone because, I had to work for client couple of days in this milestone also. I have stretched the max to achieve the milestone, but this is beyond that and also requires extensive trials to make sure the changes doesn't impact the host apps. Could you please move this to next milestone?

deepakjosp commented 3 hours ago

@AbhayVAshokan I couldn't find a feasible performant approach to make the editor controlled. I explored a few similar products built using TipTap and nobody uses it as a controlled component. In one of the repos they explicitly mentioned that it's not recommended to use the editor as a controlled component, since the editor content must be serialized to get the HTML string to render the data the user typed in. Considering this it's better to use the setContent function from the editor instance to set the content of the editor from outside.

AbhayVAshokan commented 3 hours ago

Sounds good.