htmleditor in moodle 1.6

htmleditor in moodle 1.6

by Randall Kindley -
Number of replies: 18
I installed moodle 1.6, but the htmleditor does not work. I have it switched on in the configuration. Never had an issue with it in earlier versions. Any ideas?

Randall Kindley
Minneapolis, MN
Average of ratings: -
In reply to Randall Kindley

Re: htmleditor in moodle 1.6

by Janne Mikkonen -
In 1.6 version paths changed a bit, so did you clear your browser cache?

- Janne -
In reply to Janne Mikkonen

Re: htmleditor in moodle 1.6

by Juan Manuel Fraga Sastrías -
I happen to have the same problem, have cleaned cache and everything and the problem is still there.

Any ideas?
In reply to Juan Manuel Fraga Sastrías

Re: htmleditor in moodle 1.6

by Janne Mikkonen -
Hi Juan,

  1. Does your browser (IE or MOZ/FF) give any error information?
  2. Can you access your htmlarea.php via url? ( http://yourdomain/lib/editor/htmlarea/htmlarea.php)
- Janne -
In reply to Janne Mikkonen

Re: htmleditor in moodle 1.6

by Juan Manuel Fraga Sastrías -
1. No error is reported.
2. Yes I can access it, the only thing I see is the complete script.

Any ideas??
In reply to Juan Manuel Fraga Sastrías

Re: htmleditor in moodle 1.6

by Janne Mikkonen -
Could you look at the page source code and verify that there are lines:

<script type="text/javascript" src="http://yourdomain/lib/editor/htmlarea/htmlarea.php"></script>
<script type="text/javascript" src="http://yourdomain/lib/editor/htmlarea/lang/en.php"></script>
And:
<script language="javascript" type="text/javascript" defer="defer">
edit_message = new HTMLArea('edit-message');
var config = edit_message.config;
config.pageStyle = "body { background-color: #ffffff; font-family: Trebuchet MS, Verdana, Arial, Helvetica, sans-serif; }";
config.killWordOnPaste = true;
config.fontname = {
"Trebuchet":	'Trebuchet MS, Verdana, Arial, Helvetica, sans-serif',
"Courier New":	'courier new,courier,monospace',
"Georgia":	'georgia,times new roman,times,serif',
"Tahoma":	'tahoma,arial,helvetica,sans-serif',
"Times New Roman":	'times new roman,times,serif',
"Verdana":	'verdana,arial,helvetica,sans-serif',
"Impact":	'impact',
"Wingdings":	'wingdings',
"Arial":	'arial,helvetica,sans-serif',
"Symbol":	'Symbol,serif'};
function spellClickHandler(editor, buttonId) {
	editor._textArea.value = editor.getHTML();
	var speller = new spellChecker( editor._textArea );
	speller.popUpUrl = "http://yourdomain/lib/speller/spellchecker.html";
	speller.spellCheckScript = "http://yourdomain/lib/speller/server-scripts/spellchecker.php";
	speller._moogle_edit=1;
	speller._editor=editor;
	speller.openChecker();
}

edit_message.generate();
</script>

Or something similar???
(These examples are from forum module).
BTW are you using IE or FireFox? Or did you test it with both of them?

In reply to Janne Mikkonen

Re: htmleditor in moodle 1.6

by Juan Manuel Fraga Sastrías -
I tested it with both.

In the source it appears  with Minor Changes from your example.

any further ideas?



In reply to Juan Manuel Fraga Sastrías

Re: htmleditor in moodle 1.6

by Janne Mikkonen -
Ok, could you test are we dealing with language related problem? Turn your preferred language to english in your profile ( or is it english already? ) and clear browser cache and try if editor loads.
In reply to Janne Mikkonen

Re: htmleditor in moodle 1.6

by Panagiotis Iliopoulos -
Hello Janne,

I am experiencing the same problem and I did what you proposed to Juan. My editor works great with the english language (I am using my own translation in greek, I have converted my old lang files to utf-8 cause I didn't want to loose all the translations I had made and renamed it to el_utf8 and I haven't used at all the el_utf8 that moodle is providing).

When I used the english and the greek utf8 lang that are provided from moodle the editor works but when I use my own local translation (I haven't done any of the things that moodle docs proposes, I just rename my translated/converted old file to the proper, which is el_utf8)

My old files are from 1.5.2 version, are some strings or lang files missing in there that are in the el_utf8 downloaded version so I could copy/paste them in my files?

At least what the source of the problem is now smile All I have to do is fix it.

Panayiotis.
In reply to Panagiotis Iliopoulos

Re: htmleditor in moodle 1.6

by Janne Mikkonen -
Hi Panayiotis,

We're also using some specific translations and we used a simple commandline php script to convert all our language files into utf-8 ( attachment ).

- Janne -
In reply to Janne Mikkonen

Re: htmleditor in moodle 1.6

by Panagiotis Iliopoulos -
Janne thank you for the script, I am using Windows XP here, how can I run this script? I am clueless blush

Panayiotis

In reply to Janne Mikkonen

Re: htmleditor in moodle 1.6

by Paul Nijbakker -
Hei Janne,

I think we have a related problem, but in 1.5.4. with the Netpublish module. The set up page uses the HTML editor normally, but when adding an article there is no editor, just a plain text window (every tag must be added manually). The page source does show the two lines you mention but instead of the second bit of code all I find is

<script language="javascript" type="text/javascript">
<!--

function __insert_image (editor) {

    nbDialog("http://moodle.tokem.fi/mod/netpublish/insert_image.php?id=49&sesskey=Y8n2t2OCyp",774,550, function (param) {

        if (!param) {
            return false;
        }

        var sel   = editor._getSelection();
        var range = editor._createRange(sel);
        var img   = editor._doc.createElement("img");

        img.setAttribute("src",""+ param.f_url +"");
        img.setAttribute("width",""+ param.f_width +"");
        img.setAttribute("height",""+ param.f_height +"");
        img.setAttribute("alt",""+ param.f_alt +"");
        img.setAttribute("title",""+ param.f_title +"");
        img.setAttribute("align","" + param.f_align +"");

        if (HTMLArea.is_ie) {
            range.pasteHTML(img.outerHTML);
        } else {
            editor.insertNodeAtSelection(img);
        }
    });
}

config.pageStyle = "body { background-color: #ffffff; font-family: Trebuchet MS,Verdana,Arial,Helvetica,sans-serif; }";
config.killWordOnPaste = true;
config.fontname = {
"Trebuchet":	'Trebuchet MS,Verdana,Arial,Helvetica,sans-serif',
"Arial":	'arial,helvetica,sans-serif',
"Courier New":	'courier new,courier,monospace',
"Georgia":	'georgia,times new roman,times,serif',
"Tahoma":	'tahoma,arial,helvetica,sans-serif',
"Times New Roman":	'times new roman,times,serif',
"Verdana":	'verdana,arial,helvetica,sans-serif',
"Impact":	'impact',
"Wingdings":	'wingdings'};
config.hideSomeButtons(" spellcheck ");
// Register our custom buttons
config.registerButton("imagebank",  "Image bank", "ed_image.gif", false, __insert_image);
config.toolbar.push(["imagebank"]);
HTMLArea.replaceAll(config);
-->
</script>

Would you have any suggestions as to how we could get your old war horse back in business again?

Rgrds,
Paul.

In reply to Paul Nijbakker

Re: htmleditor in moodle 1.6

by Chris Potter -
I found that the function 'spellCheckHandler' wasn't being defined after I disabled spellchecking. Re-enabling spell checker and hiding the icon (I can't use the spell checker on Windows due to security flaws) fixed the HTML editor not displaying for me. IE6 wasn't intuitive enough to pass over the error and still display the HTML editor. Hopefully, that will help. If not, kindly disregard. smile
In reply to Janne Mikkonen

Re: htmleditor in moodle 1.6 - aspell bug

by Hugh Morrow -
I too am having problems with the spell checker ... when I provide the aspell directory, the html editor dissappears.  Even if the box is checked to hide the spell check button.

based on some testing, the HTML editor dissappears when the following line is present in the source:
   <script language="JavaScript" type="text/javascript" src="http://www.sbi.org.au/lib/speller/spellChecker.js"></script>
ie even when the aspellpath is provided and editorspelling: is set to 'no'

Config details:
  • I'm running moodle 1.6.1
  • can access http://yourdomain/lib/editor/htmlarea/htmlarea.php
  • verified the source code and it looks ok
  • I'm using firefox, and the speller shows up in this editor, so I don't think it is a browser issue.
In reply to Hugh Morrow

Re: htmleditor in moodle 1.6 - aspell bug

by Hugh Morrow -
Not sure if this is the problem but when I check the version of aspell I get:
   "International Ispell Version 3.1.20 (but really Aspell 0.50.5)"

 ... can anybody shed some light on the issue?  do I have to try and convince my ISP to install Aspell 0.6.0 or should it work with Ispell Version 3.1.20 (but really Aspell 0.50.5)??

thanks in advance,

Hugh
In reply to Janne Mikkonen

Re: htmleditor in moodle 1.6

by Mohd Radzi Abdul Kadir -
I face the same problem, I've try the same version moodle 1.6 on my windows xp the htmleditor display without any problem, but it wont show up when I put on my linux server.

Any idea why?
In reply to Mohd Radzi Abdul Kadir

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.
In reply to Deleted user

Re: htmleditor in moodle 1.6

by Robert Bell -
I'm having the same problem. My HTMLarea editor is not displaying at all. I do have the plain text editor. I have looked at the page code and the javascript is present and the links seem to be to the editor folder. I check through the page code of my other moodle site, which is also running 6.1, and I couldn't find any glaring differences. My conclusion was that my javascript was in some way disabled on the server. The server is running apache from the Moodle complete package. I installed this package about two weeks ago from the Moodle. org site. I remain clueless.
Any ideas that might help would be appreciated.
TIA Bob