Hi...
Sorry mi english i really speak spanish,...
heres the thing: i put the select combo box to get predefined styles in FCKeditor v2.02 and work for me; but now i want take a CSS file, read his styles and show them at this select combo box..
In the fck_startup file at LoadStyles() function i add this line:
FCKScriptLoader.AddScript( "/my_styleSheet.css" );
but when i modify the source of FCK_editor and put one of my styles he dont show the font color in the textarea of FCK_editor (thats my style) i can't see the style.... why?.. maybe isn't loadind my stylesheet ??.. or i have to apply directly to the textarea??..
When i finish to integrate all this, i put it in this forum...
Sorry mi english i really speak spanish,...
heres the thing: i put the select combo box to get predefined styles in FCKeditor v2.02 and work for me; but now i want take a CSS file, read his styles and show them at this select combo box..
In the fck_startup file at LoadStyles() function i add this line:
FCKScriptLoader.AddScript( "/my_styleSheet.css" );
but when i modify the source of FCK_editor and put one of my styles he dont show the font color in the textarea of FCK_editor (thats my style) i can't see the style.... why?.. maybe isn't loadind my stylesheet ??.. or i have to apply directly to the textarea??..
When i finish to integrate all this, i put it in this forum...

RE: CSS-stylesheet working, but how textarea ta..
// Font Styles
FCKConfig.FontStyleNames = ';Main Header;Blue Title;Centered Title' ;
FCKConfig.FontStyleValues = ';MainHeader;BlueTitle;CenteredTitle' ;
En el archivo js/fckeditorcode_ie_2.js es la implementacion del comando para internet explorer:
1. Agregue este codigo cerca de las funciones de comando de "var FCKFontNameCommand=function() ...,etc", asi
// ### FontStyle
var FCKFontStyleCommand = function()
{
this.Name = 'FontStyle' ;
}
FCKFontStyleCommand.prototype.Execute = function( fontStyle )
{
var oTextRange=FCK.EditorDocument.selection.createRange();
var oFont = document.createElement("FONT") ;
oFont.innerHTML = oTextRange.htmlText ;
var oParent = oTextRange.parentElement() ;
var oFirstChild = oFont.firstChild;
if (oFirstChild.nodeType == 1 && oFirstChild.outerHTML == oFont.innerHTML &&
(oFirstChild.tagName == "SPAN"
|| oFirstChild.tagName == "FONT"
|| oFirstChild.tagName == "P"
|| oFirstChild.tagName == "DIV"))
{
oParent.className = fontStyle ;
}
else
{
oFont.className = fontStyle ;
oTextRange.pasteHTML( oFont.outerHTML ) ;
}
}// FCKFontStyleCommand.prototype.Execute
FCKFontStyleCommand.prototype.GetState = function()
{
return FCK.GetNamedCommandValue('FontStyle');
}
2. Agregue la definicion del comando cerca de "FCKCommands['FontName'] = new FCKFontNameCommand();", asi
FCKCommands['FontStyle'] = new FCKFontStyleCommand();
En el archivo js/fckeditorcode_gecko_2.js es la implementacion del comando para gecko:
1. Agregue este codigo cerca de las funciones de comando de "var FCKFontNameCommand=function(){ ...,etc", asi
// ### FontStyle
var FCKFontStyleCommand=function(){
this.Name='FontStyle';
};
FCKFontStyleCommand.prototype.Execute=function(fontStyle){
if (fontStyle==null || fontStyle==""){
}else{
var oSelection=FCK.EditorWindow.getSelection();
var oTextRange = oSelection.getRangeAt(0);
var oFont = document.createElement("FONT") ;
oFont.innerHTML = oTextRange ;
oFont.setAttribute("class", fontStyle);
oTextRange.deleteContents();
oTextRange.insertNode( oFont );
}
};
FCKFontStyleCommand.prototype.GetState=function(){
return FCK.GetNamedCommandValue('FontStyle');
};
2. Agregue la definicion del comando cerca de "FCKCommands['FontName'] = new FCKFontNameCommand();", asi
FCKCommands['FontStyle'] = new FCKFontStyleCommand();
.......... Creo que no se me ha olvidado nada..... ojala les sirva como a mi
Bye
RE: CSS-stylesheet working, but how textarea ta..