Html Editor do not work

Html Editor do not work

by Helmut Hammerl -
Number of replies: 32
Can anyone help me?
In both wiki modules html-editor do not edit the pages , iconmenu and statusline is displayed

sorry for my English im an Austrian
thanks
Average of ratings: -
In reply to Helmut Hammerl

Vast: Html Editor do not work

by Jani Lemmetyinen -
I met same problem in dfWiki yesterday. I was when using IE 6.0. Editor buttons were shown, but the text area was not shown(look the picture). Opening full-screen editor can fix the problem: you can edit text normally, close full screen and save file > everything is OK. But when using normal, small editor you cannot edit text. Deleting files in IE cache didn't help.

Normally I use Firefox and there everything is working fine.

- Jani -
Attachment dfwiki_editor_problem.gif
In reply to Jani Lemmetyinen

Re: Vast: Html Editor do not work

by Janne Mikkonen -
This is a sticky bug that haunts when using IE. Usually editable area appear when you refresh the page.
In reply to Janne Mikkonen

Vast: Re: Vast: Html Editor do not work

by Jani Lemmetyinen -
Thanks Janne! Refreshing the page helps. I continue testing and this problem seems to appear every time I edit a new dfwiki or new wikipage. Refreshing helps, but if I made [a new page] I got the very same problem again. So I must refresh and refresh again and again smile

- Jani -
In reply to Jani Lemmetyinen

Re: Vast: Re: Vast: Html Editor do not work

by Janne Mikkonen -
Ok, I'm going to ask you to do a little bit coding wink

Somewhere around line 756 ( in /lib/htmlarea.php ) editors editarea height is defined like this:
var height = (this.config.height == "auto" ? (this._ta_size.h) : this.config.height);

Change this line to:

var height = (this.config.height == "auto" ? ((this._ta_size.h != null) ? this._ta_size.h : 30) : this.config.height);

or

var height = (this.config.height == "auto" ? 30 : this.config.height);

If this clears the problem we'll know where it is and how to fix it.

- Janne -
In reply to Janne Mikkonen

Re: Vast: Re: Vast: Html Editor do not work

by Daniel Hoffmann -
Hi,
on my site it ist /lib/editor/htmlarea.php ?
The first solution seems to work after having reload once with CTRL+F5. On my colleagues machine it works too. She never had used this wiki before.
Best wishes
Daniel
In reply to Daniel Hoffmann

Vast: Re: Vast: Re: Vast: Html Editor do not work

by Jani Lemmetyinen -
"on my site it ist /lib/editor/htmlarea.php ?"

-> that's correct path. Did you test this fix with IE? Which version?

- Jani -
In reply to Jani Lemmetyinen

Re: Vast: Re: Vast: Re: Vast: Html Editor do not work

by Daniel Hoffmann -
Hi Jani,
we tested now on three more machines and first solution seems to work.
4 x Win XP, SP 2, IE 6
1 x Win 2000, IE 6
1 x Win XP, SP 2, Firefox 1.5
Best wishes
Daniel
In reply to Daniel Hoffmann

Vast: Re: Vast: Re: Vast: Re: Vast: Html Editor do not work

by Jani Lemmetyinen -
Hi Daniel,

I have also make more testing with Janne's first solution. It seems to be that I must refresh every time I start editing dfwiki. This problems occurs in IE 6.0 (Win XP SP2). But using Firefox 1.0.7 is okay - no problems!

- Jani -
In reply to Jani Lemmetyinen

Re: Vast: Re: Vast: Re: Vast: Re: Vast: Html Editor do not work

by Daniel Hoffmann -
Hi Jani,
closed everything, started again and had no problems. I'll try it this evening on more machines and browsers at home. I also tried it with Avant-Browser (Internet-Explorer extension, www.avantbrowser.com) and had no problems.
I had a similar problem with the old standard wiki (described here some days ago: http://moodle.org/mod/forum/discuss.php?d=41404) and couldn't explain it. But refreshing each time is no solution smile, can't explain this to my students.
Daniel
In reply to Daniel Hoffmann

Re: Vast: Re: Vast: Re: Vast: Re: Vast: Html Editor do not work

by Daniel Hoffmann -
what a pitty. changed the environment, clicked something around and ran into problems again (IE 6 on Win XP SP 2).
In reply to Jani Lemmetyinen

Re: Vast: Re: Vast: Re: Vast: Html Editor do not work

by Janne Mikkonen -
Yep! That's what I meant ( can't read nor write big grin ).
In reply to Janne Mikkonen

