plandem / lwrte

Export from Google Code. Lightweight Rich Text Editor (RTE / WYSIWYG) for jQuery
https://code.google.com/p/lwrte/
0 stars 0 forks source link

Content not appearing in designMode #8

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I have to switch to textarea and then back to iframe to be able to read and
the content inside the iframe. Otherwise, I cannot even write anything, as
it happens the same even when the content is <br />.

I am able to view the content when the RTE is loading, but it is quickly
'erased' (not entirely erased, the content appears after the switch)

Using Firefox 3.0.5 under Linux.

Is there any way I can solve this or force the switch?

Thanks

Original issue reported on code.google.com by mac...@gmail.com on 3 Feb 2009 at 1:11

GoogleCodeExporter commented 9 years ago
Well, the only problem that is come into my head it's "bug" at 'editor_cmd' 
function.
Just remove 'console.log' from try/catch in that function. It's my fault, it's
firebug feature and i didn't remove it. Will fix in next patch/release. Try to
remove, probanly it will help.

Original comment by plandem on 6 Feb 2009 at 3:55

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I have the same problem. I deleted the try and catch but i stil have the 
problem. I
load the page with a ajax script(Ajaxify jQuery plugin).
Is there a other way. Maybe if there is a script that switched fast between 
textarea
mode en design mode.

Original comment by 6iinter...@gmail.com on 8 Feb 2009 at 10:28

GoogleCodeExporter commented 9 years ago
Same problem here.  I have content on a page that is being rendered via Ajax, 
part of
which contains the lwrte.  In Firefox (3.0.6 on Mac OS X) text inside lwrte 
appears
then disappears quickly, and no editing is possible.  The top panel of buttons 
seems
to be fully enabled though.  I have tried both 0.3 and 0.5, same problem.

Original comment by kevin%ke...@gtempaccount.com on 20 Feb 2009 at 11:33

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
will try to reproduce bug.

Original comment by plandem on 5 Mar 2009 at 8:52

GoogleCodeExporter commented 9 years ago
Just as an update to this, my issue was resolved by initializing the RTE 
externally
*after* the AJAX content containing the RTE was rendered.  In other words, 
Firefox
wasn't happy when the RTE initialization logic was within the dynamic AJAX 
content,
so the calling page had to do the AJAX calls first and then subsequently set 
the RTE up.

That may actually be a logical approach, but, no other browsers behaved this 
way and
as such it was a really tough issue to track down and resolve.

Original comment by kevin%ke...@gtempaccount.com on 5 Mar 2009 at 9:15

GoogleCodeExporter commented 9 years ago
can you give a example files?

Original comment by plandem on 9 Mar 2009 at 2:57

GoogleCodeExporter commented 9 years ago
Basically the only fix I have found for this is to create the RTE control after 
its
containing element has already been rendered (ie made visible). 

This is my containing element, which is rendered as a dialog.
<div id="text-dialog" title="Text">
    <div id="textEditorFrm">     
    </div>
</div>

Every time a button is clicked to show the dialog above which would contain the 
rte,
i do this:

$('#text-dialog').dialog("open");
$('#textEditorFrm').html('<textarea id="textEditor"></textarea>');
$('#textEditor').rte({
                    css: ['default.css'],
                    width:485,
                    height:200,
                    controls_rte: rte_toolbar,
                    controls_html: html_toolbar
});

Original comment by ekemo...@gmail.com on 13 Jul 2009 at 1:53