diff --git a/js/tinymce-integration.js b/js/tinymce-integration.js index b4619f4..28481fb 100644 --- a/js/tinymce-integration.js +++ b/js/tinymce-integration.js @@ -92,8 +92,10 @@ } // Override as noop-commands to prevent inline styles clutter on block // elements. That way indent/outdent are limited to list items. - editor.addCommand('indent', function () {}); - editor.addCommand('outdent', function () {}); + if (!format.editorSettings.backdrop.allowInlineStyle) { + editor.addCommand('indent', function () {}); + editor.addCommand('outdent', function () {}); + } // Register custom icons provided by plugins. if (typeof format.editorSettings.iconRegistry !== 'undefined') { let icons = format.editorSettings.iconRegistry; diff --git a/tinymce.module b/tinymce.module index 9f83355..6f28658 100644 --- a/tinymce.module +++ b/tinymce.module @@ -169,6 +169,9 @@ function _tinymce_js_settings($format, array $existing_settings) { $options['unregisterFmts'] = $unregister; } } + else { + $options['backdrop']['allowInlineStyle'] = TRUE; + } // Settings from admin UI. $options['tiny_options']['skin'] = $settings['tinymce_settings']['skin'];