Merge pull request #11255 from edx/benp/replace-actionchain-with-js
[firefox upgrade] Replace action chain with tinymce JS.
This commit is contained in:
@@ -39,18 +39,13 @@ class HtmlComponentEditorView(ComponentEditorView):
|
||||
self.cancel()
|
||||
|
||||
def set_content(self, content):
|
||||
"""Types content into the html component, leaving the component open.
|
||||
"""Sets content in the html component, leaving the component open.
|
||||
|
||||
Arguments:
|
||||
content (str): The content to be used.
|
||||
"""
|
||||
self.q(css=self.editor_mode_css).click()
|
||||
|
||||
selector = '.html-editor .mce-edit-area'
|
||||
editor = self.q(css=self._bounded_selector(selector))[0]
|
||||
ActionChains(self.browser).click(editor).\
|
||||
send_keys([Keys.CONTROL, 'a']).key_up(Keys.CONTROL).\
|
||||
send_keys(content).perform()
|
||||
self.browser.execute_script("tinyMCE.activeEditor.setContent('%s')" % content)
|
||||
|
||||
def set_raw_content(self, content):
|
||||
"""Types content in raw html mode, leaving the component open.
|
||||
|
||||
Reference in New Issue
Block a user