[Dojo-interest] editor get valuee (dummy question)
Rose, Ryan
RRose at nerac.com
Tue Feb 6 11:06:00 MST 2007
Use getEditorContent() for Editor2, getHtml() for RichText widget. So
your example would be:
dojo.debug(dojo.widget.byId("descriptionproduct"). getEditorContent());
Also note that getEditorContent() is deprecated in the latest SVN, so if
you are working from that you should use getValue() instead.
Regards,
Ryan Rose
http://www.digiwize.com
-----Original Message-----
From: dojo-interest-bounces at dojotoolkit.org
[mailto:dojo-interest-bounces at dojotoolkit.org] On Behalf Of Thibaut
Sent: Tuesday, February 06, 2007 12:19 PM
To: dojo-interest at dojotoolkit.org
Subject: Re: [Dojo-interest] editor get valuee (dummy question)
I still don't achieve to do this very basic task. Where am I wrong ?
Thanks.
Here is a basic example
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script>
var djConfig = {
isDebug: true,
baseRelativePath: "../js/dojo-0.4.1-ajax/",
debugContainerId: "dojoDebug"
};
</script>
<script language="JavaScript" type="text/javascript" src="../js/
dojo-0.4.1-ajax/dojo.js"></script>
<script language="JavaScript" type="text/javascript">
dojo.require("dojo.widget.Editor2");
function submitTheForm() {
dojo.debug("form submit");
dojo.debug(dojo.widget.byId("descriptionproduct").getHtml());
dojo.debug("normal end");
}
</script>
</head>
<body>
<div dojoType="Editor2" id="descriptionproduct" >
this is a test
</div>
<div onClick="submitTheForm()">submit</div>
</body>
</html>
_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
Dojo-interest at dojotoolkit.org
http://dojotoolkit.org/mailman/listinfo/dojo-interest
More information about the Dojo-interest
mailing list