Reputation: 1371
So I have a text file on my web server, which i display using tag in browser.
I need to edit the file every once in a while, as of now i have to go back to CLI and vi the file.
I want to use some WYSISYG editor to do it online. I was considering CKEditor, but found Quill too. Quill looked lige to me.
I am confused how can I use it to edit the displayed text file in browser and then save the contents back to the text file in server. I also want to format the text in file using WYSISWYG editor (like highlighting, bold, insert pictures etc.).
I want to save a text and HTML version of file in the server, just in case web-server/web-site is not functioning, I would still be able to use data thru CLI. I felt i need to store output of this tool in db in the backend??
any suggestion is welcome.
Thanks.
Upvotes: 1
Views: 5297
Reputation: 7448
This is not a simple matter to do with Quill, because Quill is able to "translate" quite fairly well (not always the case though..) html markup into its Delta
format. Then Quill only manipulate and saves/render Delta
format operations/snapshots.
In our case, we store that specific format (which is great btw, atomic, concise, lightweight,..) server-side and always render it through Quill (on edit mode or read-only mode).
If you absolutely want to store an html version of it and not really concerned by security (XSS injection and stuff, if you are in a admin only section, dunno) maybe send directly your DOM html content inside Quill editor node, but I'd rather avoid that though.
Upvotes: 1