-
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 #1167 from ckeditor/t/932-3177
link command in easy image context menu
- Loading branch information
Showing
4 changed files
with
121 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
29 changes: 29 additions & 0 deletions
29
tests/plugins/imagebase/features/manual/linkcontextmenu.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,29 @@ | ||
|
||
<div id="classic"> | ||
<p>Widget with no link:</p> | ||
<figure> | ||
<img src="../../../image2/_assets/foo.png" alt="foo"> | ||
<figcaption>Test image</figcaption> | ||
</figure> | ||
<p>Widget with predefined link:</p> | ||
<figure> | ||
<a href="https://cksource.com"> | ||
<img src="../../../image2/_assets/foo.png" alt="foo"> | ||
</a> | ||
<figcaption>Test image</figcaption> | ||
</figure> | ||
</div> | ||
|
||
<script> | ||
CKEDITOR.replace( 'classic', { | ||
on: { | ||
pluginsLoaded: function( evt ) { | ||
var editor = evt.editor, | ||
plugin = CKEDITOR.plugins.imagebase; | ||
|
||
plugin.addImageWidget( editor, 'testWidget', plugin.addFeature( editor, 'link', {} ) ); | ||
} | ||
}, | ||
height: 500 | ||
} ); | ||
</script> |
31 changes: 31 additions & 0 deletions
31
tests/plugins/imagebase/features/manual/linkcontextmenu.md
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,31 @@ | ||
@bender-tags: 4.9.0, feature, 932 | ||
@bender-ui: collapsed | ||
@bender-ckeditor-plugins: sourcearea, wysiwygarea, floatingspace, toolbar, imagebase, link, htmlwriter, elementspath, contextmenu | ||
|
||
## Scenario 1 | ||
|
||
1. Right-click the first image to show the context menu. | ||
|
||
### Expected | ||
|
||
* There are no link connected options in the menu. | ||
|
||
## Scenario 2 | ||
|
||
1. Add link to the first image in the editor. | ||
2. Right click on it to show the context menu. | ||
3. Click "Edit Link" and change URL of the link. | ||
|
||
### Excepted | ||
|
||
* There are link connected options in the menu. | ||
* Editing link's URL actually changes link's URL. | ||
|
||
## Scenario 3 | ||
|
||
1. Right-click the second image in the editor to show the context menu. | ||
2. Choose "Unlink". | ||
|
||
### Expected | ||
|
||
* Link is removed. |