Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Downgrade TinyMCE to 6.x due to license change (#12576)

Damian Legawiec59672fc0366c
diff --git a/admin/app/assets/stylesheets/spree/admin/plugins/_tinymce_custom.scss b/admin/app/assets/stylesheets/spree/admin/plugins/_tinymce_custom.scss
index c4c3bb0cad..91b282f92d 100644
--- a/admin/app/assets/stylesheets/spree/admin/plugins/_tinymce_custom.scss
+++ b/admin/app/assets/stylesheets/spree/admin/plugins/_tinymce_custom.scss
@@ -54,18 +54,18 @@
/* Override TinyMCE UI font size */
.tox-toolbar__group {
- font-size: 13px !important; /* Change this value to your desired font size */
+ font-size: $font-size-base !important; /* Change this value to your desired font size */
}
.tox-mbtn__select-label {
- font-size: 13px !important; /* Change this value to your desired font size */
+ font-size: $font-size-base !important; /* Change this value to your desired font size */
}
/* Override TinyMCE Content font size */
.tox-tinymce {
- font-size: 13px !important; /* Change this value to your desired font size */
+ font-size: $font-size-base !important; /* Change this value to your desired font size */
}
.tox .tox-collection__item-label, .tox-tbtn__select-label {
- font-size: 13px !important; /* Change this value to your desired font size */
- font-family: 'Inter';
+ font-size: $font-size-base !important; /* Change this value to your desired font size */
+ font-family: $font-family-sans-serif;
}
.tox.tox-tinymce-aux .tox-toolbar__overflow, .tox .tox-menu {
diff --git a/admin/app/javascript/spree/admin/helpers/tinymce.js b/admin/app/javascript/spree/admin/helpers/tinymce.js
index 7d8e127395..f826214488 100644
--- a/admin/app/javascript/spree/admin/helpers/tinymce.js
+++ b/admin/app/javascript/spree/admin/helpers/tinymce.js
@@ -14,7 +14,7 @@ function initializeTinmce() {
plugins: ['image', 'table', 'code', 'link', 'lists'],
menubar: false,
inline_boundaries: false,
- toolbar: 'undo redo | blocks | bold italic link forecolor backcolor | bullist numlist outdent indent | alignleft aligncenter alignright alignjustify | table | code',
+ toolbar: 'undo redo | formatselect | bold italic link forecolor backcolor | bullist numlist outdent indent | alignleft aligncenter alignright alignjustify | table | code',
// Default styles without heading 1
style_formats: [
{
@@ -62,12 +62,4 @@ function initializeTinmce() {
if (document.getElementById(ed.id).hasAttribute('readonly')) ed.mode.set('readonly')
}
})
-
- tinymce.init({
- content_style: 'table { width: 100%; }; body { font-family: Inter, sans-serif; font-size: 14px; }',
- selector: '.spree-rte-table',
- plugins: ['table paste code'],
- menubar: false,
- toolbar: 'table | code | undo redo'
- })
}
diff --git a/admin/spree_admin.gemspec b/admin/spree_admin.gemspec
index 0e8f75184c..a9cd6c3c0c 100644
--- a/admin/spree_admin.gemspec
+++ b/admin/spree_admin.gemspec
@@ -45,5 +45,5 @@ Gem::Specification.new do |s|
s.add_dependency 'turbo-rails'
s.add_dependency 'stimulus-rails'
s.add_dependency 'sprockets', '>= 4.0'
- s.add_dependency 'tinymce-rails', '~> 7.0'
+ s.add_dependency 'tinymce-rails', '~> 6.8.5'
end