Proper CSS text-aling

Last post 03-26-2011, 8:48 PM by Kenneth. 1 replies.
Sort Posts: Previous Next
  •  03-26-2011, 9:16 AM 66863

    Proper CSS text-aling

    Is there any way for me to make the editor spit out <div style="text-align: value;"> rather than what it currently spits out <div align="value"> when center/left/right/justified are pressed?

    Cheers
  •  03-26-2011, 8:48 PM 66864 in reply to 66863

    Re: Proper CSS text-aling

    Hi gim-matt,
     
    Please add the code below in to your page and try again.
     
    1. <script>  
    2. function CuteEditor_OnCommand(editor,command,ui,value)  
    3. {  
    4.     if(command=="JustifyCenter")  
    5.     {  
    6.          editor.ExecCommand("CssStyle",false,"text-align: center;");  
    7.          return true;  
    8.     }  
    9.      if(command=="JustifyLeft")  
    10.     {  
    11.          editor.ExecCommand("CssStyle",false,"text-align: left;");  
    12.          return true;  
    13.     }  
    14.       if(command=="JustifyRight")  
    15.     {  
    16.          editor.ExecCommand("CssStyle",false,"text-align: right;");  
    17.          return true;  
    18.     }  
    19.  }  
    20. </script> 
    Regards,
     
    ken
View as RSS news feed in XML