* @class Roo.bootstrap.HtmlEditorToolbar1
* Basic Toolbar
*
+ * @example
* Usage:
*
new Roo.bootstrap.HtmlEditor({
var editor= this.editor;
var children = [];
- var btn = function(id,cmd , toggle, handler){
+ var btn = function(id,cmd , toggle, handler, html){
var event = toggle ? 'toggle' : 'click';
size : 'sm',
xtype: 'Button',
xns: Roo.bootstrap,
- glyphicon : id,
+ //glyphicon : id,
+ fa: id,
cmd : id || cmd,
enableToggle:toggle !== false,
- //html : 'submit'
+ html : html || '',
pressed : toggle ? false : null,
listeners : {}
};
children.push(a);
return a;
}
+
+ // var cb_box = function...
var style = {
xtype: 'Button',
size : 'sm',
xns: Roo.bootstrap,
- glyphicon : 'font',
+ fa : 'font',
//html : 'submit'
menu : {
xtype: 'Menu',
});
});
- children.push(style);
+ children.push(style);
- Roo.log(this.editor.btns.length);
-
- if (this.editor.btns.length > 0) {
- for (var i = 0; i<this.editor.btns.length; i++) {
- Roo.log(this.editor.btns[i].glyphicon);
- btn(this.editor.btns[i].glyphicon,false,true,this.editor.btns.check);
- }
- }
-
btn('bold',false,true);
btn('italic',false,true);
btn('align-left', 'justifyleft',true);
Roo.log(this);
this.toggleSourceEdit(btn.pressed);
});
+
+ if (this.editor.btns.length > 0) {
+ for (var i = 0; i<this.editor.btns.length; i++) {
+ children.push(this.editor.btns[i]);
+ }
+ }
+
/*
var cog = {
xtype: 'Button',
// hides menus... - so this cant be on a menu...
Roo.bootstrap.MenuMgr.hideAll();
*/
- Roo.bootstrap.MenuMgr.hideAll();
+ Roo.bootstrap.menu.Manager.hideAll();
//this.editorsyncValue();
},
onFirstFocus: function() {