karthick2014 / jwysiwyg

Automatically exported from code.google.com/p/jwysiwyg
0 stars 0 forks source link

how can i get the data of the editor and set the data of the editor to null or empty #40

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago

I use jquery and javascript to program a web application.And I want to use
the jquery or other javascript to get the data of the editor,but when I use
$("#text").val(),the "text" is the texterea's id value,I can get the data
but it will throw exception when run under the IE7 and I  can't use the
code $("#text").("") to set the data empty .I use windows XP OS and the
jwysiwyg version is 4.0 and the jquery version is 1.2.6 the file is jquery.js 

Original issue reported on code.google.com by liuqingl...@gmail.com on 5 Aug 2008 at 6:04

GoogleCodeExporter commented 8 years ago
Hi! For clear the editor:

$('#wysiwyg').wysiwyg('clear');

Can you reproduce the error ? What the exception says ?

Using $('#wysiwyg').val() for get the editor content, should work.

Regards,

Original comment by joksnet on 26 Sep 2008 at 1:08

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I am having the same issue.

<textarea id="wysiwyg" rows="11" cols="60" value="<?php echo $content; 
?>"></textarea>

Nothing appears in the jWYSIWYG editor though. Not even hardcoded values.

Original comment by tlo...@gmail.com on 4 Dec 2008 at 11:57

GoogleCodeExporter commented 8 years ago
I don't think theirs a value attribute for the textarea tag. try to put the 
content 
between the tags

<textarea id="wysiwyg" rows="11" cols="60"><?php echo $content; ?></textarea>

Original comment by revaxa...@gmail.com on 5 Dec 2008 at 8:12

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
To clear the content in the editor use 

   $('#wysiwyg').wysiwyg('clear');

If you want to set the content of the editor on the fly you can use 

   $('#wysiwyg').wysiwyg('setContent' response.message);

Original comment by mohanj...@gmail.com on 9 Feb 2009 at 12:35

GoogleCodeExporter commented 8 years ago
Correct answers given.

Original comment by akzhan.a...@gmail.com on 8 Dec 2009 at 6:05