}
},
-
+
{
xtype : 'Button',
text: 'Hide Caption',
break;
case 'bold':
case 'italic':
+ case 'underline':
// if there is no selection, then we insert, and set the curson inside it..
this.execCmd('styleWithCSS', false);
break;
//glyphicon : id,
btnid : id,
fa: id,
+ cls : 'roo-html-editor-btn-' + id,
cmd : cmd, // why id || cmd
enableToggle: toggle !== false,
html : html || '',
size : 'sm',
xns: Roo.bootstrap,
fa : 'font',
+ cls : 'roo-html-editor-font-chooser',
//html : 'submit'
menu : {
xtype: 'Menu',
});
children.push(style);
- btn('bold', false,true);
- btn('italic', false,true);
+ btn('bold', 'bold',true);
+ btn('italic', 'italic',true);
+ btn('underline', 'underline',true);
btn('align-left', 'justifyleft',true);
btn('align-center', 'justifycenter',true);
btn('align-right' , 'justifyright',true);
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', 'underline'].indexOf(e.btnid) < 0 && doc.queryCommandState(e.cmd));
e.setActive(doc.queryCommandState(e.cmd));
}
}, this);
}
btns.get('link').setActive(tn == 'A' && this.selectedNode.hasAttribute('href'));
+ btns.get('image').setActive(tn == 'IMG' || this.editorcore.enableBlocks && tn == 'FIGURE');
+ btns.get('underline').setActive(tn == 'U' || sel.closest('u') ? true : false);
Roo.bootstrap.menu.Manager.hideAll();