New Buttons H5 und H6

Questions about how to use the online - editors and suggestions how to improve them
Post Reply
Simmyne
Posts: 327
Joined: Tue Oct 14, 2008 7:57 pm

New Buttons H5 und H6

Post by Simmyne » Tue Jul 14, 2009 5:28 pm

Hi everywhere,

for my friend who can't work well with html-code I want to produce two new buttons for the htmlarea editor. Then he should be able to set subheadlines in the text easilier.

I looked for hints how I can include new editor buttons. I found this:
http://www.klapheck.net/Hilfe/?Gesamter_Inhalt

I didn't come to terms with it till the end. What I did:

1. Produced the icons in photoshop and saved in folder htmlarea > images as gif
2. I inserted in file de.php in folder languages (folder cmsimple) these two lines:

Code: Select all

["h5","Überschrift 5","Formatiere den markierten Absatz oder die markierten Absätze als Überschrift 5"],
["h6","Überschrift 6","Formatiere den markierten Absatz oder die markierten Absätze als Überschrift 6"],
I didn't understand what exactly to do in cms.php. I looked through several files where it seems to be logically to insert. Here I found:

3. I inserted in htmlarea.php (folder cmsimple) this after the h4-line:

Code: Select all

config.registerButton("h5","H5",icondir+"ed_h5.gif",false,function(e){e.execCommand("formatblock",false,"<h5>")});
config.registerButton("h6","H6",icondir+"ed_h6.gif",false,function(e){e.execCommand("formatblock",false,"<h6>")});
I wondered in several files of htmlarea folder the h5/h6-codes were already there.
My changes were not successful. Something seems to miss.

Can you help me?

A lot of evening greetings
simmyne

mvwd
Posts: 299
Joined: Tue Jun 17, 2008 10:35 pm
Location: Baden Württemberg / Germany
Contact:

Re: New Buttons H5 und H6

Post by mvwd » Wed Jul 22, 2009 2:31 pm

Simmyne wrote:I inserted in htmlarea.php (folder cmsimple) this after the h4-line: ....
...that's absolutely right. That was for preparing the icon's. I think you just need to add the h5/h6-Icons into the toolbar. The toolbar looks like this (in htmlarea.php in folder cmsimple):

Code: Select all

["h1","h2","h3","h4","p","separator","bold", "italic", "underline","strikethrough","separator","subscript", "superscript","separator","inserthorizontalrule","separator","inserttable"]
...just add your h5/h6 like this:

Code: Select all

["h1","h2","h3","h4","h5","h6","p","separator","bold", "italic", "underline","strikethrough","separator","subscript", "superscript","separator","inserthorizontalrule","separator","inserttable"]
mvwd.

Post Reply