Vast: Re: Vast: Re: Vast: Html Editor do not work

by Jani Lemmetyinen -
Hi Janne,

actually I'm not our codemaster Hymy but we have just tested your code.

Your first line:

var height = (this.config.height == "auto" ? ((this._ta_size.h != null) ? this._ta_size.h : 30) : this.config.height);

-> No effect at all. The bug is same as I reported earlier. Refreshing helps.

and your second line:
var height = (this.config.height == "auto" ? 30 : this.config.height);

-> Effect: Edit area is missing in both FF and IE Sekaisin. In FF it gives a short "flash" of edit area, but then it disappers again. In IE it shows a small white strip of edit area, but it cannot edit.


- Jani -
In reply to Jani Lemmetyinen

Re: Vast: Re: Vast: Re: Vast: Html Editor do not work

by Janne Mikkonen -
Ok! The first is what we're going for. Put some sensible value there lets say 250 is big enough to see ( 30 stays behind toolbar ) like:

var height = (this.config.height == "auto" ? ((this._ta_size.h != null) ? this._ta_size.h : 250) : this.config.height);

Underneath this line you can add debugging lines:
alert(this._ta_size.h);
alert(height);

Which tells you the exact height value ( stored in this._ta_size.h and height variables ) . Remove these debugging lines when you're done.
And remember when you change these lines you should empty your browsers cache.

- Janne -
In reply to Janne Mikkonen

Vast: Re: Vast: Re: Vast: Re: Vast: Html Editor do not work

by Jani Lemmetyinen -
Hi Janne,

thanks for this code. We tested it yesterday and try with different values. Sometimes it shows a small edit field BUT usually the bug was still there, showing no edit field as I described earlier. Alerts were working OK.

We'll continue testing and I'll send here more exactly information at tomorrow or friday.

- Jani -
In reply to Jani Lemmetyinen

Vast: Re: Vast: Re: Vast: Re: Vast: Html Editor do not work

by Jani Lemmetyinen -
I just tested this at Wiki Arena.  Everything seems to be OK. So far, I have met this bug only once at Wiki Arena.
In reply to Jani Lemmetyinen

Re: Vast: Re: Vast: Re: Vast: Re: Vast: Html Editor do not work

by Monika Sawicka -

Hello Jani,

maybe it can help you. I got the same problem before. Checking if the value of this._ta_size.h is NULL didin´t help, but.... checking if this._ta_size.h is 0... I just put a very simple condition before and it works. I hope it´s also gonna work for you!

if(this._ta_size.h==0 || this._ta_size.h==NULL){
  this._ta_size.h=300;
 } 
 var height = (this.config.height == "auto" ? (this._ta_size.h) : this.config.height);

In reply to Monika Sawicka

Re: Vast: Re: Vast: Re: Vast: Re: Vast: Html Editor do not work

by Jos Winkel -
This also works for me! I am very happy now glimlach. Thanks!
In reply to Monika Sawicka

Re: Vast: Re: Vast: Re: Vast: Re: Vast: Html Editor do not work

by Monika Sawicka -

Hello,

if that doesn't work, you can also try to refresh the webpage. So instead of putting:

if(this._ta_size.h==0 || this._ta_size.h==NULL){
  this._ta_size.h=300;
 } 
 var height = (this.config.height == "auto" ? (this._ta_size.h) : this.config.height);

you can try:

var height = (this.config.height == "auto" ? (this._ta_size.h) : this.config.height);
    height = parseInt(height);
 if( height==0){
   window.location.reload();
 } 

Best regards

In reply to Monika Sawicka

Vast: Re: Vast: Re: Vast: Re: Vast: Re: Vast: Html Editor do not work

by Jani Lemmetyinen -
Hello,

and thank you! We try both of your codes. This later one seems to work better than previous one.

- Jani -
In reply to Jani Lemmetyinen

Re: Vast: Re: Vast: Re: Vast: Re: Vast: Re: Vast: Html Editor do not work

by Jonathan Smith -

Hi

