-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1383 from ckeditor/t/1274
Balloon toolbar cssSelector should also consider selected element (if any)
- Loading branch information
Showing
5 changed files
with
78 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
35 changes: 35 additions & 0 deletions
35
tests/plugins/balloontoolbar/context/manual/imgselect.html
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,35 @@ | ||
<textarea id="editor1" cols="10" rows="10"> | ||
<p>Sample image:</p> | ||
|
||
<img src="%BASE_PATH%_assets/lena.jpg" alt="Sample image"> | ||
</textarea> | ||
|
||
<div id="editor2" contenteditable="true" style="width: 500px"> | ||
<p>Sample image:</p> | ||
|
||
<img src="%BASE_PATH%_assets/lena.jpg" alt="Sample image"> | ||
</div> | ||
|
||
<script> | ||
if ( CKEDITOR.env.ie && CKEDITOR.env.version === 8 ) { | ||
bender.ignore(); | ||
} | ||
|
||
CKEDITOR.disableAutoInline = true; | ||
|
||
var config = { | ||
height: 300, | ||
width: 500, | ||
on: { | ||
instanceReady: function( evt ) { | ||
evt.editor.balloonToolbars.create( { | ||
buttons: 'Link,Unlink', | ||
cssSelector: 'img' | ||
} ); | ||
} | ||
} | ||
}; | ||
|
||
CKEDITOR.replace( 'editor1', config ); | ||
CKEDITOR.inline( 'editor2', config ); | ||
</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,15 @@ | ||
@bender-ui: collapsed | ||
@bender-tags: 4.8.1, bug, 1274, balloontoolbar | ||
@bender-ckeditor-plugins: wysiwygarea, toolbar, undo, floatingspace, balloontoolbar, sourcearea, link, elementspath, image | ||
|
||
# Image Selection | ||
|
||
1. Select an image. | ||
|
||
## Expected | ||
|
||
Toolbar is shown. | ||
|
||
## Unexpected | ||
|
||
No toolbar is not visible. |