You are not logged in.
Pages: 1
Okay, I know this is a strange request, but I was wondering if it is possible to permanently disable buttons but not hide them (this is due to wanting to keep consistent interface between users that have some restrictions)
David G. Paul
[url]http://www.newearthonline.co.uk[/url]
Offline
The button status is updated (and thus enabled) by updateToolbar() all the time
Dirty hack: define a context for the buttons that never occurs
xinha_config.btnList.about[4] = 'del';
This would be the clean way, a plugin the disables the respective buttons on each cycle
function DisableButtons(editor) {
this.editor = editor;
}
DisableButtons._pluginInfo = {
name : "DisableButtons",
version : "1.0",
developer : "Xinha Core Developer Team",
developer_url : "http://xinha.org",
c_owner : "Xinha community",
sponsor : "",
sponsor_url : "",
license : "Creative Commons Attribution-ShareAlike License"
}
Xinha.Config.prototype.btnsToDisable =
[
'about','formatblock','fullscreen'
]
DisableButtons.prototype.onUpdateToolbar = function()
{
for (var i =0; i<this.editor.config.btnsToDisable.length;i++)
{
this.editor._toolbarObjects[this.editor.config.btnsToDisable[i]].state("enabled", false);
}
}
Offline
Pages: 1