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

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

by Shirin Shirvani -
Number of replies: 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
Average of ratings: -
In reply to Shirin Shirvani

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

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Thanks, Shirin!

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

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

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

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of 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. sad

I'm working on it so we can have a 1.3.1.
In reply to Martin Dougiamas

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

by 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?

In reply to Martin Dougiamas

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

by Shirin Shirvani -
Hi, Martin

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

shirin
In reply to Shirin Shirvani

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

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of 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.
In reply to Shirin Shirvani

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

by 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