Make WordPress Core

Ticket #41475: 41475.diff

File 41475.diff, 873 bytes (added by xkon, 6 years ago)

Fixes <strong> to <b> and <em> to <i> after deleting text

  • wp-includes/js/tinymce/plugins/wordpress/plugin.js

     
    614614        editor.on( 'preInit', function() {
    615615                var validElementsSetting = '@[id|accesskey|class|dir|lang|style|tabindex|' +
    616616                        'title|contenteditable|draggable|dropzone|hidden|spellcheck|translate],' + // Global attributes.
    617                         'i,' + // Don't replace <i> with <em> and <b> with <strong> and don't remove them when empty.
    618                         'b,' +
     617                        'em,' + // Don't replace <em> and <strong> and don't remove them when empty.
     618                        'strong,' +
    619619                        'script[src|async|defer|type|charset|crossorigin|integrity]'; // Add support for <script>.
    620620
    621621                editor.schema.addValidElements( validElementsSetting );