0

I wrote a code in which i used mention below statement

editor.insertHtml(paragraph.getOuterHtml());

which throws Uncaught TypeError: Object # has no method 'getHtml' in chrome. However when i run my code on firefox i got

    TypeError: startNode.getFirst() is null
[Break On This Error]   

...tartNode = startNode.getFirst().insertBeforeMe( range.document.createText( '' ) ...

while debug using firebug i found that my code is here which is an inbuild function of ckeditor 5.3

 var getNativeListener = function( domObject, eventName )
{
return function( domEvent )
{
// In FF, when reloading the page with the editor focused, it may
// throw an error because the CKEDITOR global is not anymore
// available. So, we check it here first. (#2923)
if ( typeof CKEDITOR != 'undefined' )
domObject.fire( eventName, new CKEDITOR.dom.event( domEvent ) );
};
}; 

Now,please tell what will i do to remove an error??


  1. Create a @property in your destination ViewController
  2. Assign segue identificator to it in -(void)prepareForSegue method:

    -(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if([segue.destinationViewController respondsToSelector:@selector(setMyIdentifier)]) { [segue.destinationViewController setMyIdentifier:segue.identifier]; } }

  3. Handle self.myIdentifier property in -viewDidLoad of your destination ViewController

4

0 回答 0