-
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 #1147 from ckeditor/t/1145
Added skipNotifications option to upload widget definition
- Loading branch information
Showing
5 changed files
with
100 additions
and
2 deletions.
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,21 @@ | ||
<textarea cols="80" id="editor1" name="editor1" rows="10"> | ||
<p>Drop an image here.</p> | ||
</textarea> | ||
|
||
<script> | ||
var editor = CKEDITOR.replace( 'editor1', { | ||
uploadUrl: '%BASE_PATH%' | ||
} ); | ||
|
||
editor.on( 'widgetDefinition', function( evt ) { | ||
var definition = evt.data; | ||
|
||
if ( definition.name === 'uploadimage' ) { | ||
definition.skipNotifications = true; | ||
} | ||
} ); | ||
|
||
if ( CKEDITOR.env.ie && CKEDITOR.env.version < 10 ) { | ||
bender.ignore(); | ||
} | ||
</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-tags: 4.8.0, feature, 1145 | ||
@bender-ui: collapsed | ||
@bender-ckeditor-plugins: wysiwygarea, toolbar, undo, uploadwidget, image, uploadimage, elementspath | ||
@bender-include: _helpers/xhr.js | ||
|
||
## Skipping Notifications | ||
|
||
1. Paste or drag and drop an image into editor. | ||
|
||
## Expected | ||
|
||
* No progress/success notification are shown. | ||
* Image is changed to Lena (after ~4 secs). | ||
|
||
**Note:** This test use upload mock which will show you *Lena* instead of the real uploaded image. |
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