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

  • 2
    I am not sure whether it is a bug. The system messages contains smarty code which would probably break the CKEditor. – Jaap Jansma - CiviCooP Feb 20 at 17:35
3

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.

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.