and also for CKEditor < 4.5
authorMark Wells <mark@freeside.biz>
Thu, 10 Dec 2015 08:23:01 +0000 (00:23 -0800)
committerMark Wells <mark@freeside.biz>
Thu, 10 Dec 2015 08:23:01 +0000 (00:23 -0800)
httemplate/elements/ckeditor/plugins/blockprotect/plugin.js

index 96c0f42..d0c9a02 100644 (file)
                           } // elements
                         });
 
-                        editor.on( 'afterInsertHtml', function( evt ) {
+                        editor.on( 'insertHtml', function( evt ) {
                           // if this leaves an open SPAN, move the cursor
                           // to after it
                           var range = editor.getSelection().getRanges()[0];
                             range.collapse();
                             editor.getSelection().selectRanges([ range ]);
                           }
-                        });
+                        }, null, null, 30);
+                        // actually inserting the HTML happens at priority 10.
 
                 } // afterInit
         }); // plugins.add