}
var tbc = Roo.form.HtmlEditor.ToolbarContext;
- var tbops = tbc.options;
+
for (var i in tlist) {
//optname == used so you can configure the options available..
var opts = item.opts ? item.opts : false;
- if (item.optname) {
- opts = tbops[item.optname];
+ if (item.optname) { // use the b
+ opts = Roo.form.HtmlEditor.ToolbarContext.options[item.optname];
}
data : opts
}),
name : '-roo-edit-' + i,
+
attrname : i,
stylename : item.style ? item.style : false,
+
displayField: item.displayField ? item.displayField : 'val',
valueField : 'val',
typeAhead: false,
width: item.width ? item.width : 130,
listeners : {
'select': function(c, r, i) {
+ if (tb.selectedNode.hasClass('data-block')) {
+ var b = Roo.htmleditor.Block.factory(tb.selectedNode);
+ b[c.attrname] = r.get('val');
+ b.updateElement(tb.selectedNode);
+ return;
+ }
+
if (c.stylename) {
tb.selectedNode.style[c.stylename] = r.get('val');
return;