When I add a teaser break at the end of the text (to get rid of the "read more" link), it's always placed before the </p> tag so the "read more" link is still showing.

Is there a way to make the code look like this </p>< !--break--> instead of < !--break--></p>? I always have to do this manually at the moment.

I'm using CKEditor 3.3.1.5586

Thanks in advance.

Comments

Wolfke2800’s picture

Issue summary: View changes

added

doomed’s picture

twod’s picture

Status: Active » Closed (duplicate)

This is a known issue and there's a temporary workaround-patch in comment #60 of #510552-60: Invalid XHTML: missing trailing slashes, absolute urls and uppercase tags.
The real problem is that cross-editor plugins do not have proper access to cross-editor selection handling when inserting content, so it doesn't know it's inserting the break comment in the p.

The workaround patch in that issue uses a bunch of regular expressions (which are NOT the best way to parse/fix markup! - but it works reasonably well for this) to fix this up just before the editor syncs content bakc to the original textarea or shows it in "Source mode".

I'd love to get started on #1220802: Selection API: Allow plugins to alter and set a custom selection context for themselves to fix this, but the little time I have to work on Wysiwyg between work and other things needs to be put on support and simpler or critical bugs to show the project is still alive...

twod’s picture

Issue summary: View changes

changed code