Commit dda58661 by Abdallah Committed by cahrens

new tinymce

js changes to support new tinymce
scss changes for alignments
parent 1c644fcf
...@@ -70,8 +70,8 @@ ...@@ -70,8 +70,8 @@
"backbone": "js/vendor/backbone-min", "backbone": "js/vendor/backbone-min",
"backbone.associations": "js/vendor/backbone-associations-min", "backbone.associations": "js/vendor/backbone-associations-min",
"backbone.paginator": "js/vendor/backbone.paginator.min", "backbone.paginator": "js/vendor/backbone.paginator.min",
"tinymce": "js/vendor/tiny_mce/tiny_mce", "tinymce": "js/vendor/tiny_mce/tinymce.min",
"jquery.tinymce": "js/vendor/tiny_mce/jquery.tinymce", "jquery.tinymce": "js/vendor/tiny_mce/jquery.tinymce.min",
"xmodule": "/xmodule/xmodule", "xmodule": "/xmodule/xmodule",
"xblock": "coffee/src/xblock", "xblock": "coffee/src/xblock",
"utility": "js/src/utility", "utility": "js/src/utility",
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
} }
.editor-tabs { .editor-tabs {
top: 11px !important; top: 0 !important;
right: 10px; right: 10px;
z-index: 99; z-index: 99;
} }
......
...@@ -49,8 +49,8 @@ lib_paths: ...@@ -49,8 +49,8 @@ lib_paths:
- common_static/js/vendor/backbone-min.js - common_static/js/vendor/backbone-min.js
- common_static/js/vendor/jquery.leanModal.min.js - common_static/js/vendor/jquery.leanModal.min.js
- common_static/js/vendor/CodeMirror/codemirror.js - common_static/js/vendor/CodeMirror/codemirror.js
- common_static/js/vendor/tiny_mce/jquery.tinymce.js - common_static/js/vendor/tiny_mce/jquery.tinymce.min.js
- common_static/js/vendor/tiny_mce/tiny_mce.js - common_static/js/vendor/tiny_mce/tinymce.min.js
- common_static/js/vendor/mathjax-MathJax-c9db6ac/MathJax.js - common_static/js/vendor/mathjax-MathJax-c9db6ac/MathJax.js
- common_static/js/vendor/jquery.timeago.js - common_static/js/vendor/jquery.timeago.js
- common_static/js/vendor/sinon-1.7.1.js - common_static/js/vendor/sinon-1.7.1.js
......
...@@ -20,8 +20,8 @@ class @HTMLEditingDescriptor ...@@ -20,8 +20,8 @@ class @HTMLEditingDescriptor
# instances (like sandbox). It is not necessary to explicitly set baseURL when running locally. # instances (like sandbox). It is not necessary to explicitly set baseURL when running locally.
tinyMCE.baseURL = "#{baseUrl}/js/vendor/tiny_mce" tinyMCE.baseURL = "#{baseUrl}/js/vendor/tiny_mce"
@tiny_mce_textarea = $(".tiny-mce", @element).tinymce({ @tiny_mce_textarea = $(".tiny-mce", @element).tinymce({
script_url : "#{baseUrl}/js/vendor/tiny_mce/tiny_mce.js", script_url : "#{baseUrl}/js/vendor/tiny_mce/tiny_mce.min.js",
theme : "advanced", theme : "modern",
skin: 'studio', skin: 'studio',
schema: "html5", schema: "html5",
# Necessary to preserve relative URLs to our images. # Necessary to preserve relative URLs to our images.
...@@ -42,7 +42,7 @@ class @HTMLEditingDescriptor ...@@ -42,7 +42,7 @@ class @HTMLEditingDescriptor
# Disable visual aid on borderless table. # Disable visual aid on borderless table.
visual:false, visual:false,
# We may want to add "styleselect" when we collect all styles used throughout the LMS # We may want to add "styleselect" when we collect all styles used throughout the LMS
theme_advanced_buttons1 : "formatselect,fontselect,bold,italic,underline,forecolor,|,bullist,numlist,outdent,indent,|,link,unlink,image,|,blockquote,wrapAsCode", toolbar : "formatselect,fontselect,bold,italic,underline,forecolor,|,bullist,numlist,outdent,indent,|,link,unlink,image,|,blockquote,wrapAsCode,",
theme_advanced_toolbar_location : "top", theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left", theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "none", theme_advanced_statusbar_location : "none",
...@@ -50,6 +50,8 @@ class @HTMLEditingDescriptor ...@@ -50,6 +50,8 @@ class @HTMLEditingDescriptor
theme_advanced_blockformats : "p,pre,h1,h2,h3", theme_advanced_blockformats : "p,pre,h1,h2,h3",
width: '100%', width: '100%',
height: '400px', height: '400px',
menubar: false,
statusbar: false,
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 paramter. # The tinyMCE callback passes in the editor as a paramter.
...@@ -75,10 +77,6 @@ class @HTMLEditingDescriptor ...@@ -75,10 +77,6 @@ class @HTMLEditingDescriptor
ed.isNotDirty = false ed.isNotDirty = false
}) })
ed.onNodeChange.add((editor, command, e) ->
command.setActive('wrapAsCode', e.nodeName == 'CODE')
)
@visualEditor = ed @visualEditor = ed
ed.onExecCommand.add(@onExecCommandHandler) ed.onExecCommand.add(@onExecCommandHandler)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment