This is my actual first attempt to write a form with external html editor in textarea field.
That i have done:
I generated the form using:
mix phx.gen.html Content Article articles heading:string tag:string slug:string article:text
Updated ecto
Added the CKeditor in in root.html.heex using:
I have added the additional script from here within the article_form.html.heex and i can see the field updated and i can use the editor.
The problem:
When i press submit it gives me error that the field is empty.
What i tried:
I am very bad in JS so please be understanding. I got the idea that i have to collect the data from the editor and ‘send/push’ it to the form somehow (my guess is to the id of the original field) but i can’t get it to work. I have read few other topics from here but i don’t really get how to make it work.
I will appreciate if someone can guide me to the solution.
Thanks. That will be an upgrade that i might want to do. Funny enough that is a paid feature on the ck editor and with some additional coding it could make it even better than the paid service.