Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Text fields, created by the Text module, do not display a Text editor when Filtered Text is chosen as Text processing opition, and the length of the text field is shortened, independent of the length set on the Form Display page.
Some ideas from IRC on that:
<nod_> oh then there should be a js error somewhere
<swentel> and yes, in D8, there's a JS error as nod_ predicted
<nod_> all right the issue seems to be that there are no attributes for the input tag generated
<nod_> yched: when you have a text field (not long text) and you configure as filtered text, there are no attributes on the input tag, you just end up with <input class="full-text">
<nod_> text-full
<yched> nod_: the attributes that make EditInPlace work ?
<nod_> yched: amongst them yes, but the field doesn't even have an ID or type attribute
<swentel> yeah that's really really weird
<nod_> yeah the value isn't even saved.
<yched> nod_: hmm - yep, sounds like a bug in TextfieldWidget logic indeed - blame accepted pending more investigation ;-)
<swentel> I think it's rather #type text_format that can't handle a textfield
<swentel> because the widget definition looks fine
<yched> swentel above is probably right, sounds like a bug in the 'text_format' Form API element
Comment | File | Size | Author |
---|---|---|---|
#3 | add_content_1_no_toolbar.png | 66.59 KB | ifrik |
#1 | add_content.png | 39.24 KB | dineshw |
#1 | plain_text_field.png | 28.98 KB | dineshw |
#1 | filtered_text_field.png | 30.43 KB | dineshw |
Comments
Comment #1
dineshw CreditAttribution: dineshw commentedNot a bug!
I just tested by creating two fields:
one with plain text formatting and other field with filtered text formatting.
But field with filtered text formatting has option of Text Format selected in Drop down.
Comment #2
dineshw CreditAttribution: dineshw commentedComment #3
ifrikThanks for the screenshots - they actually reproduce the issue.
The problem is not that "Basic HTML" does not show up in the drop-down menu.
The problem is that when the "Basic HTML" format is chosen, the text editor is not displayed, even though it should. That can be quite nicely seen in the screen shot, but I've also marked it now.
The other part of the issue is that the length of the text field is shortened when "Filtered text" is chosen as an option.
That might also be the case for the text field "Admins Text" in the screenshot.
Comment #9
Wim LeersThis is because CKEditor doesn't work for
input[type=text]
, it only works for<textarea>
.If a text editor does support this, they can list
textfield
there.