module("tinymce.plugins.Legacyoutput", { setupModule: function() { QUnit.stop(); tinymce.init({ selector: "textarea", add_unload_trigger: false, skin: false, plugins: 'legacyoutput', init_instance_callback: function(ed) { window.editor = ed; QUnit.start(); } }); } }); test("Font color", function() { editor.setContent('
text
'); Utils.setSelection('p', 0, 'p', 4); editor.execCommand('forecolor', false, '#FF0000'); equal(editor.getContent().toLowerCase(), 'text
'); }); test("Font size", function() { editor.setContent('text
'); Utils.setSelection('p', 0, 'p', 4); editor.execCommand('fontsize', false, 7); equal(editor.getContent(), 'text
'); }); test("Font face", function() { editor.setContent('text
'); Utils.setSelection('p', 0, 'p', 4); editor.execCommand('fontname', false, "times"); equal(editor.getContent(), 'text
'); }); test("Bold", function() { editor.setContent('text
'); Utils.setSelection('p', 0, 'p', 4); editor.execCommand('bold'); equal(editor.getContent(), 'text
'); }); test("Italic", function() { editor.setContent('text
'); Utils.setSelection('p', 0, 'p', 4); editor.execCommand('italic'); equal(editor.getContent(), 'text
'); }); test("Underline", function() { editor.setContent('text
'); Utils.setSelection('p', 0, 'p', 4); editor.execCommand('underline'); equal(editor.getContent(), 'text
'); }); test("Strikethrough", function() { editor.setContent('text
'); Utils.setSelection('p', 0, 'p', 4); editor.execCommand('strikethrough'); equal(editor.getContent(), 'text
text
'); Utils.setSelection('p', 0, 'p', 4); editor.execCommand('justifyleft'); equal(editor.getContent(), 'text
'); }); test("Justifycenter", function() { editor.setContent('text
'); Utils.setSelection('p', 0, 'p', 4); editor.execCommand('justifycenter'); equal(editor.getContent(), 'text
'); }); test("Justifyright", function() { editor.setContent('text
'); Utils.setSelection('p', 0, 'p', 4); editor.execCommand('justifyright'); equal(editor.getContent(), 'text
'); }); test("Justifyfull", function() { editor.setContent('text
'); Utils.setSelection('p', 0, 'p', 4); editor.execCommand('justifyfull'); equal(editor.getContent(), 'text
'); });