Updates the toggle status of the button. If the selection is contained inside an 'ol' block,
+its status will be made active and "pressed" attribute of the button will be
+set to true, otherwise, it will be set to false.
Collection of strings used to label elements of the button's UI.
+ButtonOl provides string properties to specify the label of the button.
+
+
+
+
+
Default: {label: 'Numbered List'}
+
+
+
+
+
Fires event stringsChange
+
+
+ Fires when the value for the configuration attribute strings is
+ changed. You can listen for the event using the on method if you
+ wish to be notified before the attribute's value has changed, or
+ using the after method if you wish to be notified after the
+ attribute's value has changed.
+
+
+
+
Parameters:
+
+
+
+ e
+ EventFacade
+
+
+ An Event Facade object with the following
+ attribute-specific properties added:
+
+
+
+
+ prevVal
+ Any
+
The value of the attribute, prior to it being set.
Specifies the element (style) which this button handles.
+
Applies the style of this button if its current status is pressed
+and removes it otherwise.
-
Default: 'strong'
+
+
Parameters:
+
+
+
+
+
+ event
+ EventFacade
+
+
+
+
+
+
Event that triggered when user clicked on the button.
+
+
+
+
+
+
+
+
-
-
Fires event elementChange
-
- Fires when the value for the configuration attribute element is
- changed. You can listen for the event using the on method if you
- wish to be notified before the attribute's value has changed, or
- using the after method if you wish to be notified after the
- attribute's value has changed.
-
Specifies the element (style) which this button handles.
+
+
+
+
+
Default: 's'
+
+
+
+
+
Fires event elementChange
+
+
+ Fires when the value for the configuration attribute element is
+ changed. You can listen for the event using the on method if you
+ wish to be notified before the attribute's value has changed, or
+ using the after method if you wish to be notified after the
+ attribute's value has changed.
+
+
+
+
Parameters:
+
+
+
+ e
+ EventFacade
+
+
+ An Event Facade object with the following
+ attribute-specific properties added:
+
+
+
+
+ prevVal
+ Any
+
The value of the attribute, prior to it being set.
Specifies the element (style) which this button handles.
+
+
+
+
+
Default: 'strong'
+
+
+
+
+
Fires event elementChange
+
+
+ Fires when the value for the configuration attribute element is
+ changed. You can listen for the event using the on method if you
+ wish to be notified before the attribute's value has changed, or
+ using the after method if you wish to be notified after the
+ attribute's value has changed.
+
+
+
+
Parameters:
+
+
+
+ e
+ EventFacade
+
+
+ An Event Facade object with the following
+ attribute-specific properties added:
+
+
+
+
+ prevVal
+ Any
+
The value of the attribute, prior to it being set.
Specifies the element (style) which this button handles.
+
+
+
+
+
Default: 'sub'
+
+
+
+
+
Fires event elementChange
+
+
+ Fires when the value for the configuration attribute element is
+ changed. You can listen for the event using the on method if you
+ wish to be notified before the attribute's value has changed, or
+ using the after method if you wish to be notified after the
+ attribute's value has changed.
+
+
+
+
Parameters:
+
+
+
+ e
+ EventFacade
+
+
+ An Event Facade object with the following
+ attribute-specific properties added:
+
+
+
+
+ prevVal
+ Any
+
The value of the attribute, prior to it being set.
Specifies the element (style) which this button handles.
+
+
+
+
+
Default: 'sup'
+
+
+
+
+
Fires event elementChange
+
+
+ Fires when the value for the configuration attribute element is
+ changed. You can listen for the event using the on method if you
+ wish to be notified before the attribute's value has changed, or
+ using the after method if you wish to be notified after the
+ attribute's value has changed.
+
+
+
+
Parameters:
+
+
+
+ e
+ EventFacade
+
+
+ An Event Facade object with the following
+ attribute-specific properties added:
+
+
+
+
+ prevVal
+ Any
+
The value of the attribute, prior to it being set.
Collection of strings used to label elements of the button's UI.
+ButtonStrong provides string properties to specify the label of the button.
+
+
+
+
+
Default: {label: 'Strike'}
+
+
+
+
+
Fires event stringsChange
+
+
+ Fires when the value for the configuration attribute strings is
+ changed. You can listen for the event using the on method if you
+ wish to be notified before the attribute's value has changed, or
+ using the after method if you wish to be notified after the
+ attribute's value has changed.
+
+
+
+
Parameters:
+
+
+
+ e
+ EventFacade
+
+
+ An Event Facade object with the following
+ attribute-specific properties added:
+
+
+
+
+ prevVal
+ Any
+
The value of the attribute, prior to it being set.
Collection of strings used to label elements of the button's UI.
+ButtonStrong provides string properties to specify the label of the button.
+
+
+
+
+
Default: {label: 'Bold'}
+
+
+
+
+
Fires event stringsChange
+
+
+ Fires when the value for the configuration attribute strings is
+ changed. You can listen for the event using the on method if you
+ wish to be notified before the attribute's value has changed, or
+ using the after method if you wish to be notified after the
+ attribute's value has changed.
+
+
+
+
Parameters:
+
+
+
+ e
+ EventFacade
+
+
+ An Event Facade object with the following
+ attribute-specific properties added:
+
+
+
+
+ prevVal
+ Any
+
The value of the attribute, prior to it being set.
Collection of strings used to label elements of the button's UI.
+ButtonStrong provides string properties to specify the label of the button.
+
+
+
+
+
Default: {label: 'Subscript'}
+
+
+
+
+
Fires event stringsChange
+
+
+ Fires when the value for the configuration attribute strings is
+ changed. You can listen for the event using the on method if you
+ wish to be notified before the attribute's value has changed, or
+ using the after method if you wish to be notified after the
+ attribute's value has changed.
+
+
+
+
Parameters:
+
+
+
+ e
+ EventFacade
+
+
+ An Event Facade object with the following
+ attribute-specific properties added:
+
+
+
+
+ prevVal
+ Any
+
The value of the attribute, prior to it being set.
Updates the toggle status of the button. If the selection is contained inside an 'ul' block,
+its status will be made active and "pressed" attribute of the button will be
+set to true, otherwise, it will be set to false.
Collection of strings used to label elements of the button's UI.
+ButtonUl provides string properties to specify the label of the button.
+
+
+
+
+
Default: {label: 'Bulleted List'}
+
+
+
+
+
Fires event stringsChange
+
+
+ Fires when the value for the configuration attribute strings is
+ changed. You can listen for the event using the on method if you
+ wish to be notified before the attribute's value has changed, or
+ using the after method if you wish to be notified after the
+ attribute's value has changed.
+
+
+
+
Parameters:
+
+
+
+ e
+ EventFacade
+
+
+ An Event Facade object with the following
+ attribute-specific properties added:
+
+
+
+
+ prevVal
+ Any
+
The value of the attribute, prior to it being set.
diff --git a/api/data.json b/api/data.json
index 55e85ecf2a..18f4da44cb 100644
--- a/api/data.json
+++ b/api/data.json
@@ -121,6 +121,13 @@
"fors": {},
"namespaces": {}
},
+ "src/ui/yui/src/buttons/button-hline.js": {
+ "name": "src/ui/yui/src/buttons/button-hline.js",
+ "modules": {},
+ "classes": {},
+ "fors": {},
+ "namespaces": {}
+ },
"src/ui/yui/src/buttons/button-image.js": {
"name": "src/ui/yui/src/buttons/button-image.js",
"modules": {},
@@ -139,6 +146,15 @@
"fors": {},
"namespaces": {}
},
+ "src/ui/yui/src/buttons/button-ol.js": {
+ "name": "src/ui/yui/src/buttons/button-ol.js",
+ "modules": {},
+ "classes": {
+ "ButtonOl": 1
+ },
+ "fors": {},
+ "namespaces": {}
+ },
"src/ui/yui/src/buttons/button-right.js": {
"name": "src/ui/yui/src/buttons/button-right.js",
"modules": {},
@@ -148,9 +164,30 @@
"fors": {},
"namespaces": {}
},
+ "src/ui/yui/src/buttons/button-strike.js": {
+ "name": "src/ui/yui/src/buttons/button-strike.js",
+ "modules": {},
+ "classes": {},
+ "fors": {},
+ "namespaces": {}
+ },
"src/ui/yui/src/buttons/button-strong.js": {
"name": "src/ui/yui/src/buttons/button-strong.js",
"modules": {},
+ "classes": {},
+ "fors": {},
+ "namespaces": {}
+ },
+ "src/ui/yui/src/buttons/button-subscript.js": {
+ "name": "src/ui/yui/src/buttons/button-subscript.js",
+ "modules": {},
+ "classes": {},
+ "fors": {},
+ "namespaces": {}
+ },
+ "src/ui/yui/src/buttons/button-superscript.js": {
+ "name": "src/ui/yui/src/buttons/button-superscript.js",
+ "modules": {},
"classes": {
"ButtonStrong": 1
},
@@ -166,6 +203,15 @@
"fors": {},
"namespaces": {}
},
+ "src/ui/yui/src/buttons/button-ul.js": {
+ "name": "src/ui/yui/src/buttons/button-ul.js",
+ "modules": {},
+ "classes": {
+ "ButtonUl": 1
+ },
+ "fors": {},
+ "namespaces": {}
+ },
"src/ui/yui/src/buttons/button-underline.js": {
"name": "src/ui/yui/src/buttons/button-underline.js",
"modules": {},
@@ -421,6 +467,18 @@
"line": 6,
"description": "The ButtonLeft class provides functionality for changing the alignment of an image."
},
+ "ButtonOl": {
+ "name": "ButtonOl",
+ "shortname": "ButtonOl",
+ "classitems": [],
+ "plugins": [],
+ "extensions": [],
+ "plugin_for": [],
+ "extension_for": [],
+ "file": "src/ui/yui/src/buttons/button-ol.js",
+ "line": 6,
+ "description": "The ButtonOl class provides functionality for converting a text selection into a numbered list."
+ },
"ButtonRight": {
"name": "ButtonRight",
"shortname": "ButtonRight",
@@ -441,9 +499,9 @@
"extensions": [],
"plugin_for": [],
"extension_for": [],
- "file": "src/ui/yui/src/buttons/button-strong.js",
+ "file": "src/ui/yui/src/buttons/button-superscript.js",
"line": 6,
- "description": "The ButtonStrong class provides functionality for applying \"strong\" (bold) style to a text selection."
+ "description": "The ButtonStrong class provides functionality for applying superscript style to a text selection."
},
"ButtonTwitter": {
"name": "ButtonTwitter",
@@ -457,6 +515,18 @@
"line": 6,
"description": "The ButtonTwitter class provides functionality for sending tweets based on the selected text."
},
+ "ButtonUl": {
+ "name": "ButtonUl",
+ "shortname": "ButtonUl",
+ "classitems": [],
+ "plugins": [],
+ "extensions": [],
+ "plugin_for": [],
+ "extension_for": [],
+ "file": "src/ui/yui/src/buttons/button-ul.js",
+ "line": 6,
+ "description": "The ButtonUl class provides functionality for converting a text selection into a bulleted list."
+ },
"ButtonU": {
"name": "ButtonU",
"shortname": "ButtonU",
@@ -1852,7 +1922,24 @@
},
{
"file": "src/ui/yui/src/buttons/button-em.js",
- "line": 20,
+ "line": 15,
+ "description": "Applies the style of the button if its current status is pressed\nand removes it otherwise.",
+ "itemtype": "method",
+ "name": "_onClick",
+ "access": "protected",
+ "tagname": "",
+ "params": [
+ {
+ "name": "event",
+ "description": "Event that triggered when user clicked on the button.",
+ "type": "EventFacade"
+ }
+ ],
+ "class": "ButtonEm"
+ },
+ {
+ "file": "src/ui/yui/src/buttons/button-em.js",
+ "line": 34,
"description": "Specifies the element (style) which this button handles.",
"itemtype": "attribute",
"name": "element",
@@ -1862,7 +1949,7 @@
},
{
"file": "src/ui/yui/src/buttons/button-em.js",
- "line": 32,
+ "line": 46,
"description": "Collection of strings used to label elements of the button's UI.\nButtonEm provides string properties to specify the label of the button.",
"itemtype": "attribute",
"name": "strings",
@@ -1910,6 +1997,21 @@
"type": "Object",
"class": "ButtonH2"
},
+ {
+ "file": "src/ui/yui/src/buttons/button-hline.js",
+ "line": 9,
+ "description": "Inserts a horizontal line after the current selection.",
+ "itemtype": "method",
+ "name": "_onClick\nprotected",
+ "params": [
+ {
+ "name": "event",
+ "description": "Event that triggered when user clicked on the button.",
+ "type": "EventFacade"
+ }
+ ],
+ "class": "ButtonImage"
+ },
{
"file": "src/ui/yui/src/buttons/button-image.js",
"line": 12,
@@ -2028,6 +2130,41 @@
"type": "Object",
"class": "ButtonLeft"
},
+ {
+ "file": "src/ui/yui/src/buttons/button-ol.js",
+ "line": 14,
+ "description": "Creates a numbered list block around the current selection with the following exceptions:\n- If the selection is already contained inside a numbered list, it will remove the list\nblock and transform the list items into individual paragraphs.\n- If the selection is contained inside a bulleted list, it will switch the
tag for an\n tag preserving all its items.",
+ "itemtype": "method",
+ "name": "_onClick",
+ "access": "protected",
+ "tagname": "",
+ "params": [
+ {
+ "name": "event",
+ "description": "Event that triggered when user clicked on the button.",
+ "type": "EventFacade"
+ }
+ ],
+ "class": "ButtonOl"
+ },
+ {
+ "file": "src/ui/yui/src/buttons/button-ol.js",
+ "line": 31,
+ "description": "Updates the toggle status of the button. If the selection is contained inside an 'ol' block,\nits status will be made active and \"pressed\" attribute of the button will be\nset to true, otherwise, it will be set to false.",
+ "itemtype": "method",
+ "name": "updateUI",
+ "class": "ButtonOl"
+ },
+ {
+ "file": "src/ui/yui/src/buttons/button-ol.js",
+ "line": 54,
+ "description": "Collection of strings used to label elements of the button's UI.\nButtonOl provides string properties to specify the label of the button.",
+ "itemtype": "attribute",
+ "name": "strings",
+ "default": "{label: 'Numbered List'}",
+ "type": "Object",
+ "class": "ButtonOl"
+ },
{
"file": "src/ui/yui/src/buttons/button-right.js",
"line": 12,
@@ -2073,9 +2210,63 @@
"type": "Object",
"class": "ButtonRight"
},
+ {
+ "file": "src/ui/yui/src/buttons/button-strike.js",
+ "line": 14,
+ "description": "Applies the style of this button if its current status is pressed\nand removes it otherwise.",
+ "itemtype": "method",
+ "name": "_onClick",
+ "access": "protected",
+ "tagname": "",
+ "params": [
+ {
+ "name": "event",
+ "description": "Event that triggered when user clicked on the button.",
+ "type": "EventFacade"
+ }
+ ],
+ "class": "ButtonStrong"
+ },
+ {
+ "file": "src/ui/yui/src/buttons/button-strike.js",
+ "line": 33,
+ "description": "Specifies the element (style) which this button handles.",
+ "itemtype": "attribute",
+ "name": "element",
+ "default": "'s'",
+ "type": "String",
+ "class": "ButtonStrong"
+ },
+ {
+ "file": "src/ui/yui/src/buttons/button-strike.js",
+ "line": 45,
+ "description": "Collection of strings used to label elements of the button's UI.\nButtonStrong provides string properties to specify the label of the button.",
+ "itemtype": "attribute",
+ "name": "strings",
+ "default": "{label: 'Strike'}",
+ "type": "Object",
+ "class": "ButtonStrong"
+ },
{
"file": "src/ui/yui/src/buttons/button-strong.js",
- "line": 19,
+ "line": 14,
+ "description": "Applies the style of this button if its current status is pressed\nand removes it otherwise.",
+ "itemtype": "method",
+ "name": "_onClick",
+ "access": "protected",
+ "tagname": "",
+ "params": [
+ {
+ "name": "event",
+ "description": "Event that triggered when user clicked on the button.",
+ "type": "EventFacade"
+ }
+ ],
+ "class": "ButtonStrong"
+ },
+ {
+ "file": "src/ui/yui/src/buttons/button-strong.js",
+ "line": 33,
"description": "Specifies the element (style) which this button handles.",
"itemtype": "attribute",
"name": "element",
@@ -2085,7 +2276,7 @@
},
{
"file": "src/ui/yui/src/buttons/button-strong.js",
- "line": 31,
+ "line": 45,
"description": "Collection of strings used to label elements of the button's UI.\nButtonStrong provides string properties to specify the label of the button.",
"itemtype": "attribute",
"name": "strings",
@@ -2093,6 +2284,80 @@
"type": "Object",
"class": "ButtonStrong"
},
+ {
+ "file": "src/ui/yui/src/buttons/button-subscript.js",
+ "line": 14,
+ "description": "Applies the style of this button if its current status is pressed\nand removes it otherwise.",
+ "itemtype": "method",
+ "name": "_onClick",
+ "access": "protected",
+ "tagname": "",
+ "params": [
+ {
+ "name": "event",
+ "description": "Event that triggered when user clicked on the button.",
+ "type": "EventFacade"
+ }
+ ],
+ "class": "ButtonStrong"
+ },
+ {
+ "file": "src/ui/yui/src/buttons/button-subscript.js",
+ "line": 33,
+ "description": "Specifies the element (style) which this button handles.",
+ "itemtype": "attribute",
+ "name": "element",
+ "default": "'sub'",
+ "type": "String",
+ "class": "ButtonStrong"
+ },
+ {
+ "file": "src/ui/yui/src/buttons/button-subscript.js",
+ "line": 45,
+ "description": "Collection of strings used to label elements of the button's UI.\nButtonStrong provides string properties to specify the label of the button.",
+ "itemtype": "attribute",
+ "name": "strings",
+ "default": "{label: 'Subscript'}",
+ "type": "Object",
+ "class": "ButtonStrong"
+ },
+ {
+ "file": "src/ui/yui/src/buttons/button-superscript.js",
+ "line": 14,
+ "description": "Applies the style of this button if its current status is pressed\nand removes it otherwise.",
+ "itemtype": "method",
+ "name": "_onClick",
+ "access": "protected",
+ "tagname": "",
+ "params": [
+ {
+ "name": "event",
+ "description": "Event that triggered when user clicked on the button.",
+ "type": "EventFacade"
+ }
+ ],
+ "class": "ButtonStrong"
+ },
+ {
+ "file": "src/ui/yui/src/buttons/button-superscript.js",
+ "line": 33,
+ "description": "Specifies the element (style) which this button handles.",
+ "itemtype": "attribute",
+ "name": "element",
+ "default": "'sup'",
+ "type": "String",
+ "class": "ButtonStrong"
+ },
+ {
+ "file": "src/ui/yui/src/buttons/button-superscript.js",
+ "line": 45,
+ "description": "Collection of strings used to label elements of the button's UI.\nButtonStrong provides string properties to specify the label of the button.",
+ "itemtype": "attribute",
+ "name": "strings",
+ "default": "{label: 'Superscript'}",
+ "type": "Object",
+ "class": "ButtonStrong"
+ },
{
"file": "src/ui/yui/src/buttons/button-twitter.js",
"line": 12,
@@ -2162,10 +2427,62 @@
"type": "String",
"class": "ButtonTwitter"
},
+ {
+ "file": "src/ui/yui/src/buttons/button-ul.js",
+ "line": 14,
+ "description": "Creates a bulleted list block around the current selection with the following exceptions:\n- If the selection is already contained inside a bulleted list, it will remove the list\nblock and transform the list items into individual paragraphs.\n- If the selection is contained inside a numbered list, it will switch the tag for a\n
tag preserving all its items.",
+ "itemtype": "method",
+ "name": "_onClick",
+ "access": "protected",
+ "tagname": "",
+ "params": [
+ {
+ "name": "event",
+ "description": "Event that triggered when user clicked on the button.",
+ "type": "EventFacade"
+ }
+ ],
+ "class": "ButtonUl"
+ },
+ {
+ "file": "src/ui/yui/src/buttons/button-ul.js",
+ "line": 31,
+ "description": "Updates the toggle status of the button. If the selection is contained inside an 'ul' block,\nits status will be made active and \"pressed\" attribute of the button will be\nset to true, otherwise, it will be set to false.",
+ "itemtype": "method",
+ "name": "updateUI",
+ "class": "ButtonUl"
+ },
+ {
+ "file": "src/ui/yui/src/buttons/button-ul.js",
+ "line": 54,
+ "description": "Collection of strings used to label elements of the button's UI.\nButtonUl provides string properties to specify the label of the button.",
+ "itemtype": "attribute",
+ "name": "strings",
+ "default": "{label: 'Bulleted List'}",
+ "type": "Object",
+ "class": "ButtonUl"
+ },
{
"file": "src/ui/yui/src/buttons/button-underline.js",
- "line": 22,
- "description": "Specifies the style, which should be applied to the current selection in editor.",
+ "line": 16,
+ "description": "Applies the style of this button if its current status is pressed\nand removes it otherwise.",
+ "itemtype": "method",
+ "name": "_onClick",
+ "access": "protected",
+ "tagname": "",
+ "params": [
+ {
+ "name": "event",
+ "description": "Event that triggered when user clicked on the button.",
+ "type": "EventFacade"
+ }
+ ],
+ "class": "ButtonU"
+ },
+ {
+ "file": "src/ui/yui/src/buttons/button-underline.js",
+ "line": 35,
+ "description": "Specifies the element (style) which this button handles.",
"itemtype": "attribute",
"name": "element",
"default": "'u'",
@@ -2174,7 +2491,7 @@
},
{
"file": "src/ui/yui/src/buttons/button-underline.js",
- "line": 34,
+ "line": 47,
"description": "Collection of strings used to label elements of the button's UI.\nButtonU provides string properties to specify the label of the button.",
"itemtype": "attribute",
"name": "strings",
diff --git a/api/files/src_core_debounce.js.html b/api/files/src_core_debounce.js.html
index 389789b8d3..726a6fac79 100644
--- a/api/files/src_core_debounce.js.html
+++ b/api/files/src_core_debounce.js.html
@@ -73,6 +73,8 @@
+YUI.add('button-ol', function(Y) {
+ 'use strict';
+
+ var Lang = Y.Lang;
+
+ /**
+ * The ButtonOl class provides functionality for converting a text selection into a numbered list.
+ *
+ * @class ButtonOl
+ */
+ var Ol = Y.Base.create('ol', Y.Plugin.Base, [Y.ButtonBase], {
+ TPL_CONTENT: '<i class="alloy-editor-icon-numbered-list"></i>',
+
+ /**
+ * Creates a numbered list block around the current selection with the following exceptions:
+ * - If the selection is already contained inside a numbered list, it will remove the list
+ * block and transform the list items into individual paragraphs.
+ * - If the selection is contained inside a bulleted list, it will switch the <ul> tag for an
+ * <ol> tag preserving all its items.
+ *
+ * @method _onClick
+ * @protected
+ * @param {EventFacade} event Event that triggered when user clicked on the button.
+ */
+ _onClick: function(event) {
+ var editor = this.get('host').get('editor');
+
+ editor.execCommand('numberedlist');
+ },
+
+ /**
+ * Updates the toggle status of the button. If the selection is contained inside an 'ol' block,
+ * its status will be made active and "pressed" attribute of the button will be
+ * set to true, otherwise, it will be set to false.
+ *
+ * @method updateUI
+ */
+ updateUI: function() {
+ var editor,
+ elementPath;
+
+ editor = this.get('host').get('editor');
+
+ elementPath = editor.elementPath();
+
+ this._button.set('pressed', elementPath.contains('ol'));
+ }
+ }, {
+ NAME: 'ol',
+
+ NS: 'ol',
+
+ ATTRS: {
+ /**
+ * Collection of strings used to label elements of the button's UI.
+ * ButtonOl provides string properties to specify the label of the button.
+ *
+ * @attribute strings
+ * @default {label: 'Numbered List'}
+ * @type Object
+ */
+ strings: {
+ validator: Lang.isObject,
+ value: {
+ label: 'Numbered List'
+ }
+ }
+ }
+ });
+
+ Y.ButtonOl = Ol;
+
+}, '', {
+ requires: ['button-base']
+});
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/files/src_ui_yui_src_buttons_button-right.js.html b/api/files/src_ui_yui_src_buttons_button-right.js.html
index 52c0e28ced..528a069c8e 100644
--- a/api/files/src_ui_yui_src_buttons_button-right.js.html
+++ b/api/files/src_ui_yui_src_buttons_button-right.js.html
@@ -73,6 +73,8 @@
+YUI.add('button-ul', function(Y) {
+ 'use strict';
+
+ var Lang = Y.Lang;
+
+ /**
+ * The ButtonUl class provides functionality for converting a text selection into a bulleted list.
+ *
+ * @class ButtonUl
+ */
+ var Ul = Y.Base.create('ul', Y.Plugin.Base, [Y.ButtonBase], {
+ TPL_CONTENT: '<i class="alloy-editor-icon-bulleted-list"></i>',
+
+ /**
+ * Creates a bulleted list block around the current selection with the following exceptions:
+ * - If the selection is already contained inside a bulleted list, it will remove the list
+ * block and transform the list items into individual paragraphs.
+ * - If the selection is contained inside a numbered list, it will switch the <ol> tag for a
+ * <ul> tag preserving all its items.
+ *
+ * @method _onClick
+ * @protected
+ * @param {EventFacade} event Event that triggered when user clicked on the button.
+ */
+ _onClick: function(event) {
+ var editor = this.get('host').get('editor');
+
+ editor.execCommand('bulletedlist');
+ },
+
+ /**
+ * Updates the toggle status of the button. If the selection is contained inside an 'ul' block,
+ * its status will be made active and "pressed" attribute of the button will be
+ * set to true, otherwise, it will be set to false.
+ *
+ * @method updateUI
+ */
+ updateUI: function() {
+ var editor,
+ elementPath;
+
+ editor = this.get('host').get('editor');
+
+ elementPath = editor.elementPath();
+
+ this._button.set('pressed', elementPath.contains('ul'));
+ }
+ }, {
+ NAME: 'ul',
+
+ NS: 'ul',
+
+ ATTRS: {
+ /**
+ * Collection of strings used to label elements of the button's UI.
+ * ButtonUl provides string properties to specify the label of the button.
+ *
+ * @attribute strings
+ * @default {label: 'Bulleted List'}
+ * @type Object
+ */
+ strings: {
+ validator: Lang.isObject,
+ value: {
+ label: 'Bulleted List'
+ }
+ }
+ }
+ });
+
+ Y.ButtonUl = Ul;
+
+}, '', {
+ requires: ['button-base']
+});
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/files/src_ui_yui_src_buttons_button-underline.js.html b/api/files/src_ui_yui_src_buttons_button-underline.js.html
index 425043338d..bbe15eada2 100644
--- a/api/files/src_ui_yui_src_buttons_button-underline.js.html
+++ b/api/files/src_ui_yui_src_buttons_button-underline.js.html
@@ -73,6 +73,8 @@
File src/ui/yui/src/buttons/button-underline.js<
* @constructor
*/
var Underline = Y.Base.create('underline', Y.Plugin.Base, [Y.ButtonBase], {
- TPL_CONTENT: '<i class="alloy-editor-icon-underline"></i>'
+ TPL_CONTENT: '<i class="alloy-editor-icon-underline"></i>',
+
+ /**
+ * Applies the style of this button if its current status is pressed
+ * and removes it otherwise.
+ *
+ * @method _onClick
+ * @protected
+ * @param {EventFacade} event Event that triggered when user clicked on the button.
+ */
+ _onClick: function(event) {
+ var editor = this.get('host').get('editor');
+
+ editor.execCommand('underline');
+ }
}, {
NAME: 'underline',
NS: 'underline',
ATTRS: {
-
/**
- * @description Specifies the style, which should be applied to the current selection in editor.
+ * Specifies the element (style) which this button handles.
*
* @attribute element
* @default 'u'
diff --git a/api/files/src_ui_yui_src_plugins_linktooltip.js.html b/api/files/src_ui_yui_src_plugins_linktooltip.js.html
index 9453ed15af..05f7ad8999 100644
--- a/api/files/src_ui_yui_src_plugins_linktooltip.js.html
+++ b/api/files/src_ui_yui_src_plugins_linktooltip.js.html
@@ -73,6 +73,8 @@