Difficult formatting with tinyMCE

Difficult formatting with tinyMCE

door Herbert Plass -
Aantal antwoorden: 5

Hi,

this tinyMCE-editor in moodle 2.0 is troublesome for me:

  • I am missing a simple format with <br /> instead of <p></p> in the HTML-code. This makes a text falling apart by double-spacing between paragraphs
  • When I change the HTML-code the automatic formating tool reverts most things, which makes tinyMCE a text-processor instead of a HTML-editor. This is even more painful, as the option add page (without editor) was dropped from resources dropdown menu. Hence a more sophisticated (HTML-)page cannot be generated.
  • The anchor option is no longer available

Now some questions:

Is there a simple solution for adding custom formats to tinyMCE (there is a thread answering this question ... from 2008, which is appearently outdated).

Is there a possibility to switch off the autoformatting of the editor? If so, where can I find this switch?

Is there a possibility to insert HTML-coded pages without an editor? (The "menu" below the editor window has only HTML as option)

 

regards

Herbert

Gemiddelde van de beoordelingen:  -
Als antwoord op Herbert Plass

Re: Difficult formatting with tinyMCE

door Herbert Plass -

This thread is very quiet - a lot of unanswered questions....

OK, the <p>-problem can be solved with shift-return (as posted in another thread)

  • But what's about adding custom formats?
  • Where has the option (in "add a resource") "text page (without editor) gone" ?
  • Siteadministration -> Plugins -> Texteditor -> Manage editors: "TinyMCE" and "Plain text editor" are enabled. But where can I choose which of these (enabled) editors to use? The upper editor is used, the other one unavailable.
    "Moodle Docs for this page" is not really helpful.

regards Herbert

Gemiddelde van de beoordelingen:  -
Als antwoord op Herbert Plass

Re: Difficult formatting with tinyMCE

door Philipp Jovanovic -

So finally i've found a solution at least for the <p> tag problem:

Link

To configure this in moodle, go to moodlefolder/lib/editor/tinymce and open lib.php.

There append the following entries to the $params array:

'forced_root_block' => false,
'force_p_newlines'  => false

And if you want to have <br /> tags when you hit enter (instead of <div>) in addition:

'force_br_newlines' => true

 

Cheers,

Philipp

Gemiddelde van de beoordelingen: Useful (1)
Als antwoord op Herbert Plass

Re: Difficult formatting with tinyMCE

door Ralf Hilgenstock -
Foto van Core developers Foto van Translators

Hello Herbert,

TinyMCE can be configured very flexible. See http://tinymce.moxiecode.com/tryit/full.php for more information.

ralf

Gemiddelde van de beoordelingen:  -
Als antwoord op Ralf Hilgenstock

Re: Difficult formatting with tinyMCE

door Herbert Plass -

Thank you Ralf,

.. and where in the path/file can I add these changes in moodle? Are they kept after upgrading?

herbert

Gemiddelde van de beoordelingen:  -