Commit 474b1e00 authored by Eloy Lafuente's avatar Eloy Lafuente
Browse files

Merge branch 'MDL-51227-m28-master' of https://github.com/dthies/moodle into MOODLE_28_STABLE

parents 9194f591 a59f24b9
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
......@@ -87,12 +87,9 @@ EditorStyling.prototype = {
*/
toggleInlineSelectionClass: function(toggleclasses) {
var classname = toggleclasses.join(" ");
var originalSelection = this.getSelection();
var cssApplier = rangy.createCssClassApplier(classname, {normalize: true});
cssApplier.toggleSelection();
this.setSelection(originalSelection);
},
/**
......@@ -100,12 +97,11 @@ EditorStyling.prototype = {
*
* This will set inline styles on the current selection.
*
* @method toggleInlineSelectionClass
* @method formatSelectionInlineStyle
* @param {Array} styles - Style attributes to set on the nodes.
*/
formatSelectionInlineStyle: function(styles) {
var classname = this.PLACEHOLDER_CLASS;
var originalSelection = this.getSelection();
var cssApplier = rangy.createCssClassApplier(classname, {normalize: true});
cssApplier.applyToSelection();
......@@ -114,7 +110,6 @@ EditorStyling.prototype = {
node.removeClass(classname).setStyles(styles);
}, this);
this.setSelection(originalSelection);
},
/**
......
Supports Markdown
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