Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
f4e4082b
Commit
f4e4082b
authored
Apr 22, 2014
by
Andy Armstrong
Committed by
David Baumgold
Apr 24, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make TinyMCE more tolerant about HTML elements
STUD-1565
parent
2825f432
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
1 deletions
+29
-1
cms/djangoapps/contentstore/features/html-editor.feature
+21
-1
common/lib/xmodule/xmodule/js/src/html/edit.coffee
+8
-0
No files found.
cms/djangoapps/contentstore/features/html-editor.feature
View file @
f4e4082b
...
@@ -47,6 +47,26 @@ Feature: CMS.HTML Editor
...
@@ -47,6 +47,26 @@ Feature: CMS.HTML Editor
--></style>
--></style>
"""
"""
Scenario
:
TinyMCE and CodeMirror preserve span tags
Given
I have created a Blank HTML Page
When
I edit the page
And
type
"<span>Test</span>"
in the code editor and press OK
And
I save the page
Then the page text contains
:
"""
<span>Test</span>
"""
Scenario
:
TinyMCE and CodeMirror preserve math tags
Given
I have created a Blank HTML Page
When
I edit the page
And
type
"<math><msup><mi>x</mi><mn>2</mn></msup></math>"
in the code editor and press OK
And
I save the page
Then the page text contains
:
"""
<math><msup><mi>x</mi><mn>2</mn></msup></math>
"""
Scenario
:
TinyMCE toolbar buttons are as expected
Scenario
:
TinyMCE toolbar buttons are as expected
Given
I have created a Blank HTML Page
Given
I have created a Blank HTML Page
When
I edit the page
When
I edit the page
...
@@ -57,7 +77,7 @@ Feature: CMS.HTML Editor
...
@@ -57,7 +77,7 @@ Feature: CMS.HTML Editor
When
I edit the page
When
I edit the page
And
type
"<img src="
/static/image.jpg">" in the code editor and press OK
And
type
"<img src="
/static/image.jpg">" in the code editor and press OK
Then
the src link is rewritten to
"c4x/MITx/999/asset/image.jpg"
Then
the src link is rewritten to
"c4x/MITx/999/asset/image.jpg"
And
the code editor displays
"<p><img src="
/static/image.jpg"
alt=""
/></p>"
And
the code editor displays
"<p><img src="
/static/image.jpg" /></p>"
Scenario
:
Code format toolbar button wraps text with code tags
Scenario
:
Code format toolbar button wraps text with code tags
Given
I have created a Blank HTML Page
Given
I have created a Blank HTML Page
...
...
common/lib/xmodule/xmodule/js/src/html/edit.coffee
View file @
f4e4082b
...
@@ -48,8 +48,16 @@ class @HTMLEditingDescriptor
...
@@ -48,8 +48,16 @@ class @HTMLEditingDescriptor
height
:
'400px'
,
height
:
'400px'
,
menubar
:
false
,
menubar
:
false
,
statusbar
:
false
,
statusbar
:
false
,
# Necessary to avoid stripping of style tags.
# Necessary to avoid stripping of style tags.
valid_children
:
"+body[style]"
,
valid_children
:
"+body[style]"
,
# Allow any elements to be used, e.g. link, script, math
verify_html
:
false
,
valid_elements
:
"*[*]"
,
extended_valid_elements
:
"*[*]"
,
invalid_elements
:
""
,
setup
:
@
setupTinyMCE
,
setup
:
@
setupTinyMCE
,
# Cannot get access to tinyMCE Editor instance (for focusing) until after it is rendered.
# Cannot get access to tinyMCE Editor instance (for focusing) until after it is rendered.
# The tinyMCE callback passes in the editor as a parameter.
# The tinyMCE callback passes in the editor as a parameter.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment