Hi i'm looking at a way to add my custom formats (relative to my stylesheets).
The best i can do for now is to move the defined format in
the config file instead in the fcktoolbaritems.js as this:
in fckconfig.js
FCKConfig.FontFormatNames = 'Normal (P);Normal (DIV);Heading
1;Heading 2','test';
FCKConfig.FontFormatValues= '<P>;<DIV>;<H1>;<H2>','yourvalue';
in fcktoolbaritems.js
FCKToolbarItems['FontFormat'] = new FCKToolbarCombo(
'FontFormat', FCKLang['FontFormat'],
FCKConfig.FontFormatValues, FCKConfig.FontFormatNames );
so you can add what you want in your values it will add you
a xml tag when you will select this value in the fontformat
combo like:
<yourvalue>selected text</yourvalue>
This still not really good at all cause you can't specify
id, class or things like that because you will find them in
the closing tag too.
I still can't find which part of code will be run when calling
"FCK.ExecuteNamedCommand( 'FormatBlock', formatName ) ;"
i can eventually edit the
FCKFormatBlockCommand.prototype.Execute function to sweet my
needs but if I could edit the final function which add the
tag it would be better (IMHO). So if someone can point me
out to this one i would be fine.
Thanks at all keep up the good work
best regards malko
The best i can do for now is to move the defined format in
the config file instead in the fcktoolbaritems.js as this:
in fckconfig.js
FCKConfig.FontFormatNames = 'Normal (P);Normal (DIV);Heading
1;Heading 2','test';
FCKConfig.FontFormatValues= '<P>;<DIV>;<H1>;<H2>','yourvalue';
in fcktoolbaritems.js
FCKToolbarItems['FontFormat'] = new FCKToolbarCombo(
'FontFormat', FCKLang['FontFormat'],
FCKConfig.FontFormatValues, FCKConfig.FontFormatNames );
so you can add what you want in your values it will add you
a xml tag when you will select this value in the fontformat
combo like:
<yourvalue>selected text</yourvalue>
This still not really good at all cause you can't specify
id, class or things like that because you will find them in
the closing tag too.
I still can't find which part of code will be run when calling
"FCK.ExecuteNamedCommand( 'FormatBlock', formatName ) ;"
i can eventually edit the
FCKFormatBlockCommand.prototype.Execute function to sweet my
needs but if I could edit the final function which add the
tag it would be better (IMHO). So if someone can point me
out to this one i would be fine.
Thanks at all keep up the good work
best regards malko
RE: Custom FontFormat
<% 'in ASP
Dim oFCKeditor
Set oFCKeditor = New FCKeditor
oFCKeditor.Config("FontFormats") = "<P>;<DIV>;<H1>;<H2>;<yourStyle>;etc..."
oFCKeditor.Create "editor"
%>
Still you have to include the CSS in order to make the editor fine the correct format. Else you will get a "Undefined" format in your list.
Hope it gave somebody the answer at least...