Skip to content

Commit

Permalink
Issue #143: Allow indent/outdent for block elements if filter_html is…
Browse files Browse the repository at this point in the history
… off (#144)
  • Loading branch information
indigoxela authored Nov 22, 2024
1 parent 929c25a commit 243c6fa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 4 additions & 2 deletions js/tinymce-integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions tinymce.module
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
Expand Down

0 comments on commit 243c6fa

Please sign in to comment.