Make WordPress Core


Ignore:
Timestamp:
03/04/2014 01:56:57 AM (12 years ago)
Author:
azaozz
Message:

TinyMCE: update to 4.0.18, see #24067

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/qunit/editor/tinymce/Formatter_apply.html

    r27155 r27387  
    952952});
    953953
     954test('Caret format inside word before similar format', function() {
     955    editor.setContent('<p>abc 123 <b>456</b></p>');
     956    editor.formatter.register('format', {inline: 'b'});
     957    setSelection('p', 1, 'p', 1);
     958    editor.formatter.apply('format');
     959    equal(editor.getContent(), '<p><b>abc</b> 123 <b>456</b></p>');
     960});
     961
    954962test('Caret format inside last inline wrapped word', function() {
    955963    editor.setContent('<p>abc <em>abc 123</em> 456</p>');
     
    11111119    editor.formatter.apply('format', {}, editor.getBody().firstChild);
    11121120    equal(getContent(), '<table style="float: right;"><tbody><tr><td>a</td></tr></tbody></table>');
     1121});
     1122
     1123test('Apply ID format to around existing bookmark node', function() {
     1124    editor.getBody().innerHTML = '<p>a<span id="b" data-mce-type="bookmark"></span>b</p>';
     1125
     1126    rng = editor.dom.createRng();
     1127    rng.setStart(editor.dom.select('p')[0].firstChild, 0);
     1128    rng.setEnd(editor.dom.select('p')[0].lastChild, 1);
     1129    editor.selection.setRng(rng);
     1130
     1131    editor.formatter.register('format', {inline: 'span', attributes: {id: 'id'}});
     1132    editor.formatter.apply('format');
     1133
     1134    equal(normalizeHtml(editor.getBody().innerHTML), '<p><span id="id">a<span data-mce-type="bookmark" id="b"></span>b</span></p>');
    11131135});
    11141136
     
    11601182});
    11611183
     1184// WP
    11621185var url = document.location.href.substring( 0, document.location.href.lastIndexOf('tinymce/') );
    11631186
    11641187tinymce.init({
    11651188    selector: "#elm1",
     1189    // WP
    11661190    external_plugins: {
    11671191        noneditable: url + 'external-plugins/noneditable/plugin.js'
    11681192    },
     1193    // WP end
    11691194    add_unload_trigger: false,
    11701195    indent: false,
     
    11901215    selector: "#elm2",
    11911216    inline: true,
     1217    // WP
    11921218    external_plugins: {
    11931219        noneditable: url + 'external-plugins/noneditable/plugin.js'
    11941220    },
     1221    // WP end
    11951222    add_unload_trigger: false,
    11961223    indent: false,
Note: See TracChangeset for help on using the changeset viewer.