How do I enable the WYSIWYG editor on a paragraphs text field in Drupal 8?

Currently, adding a text field (of any type) displays a single line input box. I'd like this field to be at least a multi line textarea, with preferably, a WYSIWYG editor. Is there a setting or module I can use to change this ?

EDIT: I should add that the editor works fine in a field on a content type or block. It does not load for any text type in a paragraphs field.

  • 1
    It doesn't matter where you add the field, this has nothing to do with paragraphs. In D8 WYSIWYG is included in the standard installation. Did you try this on a fresh install and can you be more specific what is different in your case? – 4k4 Sep 27 '17 at 19:41
  • Try to install drupal.org/project/bootstrap_paragraphs module(not a solution for your case), This module define a lot of paragraphs types with WYSIWYG. – Abdulla Abu Zakham Sep 27 '17 at 20:33
  • @4k4 I understand that the WYSIWYG editor is part of core. What I don't get is how I can use that editor on a textfield in a paragraphs entity. All text types don't seem to use it. – AyexeM Sep 27 '17 at 21:00
  • @4k4 If it isn't clear in my post and my comment, the WYSIWYG editor works fine on a field in a content type or block. It does not load for any of the text types in a paragraph field. That is why I am implying its related to paragraphs. – AyexeM Sep 27 '17 at 21:09
  • I don't know if it helps, but to be precise, you don't add fields to a paragraph field, but to a paragraphs type the same way as to a content type. – 4k4 Sep 27 '17 at 21:24

If you want to have a multi line textarea with an WYSIWYG editor, you'll have to create, for your paragraph type, a field of type "Text (formatted, long)" and while editing your field, you should choose "Full HTML" as "Text format". Hope this works for you.

  • That doesn't work for me. The field is of type text (formatted, long) and field format is Full HTML. Still a single line input textbox. :( – AyexeM Sep 27 '17 at 22:05
  • @AyexeM Could you check the form display of your paragraph type? There, you can define the widget type and the number of rows. Home >> Administration >> Structure >> Paragraphs types >> My paragraph >> Manage form display (../en/admin/structure/paragraphs_type/my_paragraph/form-display) – Rockabelly Sep 27 '17 at 22:14
  • In the form display, I only see an option to change textfield size, which I believe is number of characters in the field. Also, the only option under "widget" is textfield, which I guess is a root cause. Is there a way to enable another widget type that will load the editor? – AyexeM Sep 28 '17 at 0:32
  • If that's what you see then your widget type is "Text (plain)". – Rockabelly Sep 28 '17 at 7:24
  • A very interesting setting that you might want to check is "Text formats and editors": Home >> Administration >> Configuration >> Content authoring (../en/admin/config/content/formats). You could put "Full HTML" on top on the list + verify that the "Anonymous user" does not have access to this format. You could as well define the behavior of your editor per "Text format". – Rockabelly Sep 28 '17 at 7:24

The field type needs to be "Textarea (formatted, long) with summary" when creating the paragraph type.

  • Any formatted text field works, because WYSIWYG depends on text formats, not on paragraphs and not on a field with summary. – 4k4 Sep 28 '17 at 6:16
  • @4x4 That is not consistent with my experience. I've even checked with a fresh install of Drupal 8.3.7 with Paragraphs 8.x-1.2. "Textarea (formatted, long) with summary" is the only field type within a paragraphs entity that loads the WYSIWYG. A text field directly in a node works as you describe, but not within a paragraphs entity. Maybe there is a config setting to change this, but I'm not aware of it and that's kinda the entire point of my question. – AyexeM Oct 15 '17 at 17:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.