Lexical scoping used in $.FE.PLUGINS.bbCode makes extending bb-code toggle behaviour very hard

Xon

Well-known member
Affected version
2.2.6
The bb-code button has a lexical scoped function btnsToDisable which is used to determine which buttons will be disabled. Without the ability to monkey patch this function (or extend it), adding a button which isn't disabled by the bb-code toggle isn't really very nice.

It would be great if the various functions used the this object that is passed back to the editor which has toHtml/toBbCode/etc to call the functions. The apply functions probably need todo the stash this into self sort of trick or use XF.proxy on the invoke site.

This sort of behaviour very likely applies to most of the XF editor plugins
 
Top