Certain fields are CodeMirror-enabled but probably should not be, such as the administrative description of a form, and the custom email body:

Comments

cilefen created an issue. See original summary.

jrockowitz’s picture

Please see #2796425: Email Handler Configuration -> Email Body Field with Editor for some more background.

The challenge is should these elements be developer or site builder friendly. I think the answer is "it depends".

Some more notes

  • HTML editor can be disabled via Admin settings under User Inteface (/admin/structure/yamlform/settings)
  • Not sure how handle HTML Emails
  • Form description should use an HTML Editor
jrockowitz’s picture

Below is a list of place that the CodeMirror editor is being used and code be replaced by the CKEditor

Admin settings

  • /admin/structure/yamlform/settings

Form: Administrative description

  • /admin/structure/yamlform/manage/contact/settings
  • /admin/structure/yamlform/add

Email Handler

  • /admin/structure/yamlform/manage/contact/handlers/email_notification/edit

Some more notes and thoughts...

  • Using CodeMirror for things like confirmation messages is just easier.
  • CKeditor wraps single lines of text in P tags, which adds margins around text. We could use
    tags for better formatting
    .
  • CKEditor might have problems with hrefs that contain tokens.
  • Email handler currently needs to support plain text and HTML.
  • Trying to avoid using Text format because the markup become unmanageable. For example, we don't want people uploading inline images to a YAML Form which is config entity.
jrockowitz’s picture

Title: Some admin fields are CodeMirror but perhaps should not be » Use CKEditor (instead of CodeMirror) for all settings that can contain HTML markup

  • jrockowitz committed f801c92 on 2822613-use-ckeditor
    Issue #2822613 by cilefen, jrockowitz: Use CKEditor (instead of...
jrockowitz’s picture

Status: Active » Needs review
FileSize
8.79 KB

Changing the CKEditor enter mode to use BR tags instead P tags addressed all my concerns about enabling the HTML Editor sitewide.

The only place that I can't just enable the HTML Editor is the EmailYamlFormHandler because the message body can contain plain text or HTML. I will create a new ticket for this issue.

Status: Needs review » Needs work

The last submitted patch, 6: use_ckeditor_instead-2822613-6.patch, failed testing.

  • jrockowitz committed 62908f6 on 2822613-use-ckeditor
    Issue #2822613 by cilefen, jrockowitz: Use CKEditor (instead of...
jrockowitz’s picture

Status: Needs work » Needs review
FileSize
11.27 KB

  • jrockowitz committed 908e68c on 8.x-1.x
    Issue #2822613 by jrockowitz, cilefen: Use CKEditor (instead of...
jrockowitz’s picture

Status: Needs review » Fixed

Done! Please download or checkout the latest dev release to review.

I resurrected the below closed issue to hopefully start using the CKEditor when editing an email's body/message.

#2796425: Email Handler Configuration -> Email Body Field with Editor

Status: Fixed » Closed (fixed)

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