Skip to content

Commit

Permalink
remove medium-editor-rails and switch to CDN on editor pages
Browse files Browse the repository at this point in the history
  • Loading branch information
drusepth committed Jun 22, 2024
1 parent d6f7972 commit 8a844ab
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
3 changes: 0 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ gem 'meta-tags'
# gem 'serendipitous', :path => "../serendipitous-gem"
gem 'serendipitous', git: 'https://github.com/indentlabs/serendipitous-gem.git'

# Editor
gem 'medium-editor-rails'

# Graphs & Charts
gem 'chartkick'
gem 'd3-rails', '~> 5.9.2' # used for spider charts
Expand Down
3 changes: 0 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1445,8 +1445,6 @@ GEM
marcel (1.0.2)
material_icons (4.0.0)
railties (>= 3.2)
medium-editor-rails (2.3.1)
railties (>= 3.0)
memory_profiler (1.0.1)
meta-tags (2.18.0)
actionpack (>= 3.2.0, < 7.1)
Expand Down Expand Up @@ -1723,7 +1721,6 @@ DEPENDENCIES
language_filter
listen
material_icons
medium-editor-rails
memory_profiler
meta-tags
mini_racer (~> 0.6.3)
Expand Down
1 change: 0 additions & 1 deletion app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
//
//= require_tree ./preload
//= require cocoon
//= require medium-editor
//= require Chart.bundle
//= require chartkick
//= require autocomplete-rails
Expand Down
2 changes: 0 additions & 2 deletions app/assets/stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
*= require_self
*= require material_icons
*= require font-awesome
*= require medium-editor/medium-editor
*= require medium-editor/themes/beagle
*= require tribute
*= require_tree .
*/
8 changes: 8 additions & 0 deletions app/views/documents/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
<%#
We're using the medium-editor CDN here instead of the rails-medium-editor gem because it broke in the latest
version of Chrome, and has been archived for no more changes. Ergo, we gotta move off of it. :)
%>
<script src="https://cdnjs.cloudflare.com/ajax/libs/medium-editor/5.23.3/js/medium-editor.min.js" integrity="sha512-5D/0tAVbq1D3ZAzbxOnvpLt7Jl/n8m/YGASscHTNYsBvTcJnrYNiDIJm6We0RPJCpFJWowOPNz9ZJx7Ei+yFiA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/medium-editor/5.23.3/css/medium-editor.min.css" integrity="sha512-zYqhQjtcNMt8/h4RJallhYRev/et7+k/HDyry20li5fWSJYSExP9O07Ung28MUuXDneIFg0f2/U3HJZWsTNAiw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/medium-editor/5.23.3/css/themes/beagle.min.css" integrity="sha512-Dp5+M9xB0mzENcNK7ReLOvz/cKvhshdJDb3bEKRAz9lKggT/BtVlthhvusC+IoQQ5lazItTaSDQSeyBa0T5LWA==" crossorigin="anonymous" referrerpolicy="no-referrer" />

<% set_meta_tags title: "Editing: " + @document.title, description: truncate(@document.body) %>
<%= content_for :full_width_page_header do %>
Expand Down

0 comments on commit 8a844ab

Please sign in to comment.