Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
62 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<div> | ||
<ul> | ||
<li> | ||
<textarea id="editor">some text</textarea> | ||
</li> | ||
</ul> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* bender-tags: indent,indentblock */ | ||
/* bender-ckeditor-plugins: button,indent,indentblock,divarea */ | ||
|
||
'use strict'; | ||
|
||
bender.editor = { | ||
creator: 'replace', | ||
name: 'editor' | ||
}; | ||
|
||
bender.test( { | ||
'test indenting and outdenting block in divarea plugin container inside li': function() { | ||
var editor = this.editor; | ||
editor.focus(); | ||
bender.tools.selection.setWithHtml( editor, '<p>hello{}</p>' ); | ||
|
||
assert.areSame( 2, editor.getCommand( 'indent' ).state, 'initial indent state' ); | ||
assert.areSame( 0, editor.getCommand( 'outdent' ).state, 'initial outdent state' ); | ||
|
||
editor.execCommand( 'indent' ); | ||
|
||
assert.areSame( 2, editor.getCommand( 'indent' ).state, 'indent state after indenting' ); | ||
assert.areSame( 2, editor.getCommand( 'outdent' ).state, 'outdent state after indenting' ); | ||
|
||
editor.execCommand( 'outdent' ); | ||
|
||
assert.areSame( 2, editor.getCommand( 'indent' ).state, 'indent state after outdenting' ); | ||
assert.areSame( 0, editor.getCommand( 'outdent' ).state, 'outdent state after outdenting' ); | ||
} | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<div> | ||
<ul> | ||
<li> | ||
<textarea id="editor">some text</textarea> | ||
</li> | ||
</ul> | ||
</div> | ||
|
||
<script> | ||
CKEDITOR.replace( 'editor', { | ||
extraPlugins: 'divarea,indentblock,toolbar' | ||
} ); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@bender-tags: 4.4.8, tc | ||
@bender-ui: collapsed | ||
@bender-tags: indent,indentblock | ||
|
||
1. Indent block. | ||
* Expected: Outdent button is not disabled. | ||
2. Outent block. | ||
* Expected: It worked. |