Next generation Wysiwyg API: Edit like a rock star!

Events happening in the community are now at Drupal community events on www.drupal.org.
sun's picture

smk-ka and me worked on the next generation of Wysiwyg API today. Stunning results! Which are still compatible with D6 and D5.

Known issues of the past:

  • Client-side editors attach to textareas, which do not support input formats at all. As a result, either all your formattings are not rendered, or you are faced with editors in places where no editor was ever considered, destroying your configuration or PHP code.
  • When working with a client-side editor, you need to ensure that you have set the proper input format, so the entered markup is not removed from the output. Failing to do so means to edit a content again, just to change the input format.
  • Disabling a client-side editor on a textarea the editor attached to, leads to missing default behaviors of Drupal, such as the grippie to resize the textarea. A tiny editing window and ugly scrollbars instead.

The solution:

With the patch in Attach client-side editors to input format enabled textareas only, which is about to be committed:

  • Client-side editors are no longer dumb scripts.
  • Editors are associated with input formats, making it possible to associate "BBedit" editor with a "BBcode" input format. A lightweight TinyMCE profile with "Filtered HTML". A full blown FCKeditor with "Full HTML".
  • Not every input format needs an editor. PHP code for example. If such an input format is selected when the page loads, no editor is attached to the particular textarea.
  • Editors are able to be switched if the input format is changed.
  • Regular behaviors in Drupal core are restored when no editor is attached. Resizable textareas are back again.

Remaining todos:

  • Introduce a GUI to associate an editor or editors to input formats. Not sure whether more than one makes sense. If not, we can remove the whole access permission system from Wysiwyg API's profiles.
  • Refactor JavaScript settings, so we can store the configuration for different editors simultaneously and support different editors (input formats) on the same page.

Comments

Quick clarification

sun's picture

Wysiwyg API's module supports only a single editor for the currently logged on user. But the new JavaScript already supports to have multiple, different editors on the same page. Because of that, this is both noted below "solution" and "remaining todos" ;)

Daniel F. Kudwien
unleashed mind

Daniel F. Kudwien
netzstrategen

Oh, and did I mention that

sun's picture

Oh, and did I mention that no editor will be loaded for plain text textareas without further configuration? Yay! :)

Daniel F. Kudwien
unleashed mind

Daniel F. Kudwien
netzstrategen

Awesome! Thanks so much for

kyle_mathews's picture

Awesome! Thanks so much for taking the lead on improving WYSIWYG editors in Drupal. Already Wysiwyg API is better than what was available before.

Kyle Mathews

Kyle Mathews

...

sun's picture

Thanks. However, we badly need more testers for the current improvements. So if you can test some of the latest patches, this would be highly appreciated. See http://drupal.org/patch/apply for further information.

Daniel F. Kudwien
unleashed mind

Daniel F. Kudwien
netzstrategen

Improvements to core

Group categories

Category

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week