TinyFCK in Moodle 1.8?

TinyFCK in Moodle 1.8?

by Rob Harris -
Number of replies: 4
Hi everyone,

I've seen some discussion here of using tinyMCE as a replacement for the default html editor. But it seems that tinyMCE doesn't have any file interface for uploading or selecting files from a moodle course. sad

TinyFCK seems to solve this problem:

http://p4a.crealabsfoundation.org/tinyfck

but I'm not sure if it's possible to use this from within moodle. Is anyone using this editor successfully in Moodle 1.8?

Rob
Average of ratings: -
In reply to Rob Harris

Re: TinyFCK in Moodle 1.8?

by Marc Bria Ramirez -
This is not exactly right... better said, it's closer to be wrong.

It's true that tinyMCE don't include any GPL upload module (there is a nice commercial plugin that MoxieCode people resist to release free) but the guys that did the moodle-tinyMCE integration also concerned about the integration between tinyMCE and moodleUpload... so the result is quite the same as tinyFCK.

Attached to this post you have an snapshot to see how tinyMCE allows uploads (sorry in advance, because some messages are in Spanish).

As you will probably know tinyFCK mixes tinyMCE and the FCKeditor upload module, but with the nice work made soo long time ago, I'm sure tinyFCK is not really required. We will get latest releases directly from tinyMCE than from tinyFCK.

As far as I know, with the former work done, the only think we need is module developers calling the editor in the "standard way" and the editor libraries will take care of the rest.

Sorry if I can't be more precise and include howtos (there are some nice ones in this forum), but I'm overwhelmed right now. I suggest anybody interested in tinyMCE integration with moodle, reading the README included on every moodle release at /lib/editor/neweditor_readme.txt

Cheers,

m.
Attachment tinyMCE_with_moodleUpload.png
In reply to Marc Bria Ramirez

Re: TinyFCK in Moodle 1.8?

by Rob Harris -
Hi Marc,

Thanks for your reply -- and it sounds like good news!

I hadn't found the neweditor_readme.txt file before, but to a non-php person like me, it's still not clear how I switch between the editors. Perhaps I'm missing it somewhere, but I haven't seen a discussion with a clear answer on how to activate tinymce properly.

It looks to me from the code that all that's needed is to set editorname in lib/editorlib.php to be 'tinymce' - is that all that needs to be changed? (at least to start with?)

The editor will then allow me to upload/select files as usual with no further changes?

My apologies if these are naive questions - I'd be grateful if someone could point me in the right direction!

Best wishes,

Rob
In reply to Rob Harris

Re: TinyFCK in Moodle 1.8?

by Marc Bria Ramirez -
Dear Rob,

No need of apologies. We all are naive the only different is the subject. wink

The short answer is: Moodle is able to work with tinyMCE since 1. 8 (probably before, but I didn't check former versions)... the only point is that every module decide what editor to call and most of them are still calling the old htmlarea webeditor.

Just in the moment you manage to change your favorite module's code to enable tinyMCE (as is half explained in the readme file I talk about) tiny will work and also will be able to upload files.

I need to test it in detail to be sure I'm not driving you to the wrong way (we noticed this because we are writing our own module) and now I can be more specific, but looks like you only need to "hack" the module you like to call tinyMCE instead of htmlarea. It normally means changing a single line of code or so.

Please, review the readme file in detail, make your tests... and come back with questions if the explanation there is not clear or you have doubts about the php programming.

Cheers,

m.

In reply to Marc Bria Ramirez

Re: TinyFCK in Moodle 1.8?

by Paolo Oprandi -
Dear Marc,
It isn't at all clear to me... what is the line of code and in which function or file (weblib.php, print_textarea())?
The general consensus from reading this forum seems to be that tinyFCK is the way to go.
Any help grateully received.
Paolo