Problem/Motivation

When using Views, you can add Custom Text Area in Header or Footer for instance. This Text Area can use the various text formatter you defined on your site. When using a text format allowing it, it should be able to use the WYSIWYG tool accordingly.

User interface changes

Let user use WYSIWYG tool when adding a text area in their view's header or footer.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dom. created an issue. See original summary.

Dom.’s picture

Version: 8.2.x-dev » 8.1.x-dev
Status: Active » Needs review
Issue tags: +Usability, +d8ux, +D8UX usability

Adding patch.

Before patch:
Before applying patch

After patch:
After applying patch

dawehner’s picture

I remember back in d7 wysiwyg in the modal was just broken. Maybe (hopefully) this is no longer the case ...

dawehner’s picture

OH yeah, do you mind also uploading a patch :)

Dom.’s picture

Oups ! Forgot to link the patch ! It's a very easy one !!

dawehner’s picture

We could remove the line completely ...

jibran’s picture

Version: 8.1.x-dev » 8.2.x-dev

New features can only be added to 8.2.x

Dom.’s picture

@dawehner: indeed, I just though it was more explicit since it is a feature change. But indeed, default value :)
@jibran: patch also applies cleanly on 8.2.x

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Cool! If things works, perfect!

tstoeckler’s picture

Status: Reviewed & tested by the community » Needs review

Has anyone tried uploading an image through the editor dialog? This modal-in-modal was broken for a long time and was the reason for disabling the editor.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

jrockowitz’s picture

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Anonymous’s picture

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

jibran’s picture

gagarine’s picture

Issue tags: -d8ux, -D8UX usability

Usability is preferred over UX, D7UX, D8UX etc. See https://www.drupal.org/issue-tags/topic

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

PhilY’s picture

Patch #8 works like a charm using Drupal 8.6.14, PHP 7.2.14
Thank you

Lendude’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

We need a test for this, because currently this probably still breaks on #2741877: Nested modals don't work: opening a modal from a modal closes the original

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Dom.’s picture

Status: Needs work » Needs review
FileSize
770 bytes

Just updating patch to 9.1.x / 9.2.x

Abhijith S’s picture

Applied patch #26 .The WYSIWYG editor is available in views text area fields after the patch.But its unable to add links and image in the text area.Please fix it. Adding the recording below
after

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

KarimBou’s picture

Patch isn't applying on Drupal 9.4.x aswell as 9.3.x

In Text.php we have now :

  /**
   * {@inheritdoc}
   */
  public function buildOptionsForm(&$form, FormStateInterface $form_state) {
    parent::buildOptionsForm($form, $form_state);

    $form['content'] = [
      '#title' => $this->t('Content'),
      '#type' => 'text_format',
      '#default_value' => $this->options['content']['value'],
      '#rows' => 6,
      '#format' => $this->options['content']['format'] ?? filter_default_format(),
      '#editor' => FALSE,
    ];
  }

Can we maybe just switch editor to TRUE ?

ankithashetty’s picture

Yeah, patch in #26 failed to apply. Here is the re-rolled patch, thanks!

Status: Needs review » Needs work

The last submitted patch, 31: 2741187-31.patch, failed testing. View results

SocialNicheGuru’s picture

I am on the latest 9.2
Patch #26 adds ckeditor to global custom fields
But it strips links when they are added.
I wonder about the other patches.

Ckeditor works as expected in a normal text area

dawehner’s picture

I've tried out to use this with ckeditor5. Here is a little video: Here

Summary of the video: The 'modal' of the image alt text is not appearing. On top the toolbar sometimes hovers on top of everything else.

Dom.’s picture

Version: 9.4.x-dev » 10.0.x-dev
FileSize
592 bytes
71.71 KB
69.94 KB

Trying the patch using D10 and CKEditor 5 : excitement of not having dialog in CKE5 made me believe that would work out of box solving our issue here.
This is not that far actually. But still some problem remains in some functionalities : namely one that has those "balloon"-like expected, for instance link or image plugin.

Expected :
expected balloon configuration
Observed:
No balloon

Therefore I guess at the moment, we can consider the initial "dialog" issue to transfer to a "balloon" issue.

Reproduction

- Apply the patch on drupal 10
- Configure a text format for CKE5
- Add a textarea in the header of one of the view
- Try to make a link or add an image within that textarea

tonytheferg’s picture

Any way we could include the global text field in this patch also?

Version: 10.0.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.