I just started using CKEditor, and I really like it. It's a great improvement over FCKEditor!

I want to use Signwriter as an input filter to convert all of my H2 headings to a GIF with a nice font. To do this, you submit an input filter regular expression to convert it: /<h2*?>.*?<\/h2*?>/.

The problem occurs in the way CKEditor codes headings. For some reason, CKEditor inserts an extra line break and tab space (as you can see with the Source button or in the source of the resulting page):

<h2>
	Awards</h2>

Signwriter isn't set up to create gifs out of spaces (rightfully so), so it doesn't recognize the pattern and convert the H2. Is there a reason why you add the extra line break and tab before the heading text? If not, it would be very useful in this case to have the extra line break and tab space removed.

Comments

camhoward’s picture

Hi Cindy,

You can change that. Here's how:

  1. Go to Site configuration > CKEditor.
  2. Click "edit" for the Default profile.
  3. Click "Cleanup and output."
  4. Deselect "indent the element contents" and "break line before the opener tag" (and make any other changes to the custom formatting options you would like).
  5. Click the "Save" button.
  6. Repeat this process for the Advanced profile.
  7. Clear the caches, and see if that helps.

Cam

cindyr’s picture

Status: Active » Fixed

Cam, you're the best! I saw those checkboxes once upon a time - they weren't checked. What I missed was it was set to not use custom formatting options. I assumed those wouldn't be in place, and never gave them another thought.

Thanks! It works like a charm now.
Cindy

camhoward’s picture

Hi Cindy,

Great, glad it helped! Sorry I forgot to include the step for selecting "Yes" under "Use custom formatting options" -- I'm glad you figured that out!

Cam

Status: Fixed » Closed (fixed)

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