Drupal: tinyMCE WYSIWYG + Maxlength Kombination / Integration

Drupal tinyMCE WYSIWYG und Maxlength Module

In einem unserer Projekte setzen wir sehr intensiv den tinyMCE Editor integriert in das WYSIWYG - Modul (http://drupal.org/project/wysiwyg) ein.

Des Weiteren ist eine Begrenzung der Eingaben auf eine festgelegte Zeichenzahl gewünscht (Maximallänge). Zu diesem Zweck hat sich das "Maxlength" Modul durchgesetzt (http://drupal.org/project/maxlength). Leider arbeiten die beiden Module von Werk aus noch nicht sauber zusammen. Nur im non-WYSIWYG Editor funktioniert der Zähler.

In einem Thread habe ich nun eine großartige Lösung per Plugin gefunden, die hoffentlich bald auch ins Maxlength-Modul einfließt: "wysiwyg_maxlength".

Ihr könnt das Modul hier herunterladen:
http://drupal.org/node/314508#comment-3951734

Zur Sicherheit habe ich das Modul auch noch einmal angehängt.

Folgende Schritte sind zur Nutzung möglich (getestet, funktioniert einwandfrei!)

  1. Modul ins Modulverzeichnis kopieren
  2. Module aktivieren (WYSIWYG, WYSIWYG_MAXLENGTH, MAXLENGTH)
  3. In den WYSIWYG Profilen unter "Schaltflächen & Plugins" die Option "Maxlength compatibility" aktivieren
  4. Entsprechendes Feld konfigurieren - Begrenzung festlegen in den Feldeinstellungen (CCK) oder den Node-Type Einstellungen
  5. Fertig!

Achtung, es wurde von Problemen im Kombination mit einigen Themes berichtet. Siehe Thread oberhalb.
Bei uns funktioniert es jedenfalls einwandfrei und bei euch?

Comments

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account associated with the e-mail address you provide, it will be used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Internal paths in single or double quotes, written as "internal:node/99", for example, are replaced with the appropriate absolute URL or path. Paths to files in single or double quotes, written as "files:somefile.ext", for example, are replaced with the appropriate URL that can be used to download the file.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd><blockquote>
  • Lines and paragraphs break automatically.
  • Pairs of<blockquote> tags will be styled as a block that indicates a quotation.
  • You can enable syntax highlighting of source code with the following tags: <c>, <cpp>, <css>, <drupal5>, <drupal6>, <java>, <javascript>, <mysql>, <php>, <python>, <ruby>, <smarty>, <xml>. The supported tag styles are: <foo>, [foo]. PHP source code can also be enclosed in <?php ... ?> or <% ... %>.
  • Textual smileys will be replaced with graphical ones.
  • Each email address will be obfuscated in a human readable fashion or (if JavaScript is enabled) replaced with a spamproof clickable link.

More information about formatting options

Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.