Topbar
Topbar
Sign in
|
Join
|
Client Center
Home
Products
Client Center
Contact
Purchase
Support forums
»
Products
»
Cute Editor for .NET
»
Re: Cute soft editor - English and Hebrow
Re: Cute soft editor - English and Hebrow
11-04-2009, 3:39 AM
Kenneth
Joined on 02-13-2008
Posts 3,886
Re: Cute soft editor - English and Hebrow
Reply
Quote
Hi Kuimov,
Two ways
1.
<%@ Page Language=
"C#"
AutoEventWireup=
"True"
%>
<%@ Register Namespace=
"CuteEditor"
Assembly=
"CuteEditor"
TagPrefix=
"CE"
%>
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
>
<html xmlns=
"http://www.w3.org/1999/xhtml"
>
<head id=
"Head1"
runat=
"server"
>
</head>
<script runat=
"server"
>
protected
override
void
OnLoad(EventArgs e)
{
if
(!IsPostBack)
{
editor1.Text =
"<style>body{direction:rtl;text-align:right}</style>"
;
}
base
.OnLoad(e);
}
</script>
<body>
<form id=
"Form1"
runat=
"server"
>
<CE:Editor ID=
"editor1"
runat=
"server"
EditCompleteDocument=
"true"
EnableStripStyleTagsCodeInjection=
"false"
>
</CE:Editor>
</form>
</body>
</html>
2.
<%@ Page Language=
"C#"
AutoEventWireup=
"True"
%>
<%@ Register Namespace=
"CuteEditor"
Assembly=
"CuteEditor"
TagPrefix=
"CE"
%>
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
>
<html xmlns=
"http://www.w3.org/1999/xhtml"
>
<head id=
"Head1"
runat=
"server"
>
</head>
<body>
<form id=
"Form1"
runat=
"server"
>
<CE:Editor ID=
"editor1"
runat=
"server"
EditCompleteDocument=
"true"
EnableStripStyleTagsCodeInjection=
"false"
>
</CE:Editor>
</form>
</body>
</html>
<script>
function CuteEditor_FilterHTML(editor,code)
{
return
code.replace(/(<body[^\>]*\>)/i,
'<body style="direction:rtl;text-align:right">'
);
}
function CuteEditor_FilterCode(editor,code)
{
return
code.replace(/(<body[^\>]*\>)/i,
'<body style="direction:rtl;text-align:right">'
);
}
function CuteEditor_OnInitialized(editor)
{
editor.ExecCommand(
"TabCode"
);
editor.ExecCommand(
"TabEdit"
);
}
</script>
Regards,
Ken
View Complete Thread