3

I need to adjust the line height on PDF when creating letters. I tried to modify

.cke_editable
{
    font-size: 13px;
    line-height: 1.6em; <- I tried 1em
}

...in

/sites/all/modules/civicrm/packages/ckeditor/contents.css

My modification is visible in CKEditor but doesn't change anything on the generated PDF.

What is the best approach to do this ? I'm using Drupal 7, CiviCRM 4.5.8 and CKEditor 4.

Thanks

EDIT

From @Flying comment, I noticed that CKEditor creates

<span style="line-height:1.6em">...</span>

...around all newly created paragraph (so each time I hit backspace). I can get rid of these span's by using "Remove Format" ("Tx" button).

So I guess my question becomes "Why does CKE add span's around p's with inline css style ?"

I found some useful resources, still need to check :

http://ckeditor.com/forums/CKEditor/ckeditor-4.01-inserting-span-elements-everywhere-with-a-line-height-of-1.6em

https://dev.ckeditor.com/ticket/9998

3
  • Have you tried to put the line-height tag inside the html-code of the PDF template? (PDF templates are using inline CSS, so you probably should use it on a div or something)
    – Flying
    Nov 26, 2015 at 7:56
  • @Flying Thanks for the lead, I edited my answer Nov 26, 2015 at 9:41
  • TinyMCE does not include those spans...
    – Flying
    Nov 26, 2015 at 11:08

0

Your Answer

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

Browse other questions tagged or ask your own question.