You are not logged in.
Pages: 1
Hi all,
how can I delete unwished icons ( i.e. "insert image") from the toolbar ?
thnx
Frank
cu
Frank
Offline
I'm also wondering how to configure the toolbar and plugins.
Is there any documentation anywhere, I don't see it
Offline
how can I delete unwished icons ( i.e. "insert image") from the toolbar ?
I just edit the htmlarea.js file, around line 300 or so, and remove the names of the buttons I don't want.
Offline
No, don't edit the file! You won't be able to update the code without clobbering your changes.
Create a new HTMLArea.Config() object, and set its toolbar attribute, like:
xinha_config = new HTMLArea.Config();
xinha_config.toolbar = ['my', 'list', 'of', 'buttons'];
Use the htmlarea.js file as a model for what goes in that toolbar attribute. The NewbieGuide includes a script that shows you how to use your own config object.
Offline
Hmm, sounds good. But now I must declare each of the buttons... What I meant was a simple method to delete an icon, so like
xinha_config.toolbar = [-'icon'];
or so...
cu
Frank
Offline
i havent tested (yes, still on holidays lol, turned from 1 week holiday to 3 weeks holidays now, and keep running :D ) but what about the fonction hideSomeButtons() in the Config object ? (line 568 changest 287)
HTMLArea.Config.prototype.hideSomeButtons = function(remove)
Isnt it exactly what is needed ? I havent used it yet, because i always create the new toolbar the way i want, but i think it is exactly the method needed here.
/** Call this function to remove some buttons/drop-down boxes from the toolbar.
* Pass as the only parameter a string containing button/drop-down names
* delimited by spaces. Note that the string should also begin with a space
* and end with a space. Example:
*
* config.hideSomeButtons(" fontname fontsize textindicator ");
*
* It's useful because it's easier to remove stuff from the defaul toolbar than
* create a brand new toolbar ;-)
*/
Offline
Is there a similar means for altering what tags are allowed/parsed? I thought I saw one when I initially looked over the Xinha docs last week, but I can't locate it again.
Offline
Not that I remember.
You're better to use strip_tags() (in PHP, whatever equivalent in other languages) when you get the HTML back and limit the buttons/features so people can't easily insert those undesired tags.
James Sleeman
Offline
to remove unwanted html tags, it may still be in the config object, but once again, i cant say, i never managed to find a valid regexp
// remove tags (these have to be a regexp, or null if this functionality is not desired)
this.htmlRemoveTags = null;
it is declared in the config object and only used once in the function HTMLArea.getHTMLWrapper
if (outputRoot)
outputRoot = !(editor.config.htmlRemoveTags && editor.config.htmlRemoveTags.test(root_tag));
but yes, as gogo said, do it on server side. More secure to remove unwanted tags from your scripts on server than on clients.
Offline
Hai,
Is there some list of all the button-names from xinha and all the plugins? I want to order them in my toolbar but can't find the names.
Thanks...
Wijnand
Offline
Pages: 1