[ 2 posts ]

Seba

  • Username: SebaVDP
  • Joined: Sun May 06, 2012 9:38 am
  • Posts: 2
  • Offline
  • Profile
Tags:

editor: exception when using setEditorHTML method

Post Posted: Thu May 10, 2012 2:01 am
+0-
Hi,

I am trying to set content in the editor. I am using the setEditorHTML method, but it throws an exception.

Regards

Seba

Exception: this.getDoc().body is undefined (line 23)

code:
http://pastie.org/private/nacavzcgs0sr6lldyjvuw

Dav Glass

  • Username: davglass
  • Joined: Thu Aug 28, 2008 9:28 am
  • Posts: 2088
  • Location: Marion, IL, US
  • Twitter: davglass
  • GitHub: davglass
  • Gists: davglass
  • IRC: davglass
  • Offline
  • Profile
Tags:

Re: editor: exception when using setEditorHTML method

Post Posted: Thu May 10, 2012 5:12 am
+0-
You can't set the data until the editor is rendered:

Code:
myEditor.on('afterRender', function() {
     myEditor.setEditorHTML("bla<br />blabl11111");
});
  [ 2 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum