From 6e67ba8d00f2378e23fca5e503e606d3ac9872b4 Mon Sep 17 00:00:00 2001 From: indigoxela Date: Tue, 7 Jan 2025 08:59:46 +0100 Subject: [PATCH] Issue #147: Fix inline-style logic for indent/outdent --- js/tinymce-integration.js | 2 +- tinymce.module | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/js/tinymce-integration.js b/js/tinymce-integration.js index bdd1031..28481fb 100644 --- a/js/tinymce-integration.js +++ b/js/tinymce-integration.js @@ -92,7 +92,7 @@ } // Override as noop-commands to prevent inline styles clutter on block // elements. That way indent/outdent are limited to list items. - if (format.editorSettings.backdrop && !format.editorSettings.backdrop.allowInlineStyle) { + if (!format.editorSettings.backdrop.allowInlineStyle) { editor.addCommand('indent', function () {}); editor.addCommand('outdent', function () {}); } diff --git a/tinymce.module b/tinymce.module index 1e356ef..b471b34 100644 --- a/tinymce.module +++ b/tinymce.module @@ -168,6 +168,7 @@ function _tinymce_js_settings($format, array $existing_settings) { if ($unregister) { $options['unregisterFmts'] = $unregister; } + $options['backdrop']['allowInlineStyle'] = FALSE; } else { $options['backdrop']['allowInlineStyle'] = TRUE;