HTMLarea config

HTMLarea config

by stefano federici -
Number of replies: 1

I noticed that when pasting a full Word document in HTMLarea, it appears for just an instant exactly as it was in Word, then suddenly it looses a lost of formatting. I tried also by saving the Word document as HTML and then pasting the HTML in textmode: some tags get stripped off (head, html, style, ecc...). I suppose this setting is hidden somewhere in HTMLarea or Moodle.

For example I use other portals (i.e. phpwebsite) and I have a textsettings.php file in the /config folder. In this file all accepted tags are listed (all other tags are just stripped off from the saved content).

Can someone direct me to the correct file/function?

Thanks

Average of ratings: -
In reply to stefano federici

Re: HTMLarea config

by stefano federici -

I found the solution. In HTMLArea.Config function (in /lib/editor/htmlarea.php) I changed two lines so that now I have

    this.fullPage = true;

    this.killWordOnPaste = false;

Now I can paste the whole HTML code saved from Word. It does work only in textmode; if I paste it in wysiwig mode the HTML styles are lost.