File: basicstyles.js

package info (click to toggle)
ckeditor 4.16.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 258,804 kB
  • sloc: javascript: 239,590; sh: 184; makefile: 64; python: 37; php: 15; xml: 5
file content (29 lines) | stat: -rw-r--r-- 831 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* bender-tags: editor */
/* bender-ckeditor-plugins: basicstyles,toolbar */

bender.editor = {
	config: {
		autoParagraph: false
	}
};

bender.test( {
	'test apply range style across input element': function() {
		var bot = this.editorBot;
		bot.editor.filter.allow( 'input[type]' );
		bot.setHtmlWithSelection( 'te[xt<input type="button" />te]xt' );
		bot.execCommand( 'bold' );
		assert.areSame( 'te<strong>xt<input type="button" />te</strong>xt', bot.getData( false, true ) );
	},

	// (#2294)
	'test apply bold to content with HTML comments': function() {
		var bot = this.editorBot;
		bender.tools.testInputOut( 'html-comments-bold', function( inputHtml, expectedHtml ) {
			bot.setHtmlWithSelection( inputHtml );
			bot.execCommand( 'bold' );

			assert.beautified.html( expectedHtml, bot.editor.getData() );
		} );
	}
} );