Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
63d1b2bc
Commit
63d1b2bc
authored
5 years ago
by
DawoudSheraz
Committed by
DawoudSheraz
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
modify URL generation in tinymce editor
parent
cdb06198
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
common/lib/xmodule/xmodule/js/spec/html/edit_spec.js
+5
-1
5 additions, 1 deletion
common/lib/xmodule/xmodule/js/spec/html/edit_spec.js
common/lib/xmodule/xmodule/js/src/html/edit.js
+4
-4
4 additions, 4 deletions
common/lib/xmodule/xmodule/js/src/html/edit.js
with
9 additions
and
5 deletions
common/lib/xmodule/xmodule/js/spec/html/edit_spec.js
+
5
−
1
View file @
63d1b2bc
describe
(
'
HTMLEditingDescriptor
'
,
function
()
{
beforeEach
(()
=>
window
.
baseUrl
=
"
/static/deadbeef
"
);
beforeEach
(()
=>
window
.
baseUrl
=
"
/static/deadbeef
/
"
);
afterEach
(()
=>
delete
window
.
baseUrl
);
describe
(
'
Visual HTML Editor
'
,
function
()
{
beforeEach
(
function
()
{
...
...
@@ -48,6 +48,10 @@ describe('HTMLEditingDescriptor', function() {
const
savedContent
=
this
.
descriptor
.
getVisualEditor
().
getContent
()
expect
(
savedContent
).
toEqual
(
expectedData
);
});
it
(
'
Editor base URL does not contain double slash
'
,
function
(){
const
editor
=
this
.
descriptor
.
getVisualEditor
();
expect
(
editor
.
editorManager
.
baseURL
).
not
.
toContain
(
'
//
'
);
});
});
describe
(
'
Raw HTML Editor
'
,
function
()
{
beforeEach
(
function
()
{
...
...
This diff is collapsed.
Click to expand it.
common/lib/xmodule/xmodule/js/src/html/edit.js
+
4
−
4
View file @
63d1b2bc
...
...
@@ -88,7 +88,7 @@
This is a workaround for the fact that tinyMCE's baseURL property is not getting correctly set on AWS
instances (like sandbox). It is not necessary to explicitly set baseURL when running locally.
*/
tinyMCE
.
baseURL
=
baseUrl
+
"
/
js/vendor/tinymce/js/tinymce
"
;
tinyMCE
.
baseURL
=
baseUrl
+
"
js/vendor/tinymce/js/tinymce
"
;
/*
This is necessary for the LMS bulk e-mail acceptance test. In that particular scenario,
...
...
@@ -96,7 +96,7 @@
*/
tinyMCE
.
suffix
=
"
.min
"
;
this
.
tiny_mce_textarea
=
$
(
"
.tiny-mce
"
,
this
.
element
).
tinymce
({
script_url
:
baseUrl
+
"
/
js/vendor/tinymce/js/tinymce/tinymce.full.min.js
"
,
script_url
:
baseUrl
+
"
js/vendor/tinymce/js/tinymce/tinymce.full.min.js
"
,
font_formats
:
_getFonts
(),
theme
:
"
modern
"
,
skin
:
'
studio-tmce4
'
,
...
...
@@ -126,7 +126,7 @@
visual
:
false
,
plugins
:
"
textcolor, link, image, codemirror
"
,
codemirror
:
{
path
:
baseUrl
+
"
/
js/vendor
"
path
:
baseUrl
+
"
js/vendor
"
},
image_advtab
:
true
,
...
...
@@ -1204,7 +1204,7 @@
Translators: this is a toolbar button tooltip from the raw HTML editor displayed in the browser when a user needs to edit HTML
*/
title
:
gettext
(
'
Code block
'
),
image
:
baseUrl
+
"
/
images/ico-tinymce-code.png
"
,
image
:
baseUrl
+
"
images/ico-tinymce-code.png
"
,
onclick
:
function
()
{
return
ed
.
formatter
.
toggle
(
'
code
'
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment