Solution about HTML editor, for who has problem to show its body

Solution about HTML editor, for who has problem to show its body

Shirin Shirvani -
Vastausten määrä: 6
For running HTML Editor , these fuctions must be called ::

print_textarea(1,8, 50, "", "", "intro", "", $courseid=0);
use_html_editor("intro");

into= the name of field;

If you want to call these fuction use_html_editor("intro");  in the *.php file ,you must  call without any prarameter. like this : use_html_editor();
because when *.php file wants to render HTML page the editor had problem and can not show its body.

Pay attention that you can have as many as HTML Editors you want to have and in this file (*.php), and  the number of  print_textarea(1,8, 50, "", "", "intro", "", $courseid=0);   fuction explan the number of your HTML Editor in your page, but just for one time in the end of that section you must call this fuction (use_html_editor()); .

And  if you want to call it in *.html, you must call it with parameter. like: use_html_editor("intro"); 


I solved my problem from this way. And I hope for you................

Shirin Shirvani
Arviointien keskiarvo: -
Vastaus Shirin Shirvani

Re: Solution about HTML editor, for who has problem to show its body

Martin Dougiamas -
Kuva: Core developers Kuva: Documentation writers Kuva: Moodle HQ Kuva: Particularly helpful Moodlers Kuva: Plugin developers Kuva: Testers
Thanks, Shirin!

I think you've hit upon the solution to this hard-to-spot bug.  hyväksyvä

I'll get this fix implemented today in all branches of Moodle CVS.
Vastaus Martin Dougiamas

Re: Solution about HTML editor, for who has problem to show its body

Martin Dougiamas -
Kuva: Core developers Kuva: Documentation writers Kuva: Moodle HQ Kuva: Particularly helpful Moodlers Kuva: Plugin developers Kuva: Testers
Actually, I'm now able to make this bug happen with IE6 (I wasn't able to before) but this idea does NOT fix the problem, unfortunately. surullinen

I'm working on it so we can have a 1.3.1.
Vastaus Martin Dougiamas

Re: Solution about HTML editor, for who has problem to show its body

Janne Mikkonen -

If you're able to make the bug happen (I can't) then could you try give default height and width values in HTMLArea.prototype.generate object?

Somewhere in here:
// size the IFRAME according to user's prefs or initial textarea
    var height = (this.config.height == "auto" ? (this._ta_size.h + "px") : this.config.height);
    height = parseInt(height)
    var width = (this.config.width == "auto" ? (this._ta_size.w + "px") : this.config.width);
    width = parseInt(width);

And see what happens?

Vastaus Martin Dougiamas

Re: Solution about HTML editor, for who has problem to show its body

Shirin Shirvani -
Hi, Martin

I solved my problem with this way. and the browser which I test it is IE6mixed

shirin
Vastaus Shirin Shirvani

Re: Solution about HTML editor, for who has problem to show its body

Martin Dougiamas -
Kuva: Core developers Kuva: Documentation writers Kuva: Moodle HQ Kuva: Particularly helpful Moodlers Kuva: Plugin developers Kuva: Testers
I actually implemented it but without success ... the good news is that I found something else that caused it (a particular order of HTML tags). 

Can you also please try Moodle 1.3.1? It should have a permanent fix for this problem now.
Vastaus Shirin Shirvani

Re: Solution about HTML editor, for who has problem to show its body

vijesh g -
Thank you very much for the help.I was struggling to create an editor in my php code using moodle code.I found your comment very useful.Keep in touch

Regards

Vijesh