3

If I edit a user driven message template, then CKEditor works nicely. If I try to edit a system message template, the template fills only into a textarea, without CKEditor.

Since it's done as site admin having all the permissions, and these symptoms are the same on dmaster.demo.civicrm.org for system templates and for user templates, I guess this is a bug.

Do you have any workaround here?

My install is on Aegir 3.17.3 with Drupal 7.64 and CiviCRM 5.10

1
  • 2
    I am not sure whether it is a bug. The system messages contains smarty code which would probably break the CKEditor. Commented Feb 20, 2019 at 17:35

2 Answers 2

4

Jaap's comment is correct. It's unfortunately not possible to use a WYSIWYG editor on system templates because they're not (just) HTML, but contain Smarty code as well. Not only would Smarty break CKEditor, but CKEditor would break the Smarty code.

This unfortunately makes editing system templates difficult to do. However, one trick that makes it easier is to copy the text into software that understands Smarty templates. I use Netbeans IDE for this. While this may be overkill for most uses, Netbeans can recognize both HTML and Smarty tags and the tag that closes a section. So it's easy to use code folding to identify and hide the sections that don't concern you.

I work in Netbeans, then paste the text back into CiviCRM and press "Save". It's relatively quick to iterate this way.

0

A new alternative is to use the Pretty Workflow Messages extension, which allows you to edit a header and footer that go around the original message, and can be edited with a normal editor.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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