File: blockquote.js

package info (click to toggle)
ckeditor 4.5.7%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 30,020 kB
  • sloc: sh: 167; python: 37; makefile: 24; php: 15; xml: 5
file content (32 lines) | stat: -rw-r--r-- 980 bytes parent folder | download | duplicates (2)
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
30
31
32
/* bender-tags: editor,unit */
/* bender-ckeditor-plugins: blockquote,toolbar */

bender.editor = {
	config: {
		enterMode: CKEDITOR.ENTER_P,
		allowedContent: true
	}
};

bender.test( {
	'test apply blockquote': function() {
		var bot = this.editorBot;
		bot.setHtmlWithSelection( '[<p>foo</p><p>bar</p>]' );
		bot.execCommand( 'blockquote' );
		assert.areSame( '<blockquote><p>foo</p><p>bar</p></blockquote>', bot.getData( 1 ) );
	},

	'test command state(ON) in blockquote': function() {
		var bot = this.editorBot;
		bot.setHtmlWithSelection( '<blockquote><p>^foo</p></blockquote>' );

		assert.isTrue( this.editor.getCommand( 'blockquote' ).state == CKEDITOR.TRISTATE_ON );
	},

	'test blockquote on non-editable block': function() {
		var bot = this.editorBot;
		bot.setHtmlWithSelection( '[<p contenteditable="false">foo</p>]' );
		bot.execCommand( 'blockquote' );
		assert.areSame( '<blockquote><p contenteditable="false">foo</p></blockquote>', bot.getData( 1 ) );
	}
} );