[ 9 posts ]

Ravi Narine

  • Username: zanvar
  • Joined: Fri Apr 17, 2009 7:10 am
  • Posts: 36
  • Location: Toronto, Canada
  • Offline
  • Profile
Tags:

Getting data from RTE

Post Posted: Thu Aug 06, 2009 9:07 am
+0-
Is this the correct way on getting the data from the RTE

editor.saveHTML();
editor.get('element').value;

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: Getting data from RTE

Post Posted: Thu Aug 06, 2009 9:11 am
+0-
var html = editor.saveHTML();
//html will contain the html that was put back into the text area.

var html2 = editor.get('element').value;
//html2 will contain the content of the textarea

Does that help?

Ravi Narine

  • Username: zanvar
  • Joined: Fri Apr 17, 2009 7:10 am
  • Posts: 36
  • Location: Toronto, Canada
  • Offline
  • Profile
Tags:

Re: Getting data from RTE

Post Posted: Thu Aug 06, 2009 9:22 am
+0-
When I do var html = editor.saveHTML(); alert(html);

it is displaying nothing;

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: Getting data from RTE

Post Posted: Thu Aug 06, 2009 9:23 am
+0-
Where are you calling that from? Post a link with a repro case & I will look at it..

Ravi Narine

  • Username: zanvar
  • Joined: Fri Apr 17, 2009 7:10 am
  • Posts: 36
  • Location: Toronto, Canada
  • Offline
  • Profile

Re: Getting data from RTE

Post Posted: Thu Aug 06, 2009 9:33 am
+0-
It will be difficult to give you a link to look at because the application is an internal one.

But i tried to put the relevant information in the follow gist

git://gist.github.com/163453.git

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

Re: Getting data from RTE

Post Posted: Thu Aug 06, 2009 9:36 am
+0-
You have a spelling error:

var html = editor.get('elememt').value;

Should be:

var html = editor.get('element').value;

Does that help?

Ravi Narine

  • Username: zanvar
  • Joined: Fri Apr 17, 2009 7:10 am
  • Posts: 36
  • Location: Toronto, Canada
  • Offline
  • Profile

Re: Getting data from RTE

Post Posted: Thu Aug 06, 2009 9:41 am
+0-
I fixed the spelling mistake and still nothing

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: Getting data from RTE

Post Posted: Thu Aug 06, 2009 10:00 am
+0-
I'm going to need a stripped down test page, I can't debug with what I see here..

The code looks to be fine, but it's hard to tell when I can't run the page and see it break..

Ravi Narine

  • Username: zanvar
  • Joined: Fri Apr 17, 2009 7:10 am
  • Posts: 36
  • Location: Toronto, Canada
  • Offline
  • Profile

Re: Getting data from RTE

Post Posted: Thu Aug 06, 2009 11:50 am
+0-
I figured out what my problem was.. I had 2 RTEs' on the page

Thanks
  [ 9 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