Needs review
Project:
CKEditor 4 - WYSIWYG HTML editor
Version:
7.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Jul 2011 at 08:01 UTC
Updated:
8 Jan 2015 at 01:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
juc1 commentedPS my ckeditor is up to date (3.6.1).
Comment #2
mkesicki commentedI think this is good behaviour , because in this way you have correctly opened and closed tags in teaser mode and in full view.
For me this works as designed, but maybe others have different opinion.
Comment #3
mkesicki commentedComment #4
juc1 commented@ michal_cksource - do you mean that a full view should look like this - paragraph break in the middle of a sentence??
http://redsand.org/lorem-2
Comment #5
juc1 commentedscreenshot
Comment #6
mkesicki commented@Juc1 this link http://redsand.org/lorem-2 doesn't work.
I think we have some misunderstood about teaser break and how this works.
Teaser break is for add 'Read more ' link in teaser view (short version of article in some view).
I think that the best and easiest solution for you problem is to use teaser break in place between two paragraphs. This also is is logical solution, because placing it in middle of sentence (as in you example) has no sense for me. Please also check "Show summary in full view" option when you add article.
In Garland theme there is no pause between paragraph in full view of post. Try use this on other theme and check if the problem occurs on it.
Comment #7
juc1 commented@ michal_cksource - sorry the link doesn't work any more but the screenshot # 5 shows the problem - this screenshot is the full view after clicking on the 'read more' link in the teaser view (zen theme). I thought I could put 'read more link' anywhere I want (I think you can do this in tinymce). Anyway I will try with the Garland theme as you suggest.
Thanks
Comment #8
mkesicki commentedI am not 100% sure , but I think that read more link (teaser break) shows only in teaser mode and in view when you set it to show.
Comment #9
smscotten commentedAgreed that we ought to be able to put the teaser break in the middle of a sentence or even the middle of the word if it's what we want. Just because you like to end your teasers at the end of paragraphs doesn't mean the rest of us should have to. It's a teaser. Sometimes you want to leave people hanging so they want to read the rest of the [read more]
Comment #10
smscotten commentedAgreed that we ought to be able to put the teaser break in the middle of a sentence or even the middle of the word if it's what we want. Just because you like to end your teasers at the end of paragraphs doesn't mean the rest of us should have to. It's a teaser. Sometimes you want to leave people hanging so they want to read the rest of the
paragraph.
Is this really the desired behavior?
Comment #11
kendouglass commentedExactly!
Comment #12
rkdesantos commentedAgreed. The break should be able to be in the middle of a sentence to get users to view the entire post.
Comment #13
tangent commentedIn my opinion there are actual problems with the current implementation even if it is desirable to place a teaser break within a paragraph.
It is currently impossible add a teaser break or a page break in between block elements without CKEditor wrapping paragraph tags around the break element. This results in teasers always missing a closing paragraph tag and bodies potentially starting with a closing paragraph tag if the "Show summary in full view" option is disabled. This is the problem named in the issue title.
The core issue is about ensuring that CKEditor produces markup which will be well-formed in all view modes (teaser, full, body without summary, paged). Currently it does not. Input filters can help work around this by ensuring that tags are closed but this will still result in empty paragraph tags where the break element is positioned.
Comment #14
tangent commentedOops, it seems I was experiencing a behavior of HTMLPurifier and not by CKEditor. How embarrassing. Changing ticket settings back to their previous values.
I disabled the AutoFormat.AutoParagraph setting in HTMLPurifier to resolve the issue, for anyone else who experiences this.
Comment #15
jamix commentedI'm marking it as a bug report because with CKEditor disabled, you can insert teaser break in the middle of a paragraph and it won't break the paragraph in two. In response to #2:
Drupal normally takes care of that on the core level by running the output through
_filter_htmlcorrector()in thetext_summary()function.I'm attaching a patch for Drupal 7.x-1.x that makes teaser break an inline element in CKEditor and doesn't cause paragraph splitting.
Comment #16
darvanenApplied #15 to 7.x-1.15, works well, still goes to the end of tables and lists but doesn't break paras. Thanks for the patch!
Comment #17
darvanenOk so I've found that when the teaser break is inserted in the middle of a paragraph, it might be between
<em>or<strong>tags or perhaps<span>if you allow them.This means that when the teaser is shown it leaves an open tag that affects everything that comes after it - in my case that's the nav bar and sidebards (using Zen theme).
Is there any way we can re-write the code that previously broke the
<p>block in two parts to get it work with in-line tags?:range.splitBlock( 'p' );Comment #18
darvanenRe-rolled patch for current release with some code to split up inline html tags thanks to some generous help from Bergi at Stack Exchange which I then translated for CKEditor's API.
Comment #19
darvanenHappy to update the patch as needed; unassigning since I'm not currently working on it.