Changeset 27387 for trunk/tests/qunit/editor/tinymce/Formatter_apply.html
- Timestamp:
- 03/04/2014 01:56:57 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/qunit/editor/tinymce/Formatter_apply.html
r27155 r27387 952 952 }); 953 953 954 test('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 954 962 test('Caret format inside last inline wrapped word', function() { 955 963 editor.setContent('<p>abc <em>abc 123</em> 456</p>'); … … 1111 1119 editor.formatter.apply('format', {}, editor.getBody().firstChild); 1112 1120 equal(getContent(), '<table style="float: right;"><tbody><tr><td>a</td></tr></tbody></table>'); 1121 }); 1122 1123 test('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>'); 1113 1135 }); 1114 1136 … … 1160 1182 }); 1161 1183 1184 // WP 1162 1185 var url = document.location.href.substring( 0, document.location.href.lastIndexOf('tinymce/') ); 1163 1186 1164 1187 tinymce.init({ 1165 1188 selector: "#elm1", 1189 // WP 1166 1190 external_plugins: { 1167 1191 noneditable: url + 'external-plugins/noneditable/plugin.js' 1168 1192 }, 1193 // WP end 1169 1194 add_unload_trigger: false, 1170 1195 indent: false, … … 1190 1215 selector: "#elm2", 1191 1216 inline: true, 1217 // WP 1192 1218 external_plugins: { 1193 1219 noneditable: url + 'external-plugins/noneditable/plugin.js' 1194 1220 }, 1221 // WP end 1195 1222 add_unload_trigger: false, 1196 1223 indent: false,
Note: See TracChangeset
for help on using the changeset viewer.