[LRUG] [Help Request] Completely stumped about integrating "Dante" WYSIWYG into my Rails app

Mark Burns markthedeveloper at gmail.com
Fri Aug 5 00:18:56 PDT 2016


Another guess is that it is not using jquery to post hence not including
the csrf token as a param to post and rails is dropping the requests before
they hit your app.
On Fri, 5 Aug 2016 at 14:17, Jon Wood <jon at ninjagiraffes.co.uk> wrote:

> My guess is that yes, it regularly posts as you make changes. You should
> be able to see if that's the case by watching the logs in
> log/development.log for requests to your save endpoint.
>
> On Fri, 5 Aug 2016, 08:12 Jesse Waites, <jesse.waites at gmail.com> wrote:
>
>> Hi everyone,
>>
>> This may be a little long, please bear with me.
>>
>> I have a dead simple hobby rails app spun up with Devise. I have users,
>> users have many Stories. Those associations are done, easy peasy. I am now
>> trying to integrate a Medium.com style WYSIWYG editor called Dante into a
>> hobby app.
>>
>> This is the editor:
>> https://github.com/michelson/Dante
>>
>> This is the demo in action:
>> http://michelson.github.io/Dante/
>>
>> I have managed to get the editor on the page, but for the life of me I
>> cannot seem to figure out how to get it to actually save the content.
>>
>> This is a link to my repo:
>> https://github.com/piratebroadcast/bckpckrs/
>>
>> The integration of the editor is on this page:
>>
>> https://github.com/piratebroadcast/bckpckrs/blob/master/app/views/stories/new.html.erb
>>
>> The only reference anywhere online I've found is *me* trying to figure
>> out how to integrate this thing almost a year ago:
>>
>> http://stackoverflow.com/questions/33656321/integrating-dante-ysiwyg-medium-style-editor-into-a-rails-form
>>
>> There, a developer answers that I should somehow integrate the content
>> from the editor into a simple_form form. I'm not so sure about that, as the
>> editor *Seems* to have an upload URL and can so it itself.
>>
>> <script type="text/javascript">    editor = new Dante.Editor(      {        el: "#editor",        upload_url: "/images.json", //it expect an url string in response like /your/server/image.jpg or http://app.com/images/image.jpg        store_url: "/save" //post to save      }    );    editor.start()  </script>
>>
>>
>>
>> I am completely baffled as to how the system would know when you are done
>> "writing" your story into the editor. Does it POST constantly?
>>
>> Any and all tips would really be appreciated.
>>
>> Thank you!
>>
>>
>>
>> --
>> Jesse Waites
>> Web Developer
>> JesseWaites.com
>> _______________________________________________
>> Chat mailing list
>> Chat at lists.lrug.org
>> Archives: http://lists.lrug.org/pipermail/chat-lrug.org
>> Manage your subscription: http://lists.lrug.org/options.cgi/chat-lrug.org
>> List info: http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>>
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> Archives: http://lists.lrug.org/pipermail/chat-lrug.org
> Manage your subscription: http://lists.lrug.org/options.cgi/chat-lrug.org
> List info: http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20160805/b01f5c5c/attachment.html>


More information about the Chat mailing list