MDL-51228 editor_atto: Apply style in plugins if selection is collapsed
This commit is contained in:
+1
@@ -71,6 +71,7 @@ Y.namespace('M.atto_backcolor').Button = Y.Base.create('button', Y.M.editor_atto
|
||||
icon: 'e/text_highlight',
|
||||
overlayWidth: '4',
|
||||
globalItemConfig: {
|
||||
inlineFormat: true,
|
||||
callback: this._changeStyle
|
||||
},
|
||||
items: items
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
YUI.add("moodle-atto_backcolor-button",function(e,t){var n=[{name:"white",color:"#FFFFFF"},{name:"red",color:"#EF4540"},{name:"yellow",color:"#FFCF35"},{name:"green",color:"#98CA3E"},{name:"blue",color:"#7D9FD3"},{name:"black",color:"#333333"}];e.namespace("M.atto_backcolor").Button=e.Base.create("button",e.M.editor_atto.EditorPlugin,[],{initializer:function(){var t=[];e.Array.each(n,function(e){t.push({text:'<div style="width: 20px; height: 20px; border: 1px solid #CCC; background-color: '+e.color+'"></div>',callbackArgs:e.color})}),this.addToolbarMenu({icon:"e/text_highlight",overlayWidth:"4",globalItemConfig:{callback:this._changeStyle},items:t})},_changeStyle:function(e,t){this.get("host").formatSelectionInlineStyle({backgroundColor:t})}})},"@VERSION@");
|
||||
YUI.add("moodle-atto_backcolor-button",function(e,t){var n=[{name:"white",color:"#FFFFFF"},{name:"red",color:"#EF4540"},{name:"yellow",color:"#FFCF35"},{name:"green",color:"#98CA3E"},{name:"blue",color:"#7D9FD3"},{name:"black",color:"#333333"}];e.namespace("M.atto_backcolor").Button=e.Base.create("button",e.M.editor_atto.EditorPlugin,[],{initializer:function(){var t=[];e.Array.each(n,function(e){t.push({text:'<div style="width: 20px; height: 20px; border: 1px solid #CCC; background-color: '+e.color+'"></div>',callbackArgs:e.color})}),this.addToolbarMenu({icon:"e/text_highlight",overlayWidth:"4",globalItemConfig:{inlineFormat:!0,callback:this._changeStyle},items:t})},_changeStyle:function(e,t){this.get("host").formatSelectionInlineStyle({backgroundColor:t})}})},"@VERSION@");
|
||||
|
||||
+1
@@ -71,6 +71,7 @@ Y.namespace('M.atto_backcolor').Button = Y.Base.create('button', Y.M.editor_atto
|
||||
icon: 'e/text_highlight',
|
||||
overlayWidth: '4',
|
||||
globalItemConfig: {
|
||||
inlineFormat: true,
|
||||
callback: this._changeStyle
|
||||
},
|
||||
items: items
|
||||
|
||||
@@ -69,6 +69,7 @@ Y.namespace('M.atto_backcolor').Button = Y.Base.create('button', Y.M.editor_atto
|
||||
icon: 'e/text_highlight',
|
||||
overlayWidth: '4',
|
||||
globalItemConfig: {
|
||||
inlineFormat: true,
|
||||
callback: this._changeStyle
|
||||
},
|
||||
items: items
|
||||
|
||||
+1
@@ -73,6 +73,7 @@ Y.namespace('M.atto_fontcolor').Button = Y.Base.create('button', Y.M.editor_atto
|
||||
overlayWidth: '4',
|
||||
menuColor: '#333333',
|
||||
globalItemConfig: {
|
||||
inlineFormat: true,
|
||||
callback: this._changeStyle
|
||||
},
|
||||
items: items
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
YUI.add("moodle-atto_fontcolor-button",function(e,t){var n=[{name:"white",color:"#FFFFFF"},{name:"red",color:"#EF4540"},{name:"yellow",color:"#FFCF35"},{name:"green",color:"#98CA3E"},{name:"blue",color:"#7D9FD3"},{name:"black",color:"#333333"}];e.namespace("M.atto_fontcolor").Button=e.Base.create("button",e.M.editor_atto.EditorPlugin,[],{initializer:function(){var t=[];e.Array.each(n,function(e){t.push({text:'<div style="width: 20px; height: 20px; border: 1px solid #CCC; background-color: '+e.color+'"></div>',callbackArgs:e.color,callback:this._changeStyle})}),this.addToolbarMenu({icon:"e/text_color",overlayWidth:"4",menuColor:"#333333",globalItemConfig:{callback:this._changeStyle},items:t})},_changeStyle:function(e,t){this.get("host").formatSelectionInlineStyle({color:t})}})},"@VERSION@");
|
||||
YUI.add("moodle-atto_fontcolor-button",function(e,t){var n=[{name:"white",color:"#FFFFFF"},{name:"red",color:"#EF4540"},{name:"yellow",color:"#FFCF35"},{name:"green",color:"#98CA3E"},{name:"blue",color:"#7D9FD3"},{name:"black",color:"#333333"}];e.namespace("M.atto_fontcolor").Button=e.Base.create("button",e.M.editor_atto.EditorPlugin,[],{initializer:function(){var t=[];e.Array.each(n,function(e){t.push({text:'<div style="width: 20px; height: 20px; border: 1px solid #CCC; background-color: '+e.color+'"></div>',callbackArgs:e.color,callback:this._changeStyle})}),this.addToolbarMenu({icon:"e/text_color",overlayWidth:"4",menuColor:"#333333",globalItemConfig:{inlineFormat:!0,callback:this._changeStyle},items:t})},_changeStyle:function(e,t){this.get("host").formatSelectionInlineStyle({color:t})}})},"@VERSION@");
|
||||
|
||||
+1
@@ -73,6 +73,7 @@ Y.namespace('M.atto_fontcolor').Button = Y.Base.create('button', Y.M.editor_atto
|
||||
overlayWidth: '4',
|
||||
menuColor: '#333333',
|
||||
globalItemConfig: {
|
||||
inlineFormat: true,
|
||||
callback: this._changeStyle
|
||||
},
|
||||
items: items
|
||||
|
||||
@@ -71,6 +71,7 @@ Y.namespace('M.atto_fontcolor').Button = Y.Base.create('button', Y.M.editor_atto
|
||||
overlayWidth: '4',
|
||||
menuColor: '#333333',
|
||||
globalItemConfig: {
|
||||
inlineFormat: true,
|
||||
callback: this._changeStyle
|
||||
},
|
||||
items: items
|
||||
|
||||
+1
@@ -38,6 +38,7 @@ Y.namespace('M.atto_noautolink').Button = Y.Base.create('button', Y.M.editor_att
|
||||
this.addButton({
|
||||
icon: 'e/prevent_autolink',
|
||||
callback: this._preventAutoLink,
|
||||
inlineFormat: true,
|
||||
tags: '.nolink'
|
||||
});
|
||||
},
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
YUI.add("moodle-atto_noautolink-button",function(e,t){e.namespace("M.atto_noautolink").Button=e.Base.create("button",e.M.editor_atto.EditorPlugin,[],{initializer:function(){this.addButton({icon:"e/prevent_autolink",callback:this._preventAutoLink,tags:".nolink"})},_preventAutoLink:function(){this.get("host").toggleInlineSelectionClass(["nolink"])}})},"@VERSION@",{requires:["moodle-editor_atto-plugin"]});
|
||||
YUI.add("moodle-atto_noautolink-button",function(e,t){e.namespace("M.atto_noautolink").Button=e.Base.create("button",e.M.editor_atto.EditorPlugin,[],{initializer:function(){this.addButton({icon:"e/prevent_autolink",callback:this._preventAutoLink,inlineFormat:!0,tags:".nolink"})},_preventAutoLink:function(){this.get("host").toggleInlineSelectionClass(["nolink"])}})},"@VERSION@",{requires:["moodle-editor_atto-plugin"]});
|
||||
|
||||
+1
@@ -38,6 +38,7 @@ Y.namespace('M.atto_noautolink').Button = Y.Base.create('button', Y.M.editor_att
|
||||
this.addButton({
|
||||
icon: 'e/prevent_autolink',
|
||||
callback: this._preventAutoLink,
|
||||
inlineFormat: true,
|
||||
tags: '.nolink'
|
||||
});
|
||||
},
|
||||
|
||||
@@ -36,6 +36,7 @@ Y.namespace('M.atto_noautolink').Button = Y.Base.create('button', Y.M.editor_att
|
||||
this.addButton({
|
||||
icon: 'e/prevent_autolink',
|
||||
callback: this._preventAutoLink,
|
||||
inlineFormat: true,
|
||||
tags: '.nolink'
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user