I notice that I have 2 files in the lib/editor folder

htmlarea.php and htmlarea_bak.php

No idea why there are two but the second one contains the line

var height = (this.config.height == "auto" ? (this._ta_size.h + "px") : this.config.height);

Would this work better in IE?

Jonathan Smith

In reply to Jonathan Smith

Vast: Re: Vast: Re: Vast: Re: Vast: Re: Vast: Re: Vast: Html Editor do not work

by Jani Lemmetyinen -
Hi,

we just test this line
var height = (this.config.height == "auto" ? (this._ta_size.h + "px") : this.config.height) with IE.

Sometimes editor textfield was not shown as I have described earlier so it doesn't work very well. Try Monika's code (the second one), it helped us.

I guess html_bak.php is a backup file?

- Jani -
In reply to Monika Sawicka

Re: Vast: Re: Vast: Re: Vast: Re: Vast: Html Editor do not work

by Laura Malmi -
Hi,

we are now using that second piece of code and it has worked fine. However, when using wiki page preview IE sometimes gives the message shown below. Everything is fine after pressing retry but is there a way to fix this?

- Laura

In reply to Laura Malmi

Re: Vast: Re: Vast: Re: Vast: Re: Vast: Html Editor do not work

by Monika Sawicka -

Hi Laura,

instead of refreshing the web page, you can change the width and height in HTMLArea.Config = function () function (line 107). Some versions of IE don´t accept "auto".

--------------------------------------

before: (line: 107-117)  of htmlarea.php

HTMLArea.Config = function () {
this.version = "3.0";

this.width = "auto";
this.height = "auto";

// enable creation of a status bar?
this.statusBar = true;

// maximum size of the undo queue
this.undoSteps = 20;

.....

after

HTMLArea.Config = function () {
this.version = "3.0";

this.width = 620;
this.height = 250;

// enable creation of a status bar?
this.statusBar = true;

// maximum size of the undo queue
this.undoSteps = 20;

I hope ot will help.

Best regards

In reply to Jani Lemmetyinen

Re: Vast: Html Editor do not work

by Helmut Hammerl -
Thank you Jani
it is, as you have discribed.
but only by both of us?? have we a misconfiguration in the IE??
In reply to Helmut Hammerl

Re: Vast: Html Editor do not work

by Janne Mikkonen -
Nope! It's something that IE just doesn't like (when rendering editable area).
In reply to Janne Mikkonen

Re: Vast: Html Editor do not work

by Miroslav Fikar -
Some of our users have reported this after I upgraded Moodle to latest 1.5.3+ on Wednesday. I wonder if there was some new bug introduced by it.
In reply to Miroslav Fikar

Re: Vast: Html Editor do not work

by Geoff Rebbeck -
This problem has been around since the release of the upgrade and so far there is no explanation for it. It appears to be a problem with the html editor that strangely is not affected elsewhere where the editor is used. We are looking to migrate to the new dfwiki and abandon the old wiki but dfwiki does not yet have the 'student' option. We had many of these student wikis that have stopped because of the inability to edit them now. We have been unable to solve the problem in our College. Unless I have missed a postng with a fix?
In reply to Geoff Rebbeck

Re: Vast: Html Editor do not work

by Sarah Hansen -

Actually, my students and I are having the problem with Forums and the Glossary (I don't use the Wikis in my class). From what I've read on these help forums, it seems to be a global problem with the HTML Editor.

In reply to Sarah Hansen

Re: Vast: Html Editor do not work

by Miroslav Fikar -
Try to change the current theme - in our moodle the problem disappeared when changing to formal_white theme.

In reply to Miroslav Fikar

Re: Vast: Html Editor do not work

by Donnie Carpenter -
Changing the theme also works in my environment as well.  My problem exists when I use the cornflower theme and Internet Explorer.
In reply to Donnie Carpenter

Re: Vast: Html Editor do not work

by Jos Winkel -

In a testing environment with a very recent 1.5.3+ version as well as 1.6 beta3, both with the latest dfwiki (that is called wiki now, version 2006042001) and using the standard theme I still have this problem with IE6 and also with IE7 beta2. Firefox gives no problems but my students only can use IE6 at school.
I hope this nasty problem is solved very soon within Moodle. I don't think that Microsoft is willing to change IE for it.