Topbar
Topbar
Sign in
|
Join
|
Client Center
Home
Products
Client Center
Contact
Purchase
Support forums
»
Products
»
Cute Editor for .NET
»
Re: Proper CSS text-aling
Proper CSS text-aling
Last post 03-26-2011, 8:48 PM by
Kenneth
. 1 replies.
Sort Posts:
Oldest to newest
Newest to oldest
Previous
Next
03-26-2011, 9:16 AM
66863
gim-matt
Joined on 02-18-2010
Posts 32
Proper CSS text-aling
Reply
Quote
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
Kenneth
Joined on 02-13-2008
Posts 3,886
Re: Proper CSS text-aling
Reply
Quote
Hi gim-matt,
Please add the code below in to your page and try again.
<script>
function
CuteEditor_OnCommand(editor,command,ui,value)
{
if
(command==
"JustifyCenter"
)
{
editor.ExecCommand(
"CssStyle"
,
false
,
"text-align: center;"
);
return
true
;
}
if
(command==
"JustifyLeft"
)
{
editor.ExecCommand(
"CssStyle"
,
false
,
"text-align: left;"
);
return
true
;
}
if
(command==
"JustifyRight"
)
{
editor.ExecCommand(
"CssStyle"
,
false
,
"text-align: right;"
);
return
true
;
}
}
</script>
Regards,
ken