taqueci / redmine_wysiwyg_editor

Redmine WYSIWYG Editor plugin
GNU General Public License v2.0
114 stars 27 forks source link

Add "Background color" setting to the toolbar #92

Closed mmundi72 closed 3 years ago

mmundi72 commented 4 years ago

Is it possible that you add the setting "Background color" to the toolbar? This is quite useful if you want to mark so specific text:

Hier da screenshot form the TinyMCE-Website:

grafik

taqueci commented 4 years ago

Hi @mmundi72

Yes, it's possible. You can do it by adding backcolor to toolbar:

--- a/assets/javascripts/redmine_wysiwyg_editor.js
+++ b/assets/javascripts/redmine_wysiwyg_editor.js
@@ -356,7 +356,7 @@ RedmineWysiwygEditor.prototype._initTinymce = function(setting) {
   };

   var toolbar = (self._format === 'textile') ?
-      'formatselect | bold italic underline strikethrough code forecolor removeformat | link image codesample wiki attachment | bullist numlist blockquote | alignleft aligncenter alignright | indent outdent | hr | table | undo redo | fullscreen' :
+      'formatselect | bold italic underline strikethrough code forecolor backcolor removeformat | link image codesample wiki attachment | bullist numlist blockquote | alignleft aligncenter alignright | indent outdent | hr | table | undo redo | fullscreen' :
       self._htmlTagAllowed ?
       'formatselect | bold italic strikethrough code removeformat | link image codesample wiki attachment | bullist numlist blockquote | alignleft aligncenter alignright | hr | table | undo redo | fullscreen' :
       'formatselect | bold italic strikethrough code removeformat | link image codesample wiki attachment | bullist numlist blockquote | hr | table | undo redo | fullscreen';

Please note HTML tags need to be allowed if you use Markdown.

I need some more time to investigate the impact.

taqueci commented 3 years ago

The feature has been implemented. Please note it is available in Textile formatting.