Change the event handling for image plugin.
Fixes FireFox bug, and allows us to correct the image path when we show the plugin (as opposed ot only correcting path when we close the plugin).
This commit is contained in:
@@ -25,6 +25,7 @@ Feature: CMS.HTML Editor
|
||||
When I edit the page
|
||||
And I add an image with static link "/static/image.jpg" via the Image Plugin Icon
|
||||
Then the src link is rewritten to "c4x/MITx/999/asset/image.jpg"
|
||||
And the link is shown as "/static/image.jpg" in the Image Plugin
|
||||
|
||||
Scenario: TinyMCE link plugin sets urls correctly
|
||||
Given I have created a Blank HTML Page
|
||||
@@ -32,6 +33,7 @@ Feature: CMS.HTML Editor
|
||||
And I add a link with static link "/static/image.jpg" via the Link Plugin Icon
|
||||
Then the href link is rewritten to "c4x/MITx/999/asset/image.jpg"
|
||||
|
||||
|
||||
Scenario: TinyMCE and CodeMirror preserve style tags
|
||||
Given I have created a Blank HTML Page
|
||||
When I edit the page
|
||||
|
||||
@@ -47,6 +47,14 @@ def i_click_on_image_plugin_icon(step, path):
|
||||
)
|
||||
|
||||
|
||||
@step('the link is shown as "(.*)" in the Image Plugin$')
|
||||
def check_link_in_image_plugin(step, path):
|
||||
use_plugin(
|
||||
'.mce-i-image',
|
||||
lambda: assert_equal(path, world.css_find('.mce-textbox')[0].value)
|
||||
)
|
||||
|
||||
|
||||
@step('I add a link with static link "(.*)" via the Link Plugin Icon$')
|
||||
def i_click_on_link_plugin_icon(step, path):
|
||||
def fill_in_link_fields():
|
||||
|
||||
Reference in New Issue
Block a user