If a textarea with its own filter format only has one input format allowed, the editor is not loaded. The input format is associated with wysiwyg profile.

Comments

sun’s picture

Status: Active » Needs review
StatusFileSize
new1.59 KB

True. Attached patch should fix this issue.

smartinm’s picture

Hi Sun,

this patch works only when input format has "Formatting guidelines". If no guidelines are available, the editor is not loaded yet.

sun’s picture

Status: Needs review » Needs work

Well, I'll look into fixing this. However, having one input format without any formatting guidelines indicates that there are no input filters for the default input format. This would equal to allowing Full HTML for anonymous users, which opens a can of worms on your site. You might want to reconsider your input format configuration. Read on here:

http://heine.familiedeelstra.com/input-formats-beware
http://www.nicklewis.org/drupal-news/why-full-html-input-format-dangerous
http://www.lullabot.com/articles/drupal_input_formats_and_filters

sun’s picture

Status: Needs work » Needs review
StatusFileSize
new1.75 KB

Attached patch should fix this edge-case. I already thought of outputting a warning message when this happens, but did not implement this yet.

smartinm’s picture

Thanks sun.

I know the problems of allowing Full HTML for anonymous users, but there are some cases where only one rich text input is enabled when edit a node:

  • Private sites (i.e. intranets)
  • Use hook_form_alter to remove unwanted input formats (to simplify the form)
  • Modules as filterbynodetype restrict the type of input format available to a user by user role.

(Sorry my bad english)

sun’s picture

Status: Needs review » Fixed

Thanks, committed.

I did not know of filterbynodetype module yet. After quickly scanning its code, I can tell you that it breaks Wysiwyg API, because it alters the input format widget in a way that leads to a form structure that differs from the one produced by filter_form(). Wysiwyg, however, requires that the internal form structure of the input format widget equals the structure produced by filter_form(). You probably want to open a new issue in filterbynodetype's queue, referencing to this issue, and asking the maintainer to fix this bug.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.