html5 - Changing classes and saving images with summernote -


i wondering if possible change class of image tag gotten summernote.

currently using summernote rails4 , have implemented following way:

in creation of new project

<%= form_for(@project, :html => { :multipart => true }) |f| %> <%= f.text_area :description, id:"summernote" %>  <script type="text/javascript">     $(document).ready(function() {         $('#summernote').summernote();     }); </script> 

and when show it

<%= @project.description.html_safe %> 

if insert image works know 2 things: 1: image stored? if @ source code generate data:image/jpeg;base64,/9j/4s/(bunch of random letters)

2:i give class tags generated images uploaded summernote (and possibly save them using paperclip if possible)

thanks help!

  1. the "f.text_area" in code hold enter in summernote box entry. once submit entry images converted base64 , stored directly in database end server.

  2. to apply own tags on images click on "code view" button found in summernote editing toolbar , locate image code manually place opening <div class= "your-class"> before image code , closing <div> tag after image code.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -