karthick2014 / jwysiwyg

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

load jwysiwyg whit ajax #54

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. load a web with ajax that have a jwysywyg editor

What is the expected output? What do you see instead?

-in IE(6) work, but in ff can't use the textarea. it seems as if he was
disabled.

What version of the product are you using? On what operating system?

-the lastest version, i download of this page. Windows professional

Please provide any additional information below.

-load the web using the '$().load' of jquery's code framework

Original issue reported on code.google.com by dei...@gmail.com on 30 Oct 2008 at 9:08

GoogleCodeExporter commented 8 years ago
Is the text area disabled or do you have a text are without an editor??

Original comment by N.Hen...@gmail.com on 7 Nov 2008 at 11:19

GoogleCodeExporter commented 8 years ago
text area is disabled.

Original comment by dei...@gmail.com on 10 Nov 2008 at 1:52

GoogleCodeExporter commented 8 years ago
Whenever I have a page that dynamically loads text areas that I want to be 
wysiwyg, I
call the $(foo).wysiwyg() directly after the AJAX method has returned. This 
re-inits
all items that have not already been converted to the wysiwyg editor.

Original comment by switch...@gmail.com on 10 Nov 2008 at 6:12

GoogleCodeExporter commented 8 years ago
Thanks switch120

$("div").load("web_editor.php",function(){
    $('#editor').wysiwyg();
});

this code solve the problem

****the web_editor.php havn't "$('#editor').wysiwyg();"

and sorry for my bad english

Original comment by dei...@gmail.com on 13 Nov 2008 at 4:44

GoogleCodeExporter commented 8 years ago
i have a new problem:

I have my wysisyg(loaded whit ajax ) with custom buttons to add images 
(emoticons),
but if the textarea is not focused, the images are inserted into the general 
body or
the wysisyg iframe or in the parent and not in the textarea.

this in ie 6 in ff work fine.

Original comment by dei...@gmail.com on 13 Nov 2008 at 9:29

GoogleCodeExporter commented 8 years ago
We stopped supporting IE6 months ago on our large projects. Too much "good code
hacked bad" to work with IE6. The number of people using it every day is 
decreasing,
so these days as long as the site displays (albeit not perfectly) we don't hack 
to
fix for IE6.

On that note, it sounds like you may want to quantify your JQuery selector; 
Odds are
the code is set to operate on the next "child" or "sibling" when inserting the 
BBCode
- IE6 has a rather unique set of DOM traversal bugs. Try doing something like 
this
for your BBCode insert:

$(".textAreaToInsertCodeTo", parentOfTextArea).insertBBCode(":)");

That will look for that element inside the parent only. Optionally you could 
also set
your text area to have an ID, and then use $("#ID_of_textarea").

Those are just 2 completely blind suggestions based on what you're describing. 
Hope
it helps.

Original comment by switch...@gmail.com on 19 Nov 2008 at 12:29

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
How can I dynamically change the content of the editor using javascript 
function?

I have a list of articles. When a user clicks a title of an article, the 
content of 
the article should populate the wysiwyg editor located on the bottom of the 
page.
I try to use "setContent" function that was defined in wysiwyg.prototype but 
couldn't make it work. Any help?

Original comment by badug...@gmail.com on 10 Jan 2009 at 8:02

GoogleCodeExporter commented 8 years ago
I would recommend using an AJAX call to get the new control and content... i.e.,
clicking the title calls an AJAX function which returns content (an input type 
of
text) filled with the content - this gets dumped into a Div (or other 
container) by
means of:

$('#myContainer').html(ajaxOutput);

Once that's been done, you can call $('#editor').wysiwyg() again to re-init the 
control.

That's how I would approach it if the setcontent() wasn't working.

HTH!

Original comment by switch...@gmail.com on 20 Feb 2009 at 3:03

GoogleCodeExporter commented 8 years ago

Original comment by akzhan.a...@gmail.com on 18 Dec 2009 at 2:18