Merge branch 'MDL-51227-m29-master' of https://github.com/dthies/moodle into MOODLE_29_STABLE
This commit is contained in:
+1
-6
@@ -2341,12 +2341,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);
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -2354,12 +2351,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();
|
||||
@@ -2368,7 +2364,6 @@ EditorStyling.prototype = {
|
||||
node.removeClass(classname).setStyles(styles);
|
||||
}, this);
|
||||
|
||||
this.setSelection(originalSelection);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-6
@@ -2328,12 +2328,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);
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -2341,12 +2338,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();
|
||||
@@ -2355,7 +2351,6 @@ EditorStyling.prototype = {
|
||||
node.removeClass(classname).setStyles(styles);
|
||||
}, this);
|
||||
|
||||
this.setSelection(originalSelection);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
+1
-6
@@ -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);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user