I can't get TinyMCE to work with Firefox and Atlas.
Any changes made to the TextArea that tinyMCE is attached to are lost on postback. However, IE is fine, and removing the <atlas:ScriptManager> tag fixes it in Firefox too.
The following simple page fails:
<%@dotnet.itags.org. Page Language="C#" AutoEventWireup="true" ValidateRequest="false" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<script language="javascript" type="text/javascript" src="tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">tinyMCE.init({mode : "textareas"});</script>
</head>
<body>
<form id="form1" runat="server">
<atlas:ScriptManager ID="ScriptManager1" runat="server" />
<asp:TextBox id="tb" runat="server" Rows="10" TextMode="multiLine" Text="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."></asp:TextBox>
<br />
<asp:Button ID="saveBtn" runat="server" Text="Postback" />
</form>
</body>
</html>
Has anyone successfully used tinyMCE and Firefox with Atlas enabled? Having said that, this 'Write a New Post' form looks very much like TinyMCE, and I'm using Firefox!?!
Any ideas?
Are people using other rich text editors successfully with Atlas?
Freetextbox?
FckEditor?
I've run into the same problem. Have you been able to figure this out? If so, what was your solution?
Thanks,
kevin
I had the same problem and solved it as follows:
- remove the ValidateRequest=false directive to avoid possible security issues
- add encoding : "xml"to the tinyMCE.Init code. This translates the HTML-code to XML and by doing this the secuity message won't appear.
- when filling the tinyMCE control with text, use TinyMCE.Text = Server.HtmlDecode(value); to translate it back into HTML
This worked out fine for me. I use the TinyMCE in a user control. The HTLM-translation is implemented in the Text property of the control.
Hopefully this helps.
No comments:
Post a Comment