Changed Roo/bootstrap/form/HtmlEditorToolbar/Standard.jsdocs/json/roodata.jsondocs...
authorAlan <alan@roojs.com>
Thu, 16 Feb 2023 09:32:46 +0000 (17:32 +0800)
committerAlan <alan@roojs.com>
Thu, 16 Feb 2023 09:32:46 +0000 (17:32 +0800)
Roo/bootstrap/form/HtmlEditorToolbar/Standard.js
docs/json/roodata.json
docs/symbols/Roo.Component.json
docs/symbols/Roo.bootstrap.Component.json
docs/symbols/Roo.bootstrap.nav.Bar.json
docs/symbols/Roo.bootstrap.nav.Simplebar.json
docs/symbols/Roo.util.Observable.json
docs/tree.json
roojs-bootstrap-debug.js
roojs-bootstrap.js

index 7c1bf13..6cf32e7 100644 (file)
@@ -90,6 +90,7 @@ Roo.extend(Roo.bootstrap.form.HtmlEditorToolbar.Standard, Roo.bootstrap.nav.Simp
                 //glyphicon : id,
                 btnid : id,
                 fa: id,
+                cls : 'roo-html-editor-btn-' + id,
                 cmd : cmd, // why id || cmd
                 enableToggle: toggle !== false,
                 html : html || '',
@@ -110,6 +111,7 @@ Roo.extend(Roo.bootstrap.form.HtmlEditorToolbar.Standard, Roo.bootstrap.nav.Simp
                 size : 'sm',
                 xns: Roo.bootstrap,
                 fa : 'font',
+                cls : 'roo-html-editor-font-chooser',
                 //html : 'submit'
                 menu : {
                     xtype: 'Menu',
@@ -328,7 +330,7 @@ Roo.extend(Roo.bootstrap.form.HtmlEditorToolbar.Standard, Roo.bootstrap.nav.Simp
         var hasToggle  = false;
         btns.each(function(e) {
             if (e.enableToggle && e.cmd) {
-                hasToggle = hasToggle  || (['align-left', 'align-right', 'align-center'].indexOf(e.btnid) < 0 && doc.queryCommandState(e.cmd));
+                hasToggle = hasToggle  || (['align-left', 'align-right', 'align-center', 'image' , 'link'].indexOf(e.btnid) < 0 && doc.queryCommandState(e.cmd));
                 e.setActive(doc.queryCommandState(e.cmd));
             }
         }, this);
@@ -389,7 +391,7 @@ Roo.extend(Roo.bootstrap.form.HtmlEditorToolbar.Standard, Roo.bootstrap.nav.Simp
         }
        
         btns.get('link').setActive(tn == 'A' && this.selectedNode.hasAttribute('href'));
-        
+        btns.get('image').setActive(tn == 'IMG' || this.editorcore.enableBlocks && tn == 'FIGURE');
         Roo.bootstrap.menu.Manager.hideAll();
          
         
index bb561d3..8202127 100644 (file)
       "Roo.bootstrap.form.FieldLabel",
       "Roo.bootstrap.form.Form",
       "Roo.bootstrap.form.HtmlEditor",
-      "Roo.bootstrap.form.HtmlEditorToolbar.Context",
       "Roo.bootstrap.form.HtmlEditorToolbar.Standard",
       "Roo.bootstrap.form.Input",
       "Roo.bootstrap.form.Markdown",
       "Roo.bootstrap.form.FieldLabel",
       "Roo.bootstrap.form.Form",
       "Roo.bootstrap.form.HtmlEditor",
-      "Roo.bootstrap.form.HtmlEditorToolbar.Context",
       "Roo.bootstrap.form.HtmlEditorToolbar.Standard",
       "Roo.bootstrap.form.Input",
       "Roo.bootstrap.form.Markdown",
     "tree_children" : [],
     "tree_parent" : []
   },
-  "Roo.bootstrap.form.HtmlEditorToolbar.Context" : {
-    "props" : [
-      {
-        "name" : "actionMode",
-        "type" : "String",
-        "desc" : "which property holds the element that used for  hide() / show() / disable() / enable()\ndefault is 'el' for forms you probably want to set this to fieldEl",
-        "memberOf" : "Roo.Component",
-        "isOptional" : false,
-        "optvals" : []
-      },
-      {
-        "name" : "align",
-        "type" : "String",
-        "desc" : "t) alignme",
-        "memberOf" : "Roo.bootstrap.nav.Simplebar",
-        "isOptional" : false,
-        "optvals" : [
-          "left",
-          "right"
-        ]
-      },
-      {
-        "name" : "allowDomMove",
-        "type" : "Boolean",
-        "desc" : "Whether the component can move the Dom node when rendering (defaults to true).",
-        "memberOf" : "Roo.Component",
-        "isOptional" : false,
-        "optvals" : []
-      },
-      {
-        "name" : "arrangement",
-        "type" : "Boolean",
-        "desc" : "stacked | justified",
-        "memberOf" : "Roo.bootstrap.nav.Simplebar",
-        "isOptional" : false,
-        "optvals" : []
-      },
-      {
-        "name" : "can_build_overlaid",
-        "type" : "Boolean",
-        "desc" : "True if element can be rebuild from a HTML page",
-        "memberOf" : "Roo.bootstrap.Component",
-        "isOptional" : false,
-        "optvals" : []
-      },
-      {
-        "name" : "cls",
-        "type" : "String",
-        "desc" : "css class",
-        "memberOf" : "Roo.bootstrap.Component",
-        "isOptional" : false,
-        "optvals" : []
-      },
-      {
-        "name" : "container_method",
-        "type" : "string",
-        "desc" : "method to fetch parents container element (used by NavHeaderbar -  getHeaderChildContainer)",
-        "memberOf" : "Roo.bootstrap.Component",
-        "isOptional" : false,
-        "optvals" : []
-      },
-      {
-        "name" : "dataId",
-        "type" : "string",
-        "desc" : "cutomer id",
-        "memberOf" : "Roo.bootstrap.Component",
-        "isOptional" : false,
-        "optvals" : []
-      },
-      {
-        "name" : "disableClass",
-        "type" : "String",
-        "desc" : "CSS class added to the component when it is disabled (defaults to \"x-item-disabled\").",
-        "memberOf" : "Roo.Component",
-        "isOptional" : false,
-        "optvals" : []
-      },
-      {
-        "name" : "hideMode",
-        "type" : "String",
-        "desc" : "y)\nHow this component should hidden. Supported values are\n\"visibility\" (css visibility), \"offsets\" (negative offset position) and\n\"display\" (css display) - defaults to \"display",
-        "memberOf" : "Roo.Component",
-        "isOptional" : false,
-        "optvals" : [
-          "display",
-          "visibility"
-        ]
-      },
-      {
-        "name" : "inverse",
-        "type" : "Boolean",
-        "desc" : "is inverted color",
-        "memberOf" : "Roo.bootstrap.nav.Simplebar",
-        "isOptional" : false,
-        "optvals" : []
-      },
-      {
-        "name" : "listeners",
-        "type" : "Object",
-        "desc" : "list of events and functions to call for this object, \nFor example :\n<pre><code>\n    listeners :  { \n       'click' : function(e) {\n           ..... \n        } ,\n        .... \n    } \n  </code></pre>",
-        "memberOf" : "Roo.util.Observable",
-        "isOptional" : false,
-        "optvals" : []
-      },
-      {
-        "name" : "loadMask",
-        "type" : "Boolean",
-        "desc" : "e) loadMask on the b",
-        "memberOf" : "Roo.bootstrap.nav.Simplebar",
-        "isOptional" : false,
-        "optvals" : [
-          "true",
-          "false"
-        ]
-      },
-      {
-        "name" : "main",
-        "type" : "Boolean",
-        "desc" : "e) main nav bar? default fal",
-        "memberOf" : "Roo.bootstrap.nav.Simplebar",
-        "isOptional" : false,
-        "optvals" : [
-          "true",
-          "false"
-        ]
-      },
-      {
-        "name" : "name",
-        "type" : "string",
-        "desc" : "Specifies name attribute",
-        "memberOf" : "Roo.bootstrap.Component",
-        "isOptional" : false,
-        "optvals" : []
-      },
-      {
-        "name" : "style",
-        "type" : "String",
-        "desc" : "any extra css",
-        "memberOf" : "Roo.bootstrap.Component",
-        "isOptional" : false,
-        "optvals" : []
-      },
-      {
-        "name" : "tag",
-        "type" : "String",
-        "desc" : "v) default is n",
-        "memberOf" : "Roo.bootstrap.nav.Simplebar",
-        "isOptional" : false,
-        "optvals" : [
-          "header",
-          "footer",
-          "nav",
-          "div"
-        ]
-      },
-      {
-        "name" : "tooltip",
-        "type" : "string",
-        "desc" : "Text for the tooltip",
-        "memberOf" : "Roo.bootstrap.Component",
-        "isOptional" : false,
-        "optvals" : []
-      },
-      {
-        "name" : "type",
-        "type" : "String",
-        "desc" : "",
-        "memberOf" : "Roo.bootstrap.nav.Simplebar",
-        "isOptional" : false,
-        "optvals" : [
-          "nav",
-          "pills",
-          "tabs"
-        ]
-      },
-      {
-        "name" : "visibilityEl",
-        "type" : "string|object",
-        "desc" : "t) What element to use for visibility (@see getVisibilityEl(",
-        "memberOf" : "Roo.bootstrap.Component",
-        "isOptional" : false,
-        "optvals" : [
-          "el",
-          "parent"
-        ]
-      },
-      {
-        "name" : "weight",
-        "type" : "String",
-        "desc" : "e) default is ligh",
-        "memberOf" : "Roo.bootstrap.nav.Simplebar",
-        "isOptional" : false,
-        "optvals" : [
-          "light",
-          "primary",
-          "secondary",
-          "success",
-          "danger",
-          "warning",
-          "info",
-          "dark",
-          "white"
-        ]
-      },
-      {
-        "name" : "xattr",
-        "type" : "Object",
-        "desc" : "extra attributes to add to 'element' (used by builder to store stuff.)",
-        "memberOf" : "Roo.bootstrap.Component",
-        "isOptional" : false,
-        "optvals" : []
-      }
-    ],
-    "events" : [
-      {
-        "name" : "beforedestroy",
-        "type" : "function",
-        "desc" : "Fires before the component is destroyed. Return false to stop the destroy.",
-        "sig" : "function (_self)\n{\n\n}",
-        "memberOf" : "Roo.Component",
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "params" : [
-          {
-            "name" : "this",
-            "type" : "Roo.Component",
-            "desc" : "",
-            "isOptional" : false
-          }
-        ],
-        "returns" : []
-      },
-      {
-        "name" : "beforehide",
-        "type" : "function",
-        "desc" : "Fires before the component is hidden. Return false to stop the hide.",
-        "sig" : "function (_self)\n{\n\n}",
-        "memberOf" : "Roo.Component",
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "params" : [
-          {
-            "name" : "this",
-            "type" : "Roo.Component",
-            "desc" : "",
-            "isOptional" : false
-          }
-        ],
-        "returns" : []
-      },
-      {
-        "name" : "beforerender",
-        "type" : "function",
-        "desc" : "Fires before the component is rendered. Return false to stop the render.",
-        "sig" : "function (_self)\n{\n\n}",
-        "memberOf" : "Roo.Component",
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "params" : [
-          {
-            "name" : "this",
-            "type" : "Roo.Component",
-            "desc" : "",
-            "isOptional" : false
-          }
-        ],
-        "returns" : []
-      },
-      {
-        "name" : "beforeshow",
-        "type" : "function",
-        "desc" : "Fires before the component is shown.  Return false to stop the show.",
-        "sig" : "function (_self)\n{\n\n}",
-        "memberOf" : "Roo.Component",
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "params" : [
-          {
-            "name" : "this",
-            "type" : "Roo.Component",
-            "desc" : "",
-            "isOptional" : false
-          }
-        ],
-        "returns" : []
-      },
-      {
-        "name" : "beforetoggle",
-        "type" : "function",
-        "desc" : "Fire before toggle the menu",
-        "sig" : "function (e)\n{\n\n}",
-        "memberOf" : "Roo.bootstrap.nav.Bar",
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "params" : [
-          {
-            "name" : "e",
-            "type" : "Roo.EventObject",
-            "desc" : "",
-            "isOptional" : false
-          }
-        ],
-        "returns" : []
-      },
-      {
-        "name" : "childrenrendered",
-        "type" : "function",
-        "desc" : "Fires when the children have been rendered..",
-        "sig" : "function (_self)\n{\n\n}",
-        "memberOf" : "Roo.bootstrap.Component",
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "params" : [
-          {
-            "name" : "this",
-            "type" : "Roo.bootstrap.Component",
-            "desc" : "",
-            "isOptional" : false
-          }
-        ],
-        "returns" : []
-      },
-      {
-        "name" : "destroy",
-        "type" : "function",
-        "desc" : "Fires after the component is destroyed.",
-        "sig" : "function (_self)\n{\n\n}",
-        "memberOf" : "Roo.Component",
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "params" : [
-          {
-            "name" : "this",
-            "type" : "Roo.Component",
-            "desc" : "",
-            "isOptional" : false
-          }
-        ],
-        "returns" : []
-      },
-      {
-        "name" : "disable",
-        "type" : "function",
-        "desc" : "Fires after the component is disabled.",
-        "sig" : "function (_self)\n{\n\n}",
-        "memberOf" : "Roo.Component",
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "params" : [
-          {
-            "name" : "this",
-            "type" : "Roo.Component",
-            "desc" : "",
-            "isOptional" : false
-          }
-        ],
-        "returns" : []
-      },
-      {
-        "name" : "enable",
-        "type" : "function",
-        "desc" : "Fires after the component is enabled.",
-        "sig" : "function (_self)\n{\n\n}",
-        "memberOf" : "Roo.Component",
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "params" : [
-          {
-            "name" : "this",
-            "type" : "Roo.Component",
-            "desc" : "",
-            "isOptional" : false
-          }
-        ],
-        "returns" : []
-      },
-      {
-        "name" : "hide",
-        "type" : "function",
-        "desc" : "Fires after the component is hidden.",
-        "sig" : "function (_self)\n{\n\n}",
-        "memberOf" : "Roo.Component",
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "params" : [
-          {
-            "name" : "this",
-            "type" : "Roo.Component",
-            "desc" : "",
-            "isOptional" : false
-          }
-        ],
-        "returns" : []
-      },
-      {
-        "name" : "render",
-        "type" : "function",
-        "desc" : "Fires after the component is rendered.",
-        "sig" : "function (_self)\n{\n\n}",
-        "memberOf" : "Roo.Component",
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "params" : [
-          {
-            "name" : "this",
-            "type" : "Roo.Component",
-            "desc" : "",
-            "isOptional" : false
-          }
-        ],
-        "returns" : []
-      },
-      {
-        "name" : "show",
-        "type" : "function",
-        "desc" : "Fires after the component is shown.",
-        "sig" : "function (_self)\n{\n\n}",
-        "memberOf" : "Roo.Component",
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "params" : [
-          {
-            "name" : "this",
-            "type" : "Roo.Component",
-            "desc" : "",
-            "isOptional" : false
-          }
-        ],
-        "returns" : []
-      }
-    ],
-    "methods" : [
-      {
-        "name" : "addEvents",
-        "type" : "function",
-        "desc" : "Used to define events on this Observable",
-        "sig" : "(object)",
-        "static" : false,
-        "memberOf" : "Roo.util.Observable",
-        "isStatic" : false,
-        "isConstructor" : false,
-        "isPrivate" : false,
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "exceptions" : "",
-        "requires" : "",
-        "params" : [
-          {
-            "name" : "object",
-            "type" : "Object",
-            "desc" : "The object with the events defined",
-            "isOptional" : false
-          }
-        ],
-        "returns" : []
-      },
-      {
-        "name" : "addListener",
-        "type" : "function",
-        "desc" : "Appends an event handler to this component",
-        "sig" : "(eventName, handler, scope, options)",
-        "static" : false,
-        "memberOf" : "Roo.util.Observable",
-        "isStatic" : false,
-        "isConstructor" : false,
-        "isPrivate" : false,
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "exceptions" : "",
-        "requires" : "",
-        "params" : [
-          {
-            "name" : "eventName",
-            "type" : "String",
-            "desc" : "The type of event to listen for",
-            "isOptional" : false
-          },
-          {
-            "name" : "handler",
-            "type" : "Function",
-            "desc" : "The method the event invokes",
-            "isOptional" : false
-          },
-          {
-            "name" : "scope",
-            "type" : "Object",
-            "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
-            "isOptional" : false
-          },
-          {
-            "name" : "options",
-            "type" : "Object",
-            "desc" : "(optional) An object containing handler configuration\nproperties. This may contain any of the following properties:<ul>\n<li>scope {Object} The scope in which to execute the handler function. The handler function's \"this\" context.</li>\n<li>delay {Number} The number of milliseconds to delay the invocation of the handler after te event fires.</li>\n<li>single {Boolean} True to add a handler to handle just the next firing of the event, and then remove itself.</li>\n<li>buffer {Number} Causes the handler to be scheduled to run in an {@link Roo.util.DelayedTask} delayed\nby the specified number of milliseconds. If the event fires again within that time, the original\nhandler is <em>not</em> invoked, but the new handler is scheduled in its place.</li>\n</ul><br>\n<p>\n<b>Combining Options</b><br>\nUsing the options argument, it is possible to combine different types of listeners:<br>\n<br>\nA normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId)\n\t\t<pre><code>\n\t\tel.on('click', this.onClick, this, {\n \t\t\tsingle: true,\n    \t\tdelay: 100,\n    \t\tforumId: 4\n\t\t});\n\t\t</code></pre>\n<p>\n<b>Attaching multiple handlers in 1 call</b><br>\nThe method also allows for a single argument to be passed which is a config object containing properties\nwhich specify multiple handlers.\n<pre><code>\n\t\tel.on({\n\t\t\t'click': {\n        \t\tfn: this.onClick,\n        \t\tscope: this,\n        \t\tdelay: 100\n    \t\t}, \n    \t\t'mouseover': {\n        \t\tfn: this.onMouseOver,\n        \t\tscope: this\n    \t\t},\n    \t\t'mouseout': {\n        \t\tfn: this.onMouseOut,\n        \t\tscope: this\n    \t\t}\n\t\t});\n\t\t</code></pre>\n<p>\nOr a shorthand syntax which passes the same scope object to all handlers:\n     \t<pre><code>\n\t\tel.on({\n\t\t\t'click': this.onClick,\n    \t\t'mouseover': this.onMouseOver,\n    \t\t'mouseout': this.onMouseOut,\n    \t\tscope: this\n\t\t});\n\t\t</code></pre>",
-            "isOptional" : false
-          }
-        ],
-        "returns" : []
-      },
-      {
-        "name" : "capture",
-        "type" : "function",
-        "desc" : "Starts capture on the specified Observable. All events will be passed\nto the supplied function with the event name + standard signature of the event\n<b>before</b> the event is fired. If the supplied function returns false,\nthe event will not fire.",
-        "sig" : "(o, fn, scope)",
-        "static" : true,
-        "memberOf" : "Roo.util.Observable",
-        "isStatic" : true,
-        "isConstructor" : false,
-        "isPrivate" : false,
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "exceptions" : "",
-        "requires" : "",
-        "params" : [
-          {
-            "name" : "o",
-            "type" : "Observable",
-            "desc" : "The Observable to capture",
-            "isOptional" : false
-          },
-          {
-            "name" : "fn",
-            "type" : "Function",
-            "desc" : "The function to call",
-            "isOptional" : false
-          },
-          {
-            "name" : "scope",
-            "type" : "Object",
-            "desc" : "(optional) The scope (this object) for the fn",
-            "isOptional" : false
-          }
-        ],
-        "returns" : []
-      },
-      {
-        "name" : "collapse",
-        "type" : "function",
-        "desc" : "Collapse the navbar pulldown",
-        "sig" : "()\n{\n\n}",
-        "static" : false,
-        "memberOf" : "Roo.bootstrap.nav.Bar",
-        "isStatic" : false,
-        "isConstructor" : false,
-        "isPrivate" : false,
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "exceptions" : "",
-        "requires" : "",
-        "params" : [],
-        "returns" : []
-      },
-      {
-        "name" : "destroy",
-        "type" : "function",
-        "desc" : "Destroys this component by purging any event listeners, removing the component's element from the DOM,\nremoving the component from its {@link Roo.Container} (if applicable) and unregistering it from {@link Roo.ComponentMgr}.",
-        "sig" : "()\n{\n\n}",
-        "static" : false,
-        "memberOf" : "Roo.Component",
-        "isStatic" : false,
-        "isConstructor" : false,
-        "isPrivate" : false,
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "exceptions" : "",
-        "requires" : "",
-        "params" : [],
-        "returns" : []
-      },
-      {
-        "name" : "disable",
-        "type" : "function",
-        "desc" : "Disable this component.",
-        "sig" : "()\n{\n\n}",
-        "static" : false,
-        "memberOf" : "Roo.Component",
-        "isStatic" : false,
-        "isConstructor" : false,
-        "isPrivate" : false,
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "exceptions" : "",
-        "requires" : "",
-        "params" : [],
-        "returns" : [
-          {
-            "name" : "",
-            "type" : "Roo.Component",
-            "desc" : "this"
-          }
-        ]
-      },
-      {
-        "name" : "enable",
-        "type" : "function",
-        "desc" : "Enable this component.",
-        "sig" : "()\n{\n\n}",
-        "static" : false,
-        "memberOf" : "Roo.Component",
-        "isStatic" : false,
-        "isConstructor" : false,
-        "isPrivate" : false,
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "exceptions" : "",
-        "requires" : "",
-        "params" : [],
-        "returns" : [
-          {
-            "name" : "",
-            "type" : "Roo.Component",
-            "desc" : "this"
-          }
-        ]
-      },
-      {
-        "name" : "expand",
-        "type" : "function",
-        "desc" : "Expand the navbar pulldown",
-        "sig" : "()\n{\n\n}",
-        "static" : false,
-        "memberOf" : "Roo.bootstrap.nav.Bar",
-        "isStatic" : false,
-        "isConstructor" : false,
-        "isPrivate" : false,
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "exceptions" : "",
-        "requires" : "",
-        "params" : [],
-        "returns" : []
-      },
-      {
-        "name" : "fireEvent",
-        "type" : "function",
-        "desc" : "Fires the specified event with the passed parameters (minus the event name).",
-        "sig" : "(eventName, args)",
-        "static" : false,
-        "memberOf" : "Roo.util.Observable",
-        "isStatic" : false,
-        "isConstructor" : false,
-        "isPrivate" : false,
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "exceptions" : "",
-        "requires" : "",
-        "params" : [
-          {
-            "name" : "eventName",
-            "type" : "String",
-            "desc" : "",
-            "isOptional" : false
-          },
-          {
-            "name" : "args",
-            "type" : "Object...",
-            "desc" : "Variable number of parameters are passed to handlers",
-            "isOptional" : false
-          }
-        ],
-        "returns" : [
-          {
-            "name" : "",
-            "type" : "Boolean",
-            "desc" : "returns false if any of the handlers return false otherwise it returns true"
-          }
-        ]
-      },
-      {
-        "name" : "focus",
-        "type" : "function",
-        "desc" : "Try to focus this component.",
-        "sig" : "(selectText)",
-        "static" : false,
-        "memberOf" : "Roo.Component",
-        "isStatic" : false,
-        "isConstructor" : false,
-        "isPrivate" : false,
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "exceptions" : "",
-        "requires" : "",
-        "params" : [
-          {
-            "name" : "selectText",
-            "type" : "Boolean",
-            "desc" : "True to also select the text in this component (if applicable)",
-            "isOptional" : false
-          }
-        ],
-        "returns" : [
-          {
-            "name" : "",
-            "type" : "Roo.Component",
-            "desc" : "this"
-          }
-        ]
-      },
-      {
-        "name" : "getChildContainer",
-        "type" : "function",
-        "desc" : "Fetch the element to add children to",
-        "sig" : "()\n{\n\n}",
-        "static" : false,
-        "memberOf" : "Roo.bootstrap.Component",
-        "isStatic" : false,
-        "isConstructor" : false,
-        "isPrivate" : false,
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "exceptions" : "",
-        "requires" : "",
-        "params" : [],
-        "returns" : [
-          {
-            "name" : "",
-            "type" : "Roo.Element",
-            "desc" : "defaults to this.el"
-          }
-        ]
-      },
-      {
-        "name" : "getEl",
-        "type" : "function",
-        "desc" : "Returns the underlying {@link Roo.Element}.",
-        "sig" : "()\n{\n\n}",
-        "static" : false,
-        "memberOf" : "Roo.Component",
-        "isStatic" : false,
-        "isConstructor" : false,
-        "isPrivate" : false,
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "exceptions" : "",
-        "requires" : "",
-        "params" : [],
-        "returns" : [
-          {
-            "name" : "",
-            "type" : "Roo.Element",
-            "desc" : "The element"
-          }
-        ]
-      },
-      {
-        "name" : "getId",
-        "type" : "function",
-        "desc" : "Returns the id of this component.",
-        "sig" : "()\n{\n\n}",
-        "static" : false,
-        "memberOf" : "Roo.Component",
-        "isStatic" : false,
-        "isConstructor" : false,
-        "isPrivate" : false,
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "exceptions" : "",
-        "requires" : "",
-        "params" : [],
-        "returns" : [
-          {
-            "name" : "",
-            "type" : "String",
-            "desc" : ""
-          }
-        ]
-      },
-      {
-        "name" : "getVisibilityEl",
-        "type" : "function",
-        "desc" : "Get the element that will be used to show or hide",
-        "sig" : "()\n{\n\n}",
-        "static" : false,
-        "memberOf" : "Roo.bootstrap.Component",
-        "isStatic" : false,
-        "isConstructor" : false,
-        "isPrivate" : false,
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "exceptions" : "",
-        "requires" : "",
-        "params" : [],
-        "returns" : []
-      },
-      {
-        "name" : "hasListener",
-        "type" : "function",
-        "desc" : "Checks to see if this object has any listeners for a specified event",
-        "sig" : "(eventName)",
-        "static" : false,
-        "memberOf" : "Roo.util.Observable",
-        "isStatic" : false,
-        "isConstructor" : false,
-        "isPrivate" : false,
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "exceptions" : "",
-        "requires" : "",
-        "params" : [
-          {
-            "name" : "eventName",
-            "type" : "String",
-            "desc" : "The name of the event to check for",
-            "isOptional" : false
-          }
-        ],
-        "returns" : [
-          {
-            "name" : "",
-            "type" : "Boolean",
-            "desc" : "True if the event is being listened for, else false"
-          }
-        ]
-      },
-      {
-        "name" : "hide",
-        "type" : "function",
-        "desc" : "Hide a component - adds 'hidden' class",
-        "sig" : "()\n{\n\n}",
-        "static" : false,
-        "memberOf" : "Roo.bootstrap.Component",
-        "isStatic" : false,
-        "isConstructor" : false,
-        "isPrivate" : false,
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "exceptions" : "",
-        "requires" : "",
-        "params" : [],
-        "returns" : []
-      },
-      {
-        "name" : "initEvents",
-        "type" : "function",
-        "desc" : "Initialize Events for the element",
-        "sig" : "()\n{\n\n}",
-        "static" : false,
-        "memberOf" : "Roo.bootstrap.Component",
-        "isStatic" : false,
-        "isConstructor" : false,
-        "isPrivate" : false,
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "exceptions" : "",
-        "requires" : "",
-        "params" : [],
-        "returns" : []
-      },
-      {
-        "name" : "isVisible",
-        "type" : "function",
-        "desc" : "Returns true if this component is visible.",
-        "sig" : "()\n{\n\n}",
-        "static" : false,
-        "memberOf" : "Roo.Component",
-        "isStatic" : false,
-        "isConstructor" : false,
-        "isPrivate" : false,
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "exceptions" : "",
-        "requires" : "",
-        "params" : [],
-        "returns" : []
-      },
-      {
-        "name" : "on",
-        "type" : "function",
-        "desc" : "Appends an event handler to this element (shorthand for addListener)",
-        "sig" : "(eventName, handler, scope, options)",
-        "static" : false,
-        "memberOf" : "Roo.util.Observable",
-        "isStatic" : false,
-        "isConstructor" : false,
-        "isPrivate" : false,
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "exceptions" : "",
-        "requires" : "",
-        "params" : [
-          {
-            "name" : "eventName",
-            "type" : "String",
-            "desc" : "The type of event to listen for",
-            "isOptional" : false
-          },
-          {
-            "name" : "handler",
-            "type" : "Function",
-            "desc" : "The method the event invokes",
-            "isOptional" : false
-          },
-          {
-            "name" : "scope",
-            "type" : "Object",
-            "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
-            "isOptional" : false
-          },
-          {
-            "name" : "options",
-            "type" : "Object",
-            "desc" : "(optional)",
-            "isOptional" : false
-          }
-        ],
-        "returns" : []
-      },
-      {
-        "name" : "purgeListeners",
-        "type" : "function",
-        "desc" : "Removes all listeners for this object",
-        "sig" : "()\n{\n\n}",
-        "static" : false,
-        "memberOf" : "Roo.util.Observable",
-        "isStatic" : false,
-        "isConstructor" : false,
-        "isPrivate" : false,
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "exceptions" : "",
-        "requires" : "",
-        "params" : [],
-        "returns" : []
-      },
-      {
-        "name" : "releaseCapture",
-        "type" : "function",
-        "desc" : "Removes <b>all</b> added captures from the Observable.",
-        "sig" : "(o)",
-        "static" : true,
-        "memberOf" : "Roo.util.Observable",
-        "isStatic" : true,
-        "isConstructor" : false,
-        "isPrivate" : false,
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "exceptions" : "",
-        "requires" : "",
-        "params" : [
-          {
-            "name" : "o",
-            "type" : "Observable",
-            "desc" : "The Observable to release",
-            "isOptional" : false
-          }
-        ],
-        "returns" : []
-      },
-      {
-        "name" : "removeListener",
-        "type" : "function",
-        "desc" : "Removes a listener",
-        "sig" : "(eventName, handler, scope)",
-        "static" : false,
-        "memberOf" : "Roo.util.Observable",
-        "isStatic" : false,
-        "isConstructor" : false,
-        "isPrivate" : false,
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "exceptions" : "",
-        "requires" : "",
-        "params" : [
-          {
-            "name" : "eventName",
-            "type" : "String",
-            "desc" : "The type of event to listen for",
-            "isOptional" : false
-          },
-          {
-            "name" : "handler",
-            "type" : "Function",
-            "desc" : "The handler to remove",
-            "isOptional" : false
-          },
-          {
-            "name" : "scope",
-            "type" : "Object",
-            "desc" : "(optional) The scope (this object) for the handler",
-            "isOptional" : false
-          }
-        ],
-        "returns" : []
-      },
-      {
-        "name" : "render",
-        "type" : "function",
-        "desc" : "If this is a lazy rendering component, render it to its container element.",
-        "sig" : "(container)",
-        "static" : false,
-        "memberOf" : "Roo.Component",
-        "isStatic" : false,
-        "isConstructor" : false,
-        "isPrivate" : false,
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "exceptions" : "",
-        "requires" : "",
-        "params" : [
-          {
-            "name" : "container",
-            "type" : "String/HTMLElement/Element",
-            "desc" : "(optional) The element this component should be rendered into. If it is being applied to existing markup, this should be left off.",
-            "isOptional" : false
-          }
-        ],
-        "returns" : []
-      },
-      {
-        "name" : "setDisabled",
-        "type" : "function",
-        "desc" : "Convenience function for setting disabled/enabled by boolean.",
-        "sig" : "(disabled)",
-        "static" : false,
-        "memberOf" : "Roo.Component",
-        "isStatic" : false,
-        "isConstructor" : false,
-        "isPrivate" : false,
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "exceptions" : "",
-        "requires" : "",
-        "params" : [
-          {
-            "name" : "disabled",
-            "type" : "Boolean",
-            "desc" : "",
-            "isOptional" : false
-          }
-        ],
-        "returns" : []
-      },
-      {
-        "name" : "setVisibilityEl",
-        "type" : "function",
-        "desc" : "Set the element that will be used to show or hide",
-        "sig" : "()\n{\n\n}",
-        "static" : false,
-        "memberOf" : "Roo.bootstrap.Component",
-        "isStatic" : false,
-        "isConstructor" : false,
-        "isPrivate" : false,
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "exceptions" : "",
-        "requires" : "",
-        "params" : [],
-        "returns" : []
-      },
-      {
-        "name" : "setVisible",
-        "type" : "function",
-        "desc" : "Convenience function to hide or show this component by boolean.",
-        "sig" : "(visible)",
-        "static" : false,
-        "memberOf" : "Roo.Component",
-        "isStatic" : false,
-        "isConstructor" : false,
-        "isPrivate" : false,
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "exceptions" : "",
-        "requires" : "",
-        "params" : [
-          {
-            "name" : "visible",
-            "type" : "Boolean",
-            "desc" : "True to show, false to hide",
-            "isOptional" : false
-          }
-        ],
-        "returns" : [
-          {
-            "name" : "",
-            "type" : "Roo.Component",
-            "desc" : "this"
-          }
-        ]
-      },
-      {
-        "name" : "show",
-        "type" : "function",
-        "desc" : "Show a component - removes 'hidden' class",
-        "sig" : "()\n{\n\n}",
-        "static" : false,
-        "memberOf" : "Roo.bootstrap.Component",
-        "isStatic" : false,
-        "isConstructor" : false,
-        "isPrivate" : false,
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "exceptions" : "",
-        "requires" : "",
-        "params" : [],
-        "returns" : []
-      },
-      {
-        "name" : "tooltipEl",
-        "type" : "function",
-        "desc" : "Fetch the element to display the tooltip on.",
-        "sig" : "()\n{\n\n}",
-        "static" : false,
-        "memberOf" : "Roo.bootstrap.Component",
-        "isStatic" : false,
-        "isConstructor" : false,
-        "isPrivate" : false,
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "exceptions" : "",
-        "requires" : "",
-        "params" : [],
-        "returns" : [
-          {
-            "name" : "",
-            "type" : "Roo.Element",
-            "desc" : "defaults to this.el"
-          }
-        ]
-      },
-      {
-        "name" : "un",
-        "type" : "function",
-        "desc" : "Removes a listener (shorthand for removeListener)",
-        "sig" : "(eventName, handler, scope)",
-        "static" : false,
-        "memberOf" : "Roo.util.Observable",
-        "isStatic" : false,
-        "isConstructor" : false,
-        "isPrivate" : false,
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "exceptions" : "",
-        "requires" : "",
-        "params" : [
-          {
-            "name" : "eventName",
-            "type" : "String",
-            "desc" : "The type of event to listen for",
-            "isOptional" : false
-          },
-          {
-            "name" : "handler",
-            "type" : "Function",
-            "desc" : "The handler to remove",
-            "isOptional" : false
-          },
-          {
-            "name" : "scope",
-            "type" : "Object",
-            "desc" : "(optional) The scope (this object) for the handler",
-            "isOptional" : false
-          }
-        ],
-        "returns" : []
-      },
-      {
-        "name" : "updateToolbar",
-        "type" : "function",
-        "desc" : "Protected method that will not generally be called directly. It triggers\na toolbar update by reading the markup state of the current selection in the editor.\n\nNote you can force an update by calling on('editorevent', scope, false)",
-        "sig" : "()\n{\n\n}",
-        "static" : false,
-        "memberOf" : "",
-        "isStatic" : false,
-        "isConstructor" : false,
-        "isPrivate" : false,
-        "example" : "",
-        "deprecated" : "",
-        "since" : "",
-        "see" : "",
-        "exceptions" : "",
-        "requires" : "",
-        "params" : [],
-        "returns" : []
-      }
-    ],
-    "isAbstract" : false,
-    "isBuilderTop" : false,
-    "implementations" : [],
-    "tree_children" : [],
-    "tree_parent" : [
-      "Roo.bootstrap.form.HtmlEditor"
-    ]
-  },
   "Roo.bootstrap.form.HtmlEditorToolbar.Standard" : {
     "props" : [
       {
     "implementations" : [
       "Roo.bootstrap.PagingToolbar",
       "Roo.bootstrap.PopoverNav",
-      "Roo.bootstrap.form.HtmlEditorToolbar.Context",
       "Roo.bootstrap.form.HtmlEditorToolbar.Standard",
       "Roo.bootstrap.nav.Headerbar",
       "Roo.bootstrap.nav.Sidebar",
     "implementations" : [
       "Roo.bootstrap.PagingToolbar",
       "Roo.bootstrap.PopoverNav",
-      "Roo.bootstrap.form.HtmlEditorToolbar.Context",
       "Roo.bootstrap.form.HtmlEditorToolbar.Standard",
       "Roo.bootstrap.nav.Headerbar"
     ],
       "Roo.bootstrap.form.FieldLabel",
       "Roo.bootstrap.form.Form",
       "Roo.bootstrap.form.HtmlEditor",
-      "Roo.bootstrap.form.HtmlEditorToolbar.Context",
       "Roo.bootstrap.form.HtmlEditorToolbar.Standard",
       "Roo.bootstrap.form.Input",
       "Roo.bootstrap.form.Markdown",
index 6cf0277..e88eabc 100644 (file)
@@ -20,7 +20,6 @@
     "Roo.bootstrap.nav.Simplebar" : [
       "Roo.bootstrap.PagingToolbar",
       "Roo.bootstrap.PopoverNav",
-      "Roo.bootstrap.form.HtmlEditorToolbar.Context",
       "Roo.bootstrap.form.HtmlEditorToolbar.Standard",
       "Roo.bootstrap.nav.Headerbar"
     ],
index d024040..ed9818d 100644 (file)
@@ -12,7 +12,6 @@
     "Roo.bootstrap.nav.Simplebar" : [
       "Roo.bootstrap.PagingToolbar",
       "Roo.bootstrap.PopoverNav",
-      "Roo.bootstrap.form.HtmlEditorToolbar.Context",
       "Roo.bootstrap.form.HtmlEditorToolbar.Standard",
       "Roo.bootstrap.nav.Headerbar"
     ],
index 322ad04..db09c05 100644 (file)
@@ -13,7 +13,6 @@
     "Roo.bootstrap.nav.Simplebar" : [
       "Roo.bootstrap.PagingToolbar",
       "Roo.bootstrap.PopoverNav",
-      "Roo.bootstrap.form.HtmlEditorToolbar.Context",
       "Roo.bootstrap.form.HtmlEditorToolbar.Standard",
       "Roo.bootstrap.nav.Headerbar"
     ]
index 1f7df53..bdb9e2d 100644 (file)
@@ -10,7 +10,6 @@
     "Roo.bootstrap.nav.Simplebar" : [
       "Roo.bootstrap.PagingToolbar",
       "Roo.bootstrap.PopoverNav",
-      "Roo.bootstrap.form.HtmlEditorToolbar.Context",
       "Roo.bootstrap.form.HtmlEditorToolbar.Standard",
       "Roo.bootstrap.nav.Headerbar"
     ]
index 708212e..671c72f 100644 (file)
     "Roo.bootstrap.nav.Simplebar" : [
       "Roo.bootstrap.PagingToolbar",
       "Roo.bootstrap.PopoverNav",
-      "Roo.bootstrap.form.HtmlEditorToolbar.Context",
       "Roo.bootstrap.form.HtmlEditorToolbar.Standard",
       "Roo.bootstrap.nav.Headerbar"
     ],
index 73006c1..4470527 100644 (file)
               {
                 "name" : "Roo.bootstrap.form.HtmlEditorToolbar",
                 "cn" : [
-                  {
-                    "name" : "Roo.bootstrap.form.HtmlEditorToolbar.Context",
-                    "cn" : [],
-                    "is_class" : true
-                  },
                   {
                     "name" : "Roo.bootstrap.form.HtmlEditorToolbar.Standard",
                     "cn" : [],
index b6dfdfa..b245ddf 100644 (file)
@@ -32958,6 +32958,7 @@ Roo.extend(Roo.bootstrap.form.HtmlEditorToolbar.Standard, Roo.bootstrap.nav.Simp
                 //glyphicon : id,
                 btnid : id,
                 fa: id,
+                cls : 'roo-html-editor-btn-' + id,
                 cmd : cmd, // why id || cmd
                 enableToggle: toggle !== false,
                 html : html || '',
@@ -32978,6 +32979,7 @@ Roo.extend(Roo.bootstrap.form.HtmlEditorToolbar.Standard, Roo.bootstrap.nav.Simp
                 size : 'sm',
                 xns: Roo.bootstrap,
                 fa : 'font',
+                cls : 'roo-html-editor-font-chooser',
                 //html : 'submit'
                 menu : {
                     xtype: 'Menu',
@@ -33196,7 +33198,7 @@ Roo.extend(Roo.bootstrap.form.HtmlEditorToolbar.Standard, Roo.bootstrap.nav.Simp
         var hasToggle  = false;
         btns.each(function(e) {
             if (e.enableToggle && e.cmd) {
-                hasToggle = hasToggle  || (['align-left', 'align-right', 'align-center'].indexOf(e.btnid) < 0 && doc.queryCommandState(e.cmd));
+                hasToggle = hasToggle  || (['align-left', 'align-right', 'align-center', 'image' , 'link'].indexOf(e.btnid) < 0 && doc.queryCommandState(e.cmd));
                 e.setActive(doc.queryCommandState(e.cmd));
             }
         }, this);
@@ -33257,7 +33259,7 @@ Roo.extend(Roo.bootstrap.form.HtmlEditorToolbar.Standard, Roo.bootstrap.nav.Simp
         }
        
         btns.get('link').setActive(tn == 'A' && this.selectedNode.hasAttribute('href'));
-        
+        btns.get('image').setActive(tn == 'IMG' || this.editorcore.enableBlocks && tn == 'FIGURE');
         Roo.bootstrap.menu.Manager.hideAll();
          
         
index fd03c37..63d6141 100644 (file)
@@ -1415,25 +1415,26 @@ this.wrap.remove();}},onFirstFocus:function(){this.editorcore.onFirstFocus();for
 // Roo/bootstrap/form/HtmlEditorToolbar/Standard.js
 Roo.bootstrap.form.HtmlEditorToolbar.Standard=function(A){Roo.apply(this,A);this.disable=this.disable||{};Roo.applyIf(this.disable,{fontSize:true,colors:true,specialElements:true});Roo.bootstrap.form.HtmlEditorToolbar.Standard.superclass.constructor.call(this,A);
 this.editor=A.editor;this.editorcore=A.editor.editorcore;this.buttons=new Roo.util.MixedCollection(false,function(o){return o.btnid;});};Roo.extend(Roo.bootstrap.form.HtmlEditorToolbar.Standard,Roo.bootstrap.nav.Simplebar,{bar:true,editor:false,editorcore:false,formats:["p","h1","h2","h3","h4","h5","h6","pre","code","abbr","acronym","address","cite","samp","var",'div','span'],deleteBtn:false,onRender:function(ct,A){Roo.bootstrap.form.HtmlEditorToolbar.Standard.superclass.onRender.call(this,ct,A);
-Roo.log(this.el);this.el.dom.style.marginBottom='0';var B=this;var C=this.editorcore;var D=this.editor;var E=[];var F=function(id,G,H,I,J){var K=H?'toggle':'click';var a={size:'sm',xtype:'Button',xns:Roo.bootstrap,btnid:id,fa:id,cmd:G,enableToggle:H!==false,html:J||'',pressed:H?false:null,listeners:{}
-};a.listeners[H?'toggle':'click']=function(){I?I.call(B,this):B.onBtnClick.call(B,G||id);};E.push(a);return a;};var style={xtype:'Button',size:'sm',xns:Roo.bootstrap,fa:'font',menu:{xtype:'Menu',xns:Roo.bootstrap,items:[]}};Roo.each(this.formats,function(f){style.menu.items.push({xtype:'MenuItem',xns:Roo.bootstrap,html:'<'+f+' style="margin:2px">'+f+'</'+f+'>',tagname:f,listeners:{click:function(){C.insertTag(this.tagname);
-D.focus();}}});});E.push(style);F('bold',false,true);F('italic',false,true);F('align-left','justifyleft',true);F('align-center','justifycenter',true);F('align-right','justifyright',true);F('link',false,true,this.onLinkClick);F('image',false,true,this.onImageClick);
-F('list','insertunorderedlist',true);F('list-ol','insertorderedlist',true);F('pencil',false,true,function(G){Roo.log(this);this.toggleSourceEdit(G.pressed);});if(this.editor.btns.length>0){for(var i=0;i<this.editor.btns.length;i++){E.push(this.editor.btns[i]);
-}}this.xtype='NavSimplebar';for(var i=0;i<E.length;i++){this.buttons.add(this.addxtypeChild(E[i]));}this.buildToolbarDelete();D.on('editorevent',this.updateToolbar,this);},buildToolbarDelete:function(){this.deleteBtn=this.addxtypeChild({size:'sm',xtype:'Button',xns:Roo.bootstrap,fa:'trash',listeners:{click:this.onDelete.createDelegate(this)}
-});this.deleteBtn.hide();},onImageClick:function(){if(this.input){this.input.un('change',this.onFileSelected,this);}this.input=Roo.get(document.body).createChild({tag:'input',type:'file',style:'display:none',multiple:'multiple'});this.input.on('change',this.onFileSelected,this);
-this.input.dom.click();},onFileSelected:function(e){e.preventDefault();if(typeof(this.input.dom.files)=='undefined'||!this.input.dom.files.length){return;}this.addFiles(Array.prototype.slice.call(this.input.dom.files));},addFiles:function(A){if(!A.length){return;
-}var f=A.pop();if(!f.type.match(/^image/)){this.addFiles(A);return;}var sn=this.selectedNode;var bl=sn&&this.editorcore.enableBlocks?Roo.htmleditor.Block.factory(sn):false;var B=this.editorcore;var C=new FileReader();C.addEventListener('load',(function(){if(bl){bl.image_src=C.result;
+Roo.log(this.el);this.el.dom.style.marginBottom='0';var B=this;var C=this.editorcore;var D=this.editor;var E=[];var F=function(id,G,H,I,J){var K=H?'toggle':'click';var a={size:'sm',xtype:'Button',xns:Roo.bootstrap,btnid:id,fa:id,cls:'roo-html-editor-btn-'+id,cmd:G,enableToggle:H!==false,html:J||'',pressed:H?false:null,listeners:{}
+};a.listeners[H?'toggle':'click']=function(){I?I.call(B,this):B.onBtnClick.call(B,G||id);};E.push(a);return a;};var style={xtype:'Button',size:'sm',xns:Roo.bootstrap,fa:'font',cls:'roo-html-editor-font-chooser',menu:{xtype:'Menu',xns:Roo.bootstrap,items:[]}
+};Roo.each(this.formats,function(f){style.menu.items.push({xtype:'MenuItem',xns:Roo.bootstrap,html:'<'+f+' style="margin:2px">'+f+'</'+f+'>',tagname:f,listeners:{click:function(){C.insertTag(this.tagname);D.focus();}}});});E.push(style);F('bold',false,true);
+F('italic',false,true);F('align-left','justifyleft',true);F('align-center','justifycenter',true);F('align-right','justifyright',true);F('link',false,true,this.onLinkClick);F('image',false,true,this.onImageClick);F('list','insertunorderedlist',true);F('list-ol','insertorderedlist',true);
+F('pencil',false,true,function(G){Roo.log(this);this.toggleSourceEdit(G.pressed);});if(this.editor.btns.length>0){for(var i=0;i<this.editor.btns.length;i++){E.push(this.editor.btns[i]);}}this.xtype='NavSimplebar';for(var i=0;i<E.length;i++){this.buttons.add(this.addxtypeChild(E[i]));
+}this.buildToolbarDelete();D.on('editorevent',this.updateToolbar,this);},buildToolbarDelete:function(){this.deleteBtn=this.addxtypeChild({size:'sm',xtype:'Button',xns:Roo.bootstrap,fa:'trash',listeners:{click:this.onDelete.createDelegate(this)}});this.deleteBtn.hide();
+},onImageClick:function(){if(this.input){this.input.un('change',this.onFileSelected,this);}this.input=Roo.get(document.body).createChild({tag:'input',type:'file',style:'display:none',multiple:'multiple'});this.input.on('change',this.onFileSelected,this);this.input.dom.click();
+},onFileSelected:function(e){e.preventDefault();if(typeof(this.input.dom.files)=='undefined'||!this.input.dom.files.length){return;}this.addFiles(Array.prototype.slice.call(this.input.dom.files));},addFiles:function(A){if(!A.length){return;}var f=A.pop();
+if(!f.type.match(/^image/)){this.addFiles(A);return;}var sn=this.selectedNode;var bl=sn&&this.editorcore.enableBlocks?Roo.htmleditor.Block.factory(sn):false;var B=this.editorcore;var C=new FileReader();C.addEventListener('load',(function(){if(bl){bl.image_src=C.result;
 bl.updateElement(sn);B.owner.fireEvent('editorevent',B,false);return;}if(this.editorcore.enableBlocks){var D=new Roo.htmleditor.BlockFigure({image_src:C.result,caption:'',caption_display:'none'});B.insertAtCursor(D.toHTML());B.owner.fireEvent('editorevent',B,false);
 return;}if(sn&&sn.tagName.toUpperCase()=='IMG'){sn.src=C.result;B.owner.fireEvent('editorevent',B,false);return;}B.insertAtCursor('<img src="'+C.result+'">');B.owner.fireEvent('editorevent',B,false);}).createDelegate(this));C.readAsDataURL(f);},onBtnClick:function(id){this.editorcore.relayCmd(id);
 this.editorcore.focus();},onLinkClick:function(A){var B=this.selectedNode&&this.selectedNode.tagName.toUpperCase()=='A'?this.selectedNode.getAttribute('href'):'';Roo.bootstrap.MessageBox.show({title:"Add / Edit Link URL",msg:"Enter the URL for the link",buttons:Roo.bootstrap.MessageBox.OKCANCEL,minWidth:250,scope:this,prompt:true,multiline:false,modal:true,value:B,fn:function(C,D){if(C!='ok'){this.editorcore.focus();
 return;}if(B!=''){this.selectedNode.setAttribute('href',D);return;}if(D&&D.match(/http(s):\/\/.+/)){this.editorcore.relayCmd('createlink',D);}this.editorcore.focus();}});},updateToolbar:function(A,ev,B){if(!this.editorcore.activated){this.editor.onFirstFocus();
-return;}var C=this.buttons;var D=this.editorcore.doc;var E=false;C.each(function(e){if(e.enableToggle&&e.cmd){E=E||(['align-left','align-right','align-center'].indexOf(e.btnid)<0&&D.queryCommandState(e.cmd));e.setActive(D.queryCommandState(e.cmd));}},this);
-if(ev&&(ev.type=='mouseup'||ev.type=='click')&&ev.target&&ev.target.tagName!='BODY'){B=ev.target;}var F=this.editorcore.getAllAncestors();if(!B){B=F.length?(F[0]?F[0]:F[1]):this.editorcore.doc.body;B=B?B:this.editorcore.doc.body;B=B.tagName.length?B:this.editorcore.doc.body;
+return;}var C=this.buttons;var D=this.editorcore.doc;var E=false;C.each(function(e){if(e.enableToggle&&e.cmd){E=E||(['align-left','align-right','align-center','image','link'].indexOf(e.btnid)<0&&D.queryCommandState(e.cmd));e.setActive(D.queryCommandState(e.cmd));
+}},this);if(ev&&(ev.type=='mouseup'||ev.type=='click')&&ev.target&&ev.target.tagName!='BODY'){B=ev.target;}var F=this.editorcore.getAllAncestors();if(!B){B=F.length?(F[0]?F[0]:F[1]):this.editorcore.doc.body;B=B?B:this.editorcore.doc.body;B=B.tagName.length?B:this.editorcore.doc.body;
 }var G=this.selectedNode;this.selectedNode=B;var db=false;if(B&&B.hasAttribute('data-block')){db=B;}else if(B&&B.closest('[data-block]')){db=B.closest('[data-block]');}Array.from(this.editorcore.doc.body.querySelectorAll('.roo-ed-selection')).forEach(function(e){e.classList.remove('roo-ed-selection');
 });var H=false;if(db&&this.editorcore.enableBlocks){H=Roo.htmleditor.Block.factory(db);if(H){db.className=(db.classList.length>0?db.className+' ':'')+' roo-ed-selection';B=this.selectedNode=db;}}var tn=B&&B.tagName.toUpperCase()||'';if(!H&&B&&tn!='A'){var I=B.closest('A');
-if(I){B=I;}}C.get('link').setActive(tn=='A'&&this.selectedNode.hasAttribute('href'));Roo.bootstrap.menu.Manager.hideAll();if(E||(tn.length&&tn=='BODY')){this.deleteBtn.hide();return;}this.deleteBtn.show();},onFirstFocus:function(){this.buttons.each(function(A){A.enable();
-});},onDelete:function(){var A=this.editorcore.createRange();var B=this.editorcore.getSelection();var sn=this.selectedNode;A.setStart(sn,0);A.setEnd(sn,0);if(sn.hasAttribute('data-block')){var C=Roo.htmleditor.Block.factory(this.selectedNode);if(C){sn=C.removeNode();
-sn.parentNode.removeChild(sn);B.removeAllRanges();B.addRange(A);this.updateToolbar(null,null,null);this.editorcore.fireEditorEvent(false);return;}}if(!sn){return;}if(sn&&sn.tagName=='BODY'){return;}var D=sn.childNodes[0]||sn.nextSibling||sn.previousSibling||sn.parentNode;
+if(I){B=I;}}C.get('link').setActive(tn=='A'&&this.selectedNode.hasAttribute('href'));C.get('image').setActive(tn=='IMG'||this.editorcore.enableBlocks&&tn=='FIGURE');Roo.bootstrap.menu.Manager.hideAll();if(E||(tn.length&&tn=='BODY')){this.deleteBtn.hide();
+return;}this.deleteBtn.show();},onFirstFocus:function(){this.buttons.each(function(A){A.enable();});},onDelete:function(){var A=this.editorcore.createRange();var B=this.editorcore.getSelection();var sn=this.selectedNode;A.setStart(sn,0);A.setEnd(sn,0);if(sn.hasAttribute('data-block')){var C=Roo.htmleditor.Block.factory(this.selectedNode);
+if(C){sn=C.removeNode();sn.parentNode.removeChild(sn);B.removeAllRanges();B.addRange(A);this.updateToolbar(null,null,null);this.editorcore.fireEditorEvent(false);return;}}if(!sn){return;}if(sn&&sn.tagName=='BODY'){return;}var D=sn.childNodes[0]||sn.nextSibling||sn.previousSibling||sn.parentNode;
 a=new Roo.htmleditor.FilterKeepChildren({tag:false});a.replaceTag(sn);B.removeAllRanges();B.addRange(A);this.editorcore.fireEditorEvent(false);},toggleSourceEdit:function(A){if(A){Roo.log("disabling buttons");this.buttons.each(function(B){if(B.cmd!='pencil'){B.disable();
 }});}else{Roo.log("enabling buttons");if(this.editorcore.initialized){this.buttons.each(function(B){B.enable();});}}Roo.log("calling toggole on editor");this.editor.toggleSourceEdit(A);}});
 // Roo/bootstrap/form/Markdown.js