Similar issue was described in http://drupal.org/node/814970 but those solutions didn't fix the problem for me.
The problem was that Insert Teaser Break button generates JS error: "getAttribute is not a function". After some debugging I found out that when creating a teaser break (which in fact is a html comment) this plugin uses a function called createFakeElement that is not supposed to operate on html comments because it tries to access getAttribute('align') method which on comments doesn't make sense. The solution was to add this method to comment object before it is passed to createFakeElementFunction. The second place where the problem occures is when switching from source to Rich text editor, when createFakeParserElement() tries to set align attribute for a comment. So the fix was done in file ckeditor/plugins/drupalbreaks/plugin.js in two places:

in function insertComment( text ) :
I changed this:

function insertComment( text )
{
  // Create the fake element that will be inserted into the document.
  // The trick is declaring it as an <hr>, so it will behave like a
  // block element (and in effect it behaves much like an <hr>).
  var fakeElement = editor.createFakeElement( new CKEDITOR.dom.comment( text ), 'cke_drupal_' + text, 'hr' );
  ...

to this:

function insertComment( text )
{
  // Create the fake element that will be inserted into the document.
  // The trick is declaring it as an <hr>, so it will behave like a
  // block element (and in effect it behaves much like an <hr>). 
  var realElement = new CKEDITOR.dom.comment( text );
    realElement.getAttribute = function() {
    return null;
  };
  var fakeElement = editor.createFakeElement( realElement, 'cke_drupal_' + text, 'hr');
  ...

and in function afterInit:
this

comment : function( value )
{
  if ( value == 'break' || value == 'pagebreak' )
    return editor.createFakeParserElement( new CKEDITOR.htmlParser.comment( value ), 'cke_drupal_' + value, 'hr' );

  return value;
}

to this:

  if ( value == 'break' || value == 'pagebreak' ) {
    var realElement = new CKEDITOR.htmlParser.comment( value );
    realElement.attributes = {
      'align':null
    };
    return editor.createFakeParserElement( realElement, 'cke_drupal_' + value, 'hr' );
  }
  return value;

Maybe it helps somebody

CommentFileSizeAuthor
#2 ckeditor_drupalbreak_fix.patch1.45 KBmedieval111

Comments

dczepierga’s picture

Status: Active » Needs review

Could you check that the last version from CVS works for you??

This bug should be fixed earlier.

medieval111’s picture

StatusFileSize
new1.45 KB

I did not check the latest CVS, but I can confirm that these changes do the trick! I also included a patch.

jcisio’s picture

Status: Needs review » Closed (duplicate)

It looks like your patch is for 1.1 (I don't see this change). Did you upgrade from CKEditor 3.2 and bypass 3.3? This error was noticed and fixed in CVS #814970: Teaser break not working with CKEditor 3.3

smarsh’s picture

I'm a nube and have the same issue. It's my first Drupal install and I have only installed 3.4 yet the teaser break does nothing. It worked fine before CKE. It could be me but I don't know what I'm doing right or wrong.

Any help?

jcisio’s picture

The latest dev version of the module fixes it.

cjwest’s picture

I'm also looking for the teaser break. Tried both 3.4.1 and the nightly build. I don't see the plugin. What do you suggest?

Jeraarts’s picture

I am having the same problem with CKEditor 3.4.1. When inserting a teaser break in the plain text editor, switching to the CKeditor just shows a grey box. I have tried this on several browsers on different computers. Any suggestions?

Jochus’s picture

I'm having the same problem. Any fixes?
Drupal ckeditor: 1.2
Implementation of ckeditor: 3.4.2

Jochus’s picture

Nevermind, has been fixed by clearing ALL browser cache! Thanks!