Skip to content

Instantly share code, notes, and snippets.

@blairanderson
Last active February 27, 2018 18:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blairanderson/c0558e8b4a36bd5c0bcf5e4071f224a3 to your computer and use it in GitHub Desktop.
Save blairanderson/c0558e8b4a36bd5c0bcf5e4071f224a3 to your computer and use it in GitHub Desktop.
Easiest WYSIWYG implementation I have found. 2018 Edition

I found it very annoying how quickly these WYSIWYG editors go out of date.

The open sources ones have mostly rotted away, and the others are paid.

<% content_for :head do %>
  <%= stylesheet_link_tag('https://cdnjs.cloudflare.com/ajax/libs/Trumbowyg/2.9.4/ui/trumbowyg.css') %>
<% end %>

<% content_for :javascript do %>
  <%= javascript_include_tag('https://cdnjs.cloudflare.com/ajax/libs/Trumbowyg/2.9.4/trumbowyg.js') %>
  <script !src="">
    $("#editor").trumbowyg({svgPath: 'https://rawgit.com/cdnjs/cdnjs/master/ajax/libs/Trumbowyg/2.9.4/ui/icons.svg'});
  </script>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment