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
d73f65c3
Commit
d73f65c3
authored
Mar 19, 2014
by
cahrens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure to strip out temporary caret.
It can get left behind in style blocks.
parent
f31f9360
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
common/static/js/vendor/tiny_mce/plugins/codemirror/source.html
+16
-4
No files found.
common/static/js/vendor/tiny_mce/plugins/codemirror/source.html
View file @
d73f65c3
...
@@ -202,10 +202,6 @@ function submit()
...
@@ -202,10 +202,6 @@ function submit()
editor.fire('
SaveCodeMirror
', codemirror);
editor.fire('
SaveCodeMirror
', codemirror);
editor.setContent(codemirror.getValue().replace(cc, '
<
span
id
=
"CmCaReT"
><
/span>'
))
;
editor.setContent(codemirror.getValue().replace(cc, '
<
span
id
=
"CmCaReT"
><
/span>'
))
;
editor
.
isNotDirty
=
!
isDirty
;
if
(
isDirty
)
{
editor
.
nodeChanged
();
}
// Set cursor:
// Set cursor:
var
el
=
editor
.
dom
.
select
(
'span#CmCaReT'
)[
0
];
var
el
=
editor
.
dom
.
select
(
'span#CmCaReT'
)[
0
];
...
@@ -214,6 +210,22 @@ function submit()
...
@@ -214,6 +210,22 @@ function submit()
editor
.
selection
.
setCursorLocation
(
el
,
0
);
editor
.
selection
.
setCursorLocation
(
el
,
0
);
editor
.
dom
.
remove
(
el
);
editor
.
dom
.
remove
(
el
);
}
}
// EDX: added because CmCaReT span was getting left in when caret was within a style tag.
// Make sure to strip it out (and accept that caret will not be in the correct place).
else
{
var
content
=
editor
.
getContent
();
var
strippedContent
=
content
.
replace
(
'<span id="CmCaReT"></span>'
,
''
);
if
(
content
!==
strippedContent
)
{
editor
.
setContent
(
strippedContent
);
}
}
// EDX: moved block of code from original location since we may change content in bug fix code above.
editor
.
isNotDirty
=
!
isDirty
;
if
(
isDirty
)
{
editor
.
nodeChanged
();
}
}
}
</script>
</script>
...
...
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