Hi all,

I have various instances of Bueditor available to various user roles. It all works just fine. One thing I would like to find out, though. I am accumulating quite a bit of extra buttons and extra functionality. But all my buttons are just lined up. Isn't there any way to organize them into nice groups, one per line, and therefore to split the "button line"? The result I'm looking for, would be something like this:

[Bold] [Italic] [Underline] ** what do I put here to make the button line split?? **
[something] [something else] [still something else] ** how to split the button line?? **
[Insert link] [Insert image]

Hope someone can help me out here.

Comments

modul’s picture

At the risk of sounding "pushy"... Could anyone help me out with this one? How can I split the row(s) of buttons which BUEditor just shows one after the other? Having the possibility to insert a "line break" in between the buttons would make the layout much neater and better organized. So, if anyone could help me out... Is there a way to insert this "line break" in the CSV file of downloaded/uploaded buttons, maybe? Just guessing. And if so, how to do that?

modul’s picture

Sorry to bother y'all, but I'm still looking/hoping for a way to split the BUEditor spaghetti-like row of buttons into a better structure, separated by linebreaks. Any ideas, anyone??

Roi Danton’s picture

I haven't engaged this issue but I'm interested in such a feature, too.

modul’s picture

I must be starting to sound pushy by now, I realize. But I really need this split-the-button-chain thingy. I have about 20 buttons on some of my BUEditors, and it is becoming not only ugly but also cumbersome to just have them one after the other. Splitting them in 3 or 4 lines would make BUEditor so much nicer, and easier to work with. Is there really no-one who can tell me how to split the button chain, or how to insert something like a "begin new line" thing? My gratitude would be eternal (well, quite overwhelming at least :-)

ufku’s picture

see editor.template function in bueditor.js. you should consider hacking it.
inside the loop that prints buttons you may check the index and insert a separater html accordingly.

....
editor.tplHTML += '<input '+ inner +' onclick="editor.buttonClick(%n, '+ i +'); return false;" id="editor-%n-button-'+ i +'" title="'+ b[0] +'" accesskey="'+ b[3] +'" />';//this line exists alredy.

//example hacks
editor.tplHTML += i == 3 ? '<span class="separater"></span>' : ''; //this line adds html after the 4th button
editor.tplHTML += b[0] == 'Bold' ? '<span class="separater"></span>' : ''; //this line adds html after the button whose title is Bold

and also you should see the line
if (i && i%editor.bpr==0) editor.tplHTML += '
';
where editor.bpr is the number of buttons after which a new line is inserted. it is set to 20 by default.

if you cant manage any of these you must wait for BUEditor 6.x which implements separators and line breaks.

modul’s picture

Thanks Ufku! But I wonder if this is a generally applicable hack. The "problem" (but also one of the strengths!!) of BUEditor is that you can have "instances" according to user role.
- For instance, my role of "Manager" may have a BUEditor instance "Bueditor-manager", with the buttons "1 - 2 - 3 - 4", and I could insert a break after button 3, for instance, following your indications.
- But my user role "Assistant" may have a BUEditor instance "Bueditor-assistant", with the buttons "1 - 2 - 3 - 4 - 5 - 6 - 7 - 8", in which case it might make sense to split after button 4.

So, the split should be applicable on an "instance" basis, not in the hard-coded way you suggest. Or didn't I understand your hack correctly? Maybe by applying the second example, i.e. splitting after a named button, I might get somewhere. I'll see if I can fix it that way. Maybe if I can add unique buttons for every role, and insert a split after that? I'll take a look if that is feasible.

Once again: thanks for your suggestion, and I am looking forward to the next release. Any idea when that would be released?

ufku’s picture

cvs head is 6.x compatible.
it introduces theme buttons which bring unlimited theming options.
you can find the details in readme.txt(button types->theme buttons)

modul’s picture

Umm... "CVS head is 6.x compatible": does that mean there is a new version available somewhere? In the regular "Modules" section, I find bueditor-5.x-1.1.tar.gz, with release date Jan. 6. Does this "CVS head" announcement mean that there is a newer version available somewhere? Or does it mean that this Jan. 6 version has been updated? Sorry for this stupid question, but I am not very familiar with this versioning thing. So, simply put, if I download and install bueditor-5.x-1.1.tar.gz again, will my line-split problem be fixable?

ufku’s picture

Sorry, my bad. You dont have to know those versioning thing.
Currently there is no support for theme buttons in Drupal 5-bueditor.
This feature is implemented for Drupal 6-bueditor. However, there is a chance to backport it to 5. I suggest you open an issue(feature request-theme buttons for 5). if nobody provides a patch, i will look into it when i have time.

modul’s picture

OK Ufku, I wrote a new issue to "theme the buttons". I do hope you (or somebody else) could take care of this.

ufku’s picture

Status: Active » Closed (fixed)