Sha256: c8991aefcb64bfb93aedf40266b70eb0881b24c04353809f736f386acb928cfe
Contents?: true
Size: 1.63 KB
Versions: 4
Compression:
Stored size: 1.63 KB
Contents
<%= form_for @content_block do |form| %> <div class="breadcrumbs"> <strong> <%= link_to "Content Blocks", content_blocks_path %> <i class="fa fa-caret-right"></i> <code>:<%= @content_block.name %></code> </strong> </div> <textarea name="content_block[content]" class="content-editor"> <%== @content_block.content.blank? ? "<p><br/></p>" : @content_block.content %> </textarea> <div class="buttons"> <%= link_to "Cancel", content_blocks_path, class: "button cancel" %> <button class="save">Save</button> </div> <% end %> <% content_for :scripts do %> <script> $(function() { $('.content-editor').summernote({ codemirror: { lineNumbers: true, mode: 'text/html', theme: 'monokai' }, focus: true, height: 400, toolbar: [ ['style', ['bold', 'italic', 'underline', 'clear']], ['fontsize', ['fontsize']], ['color', ['color']], ['para', ['ul', 'ol', 'paragraph']], ['table', ['table']], ['insert', ['link', 'picture', 'video']], ['code', ['codeview', 'fullscreen']] ], onImageUpload: function(files, editor, welEditable) { data = new FormData(); data.append("file", files[0]); $.ajax({ data: data, type: "POST", url: "../images", cache: false, contentType: false, processData: false, success: function(url) { editor.insertImage(welEditable, url); } }); } }); }); </script> <% end %>
Version data entries
4 entries across 4 versions & 1 rubygems