html - SP 2010 JavaScript Rich Text Editor Formatting -


i have been running around in circles on one. have custom list item edit form in sharepoint 2010, , have working except 1 thing; rich text fields.

i making web services call sp site, , returning value rich text column, , need to, js/jquery, set local rich text field value returned. when comes through web service call, formatted tokens, such &lt instead of <, , &quot instead of ".

if set html value of field on form equal returned value, field acutually displays html should set to, doesn't acutally format. it's text value being set html value.

here happening:

my code:

//this sets value myfield.html(returnfieldvalue('description')); 

^returnfieldvalue(field) function gets text return string getlistitems.

on source site (what i'm trying return):
quick brown fox jumps on lazy dog.

what return web service (getlistitems):

&ltdiv&gtthe quick &ltstrong&gt&ltfont color=&quot#800000&quot&gtbrown&lt/font&gt&gt fox jumps on &ltem&gt&ltstrong&gtlazy&lt/strong&gt&lt/em&gt dog.&lt/div&gt

^each of tags should have ';' after them.

what see after set local field's html returned value:

  &lt;div&gt;the quick &lt;strong&gt;&lt;font   color=&quot;#800000&quot;&gt;brown&lt;/font&gt;&gt; fox jumps on   &lt;em&gt;&lt;strong&gt;lazy&lt;/strong&gt;&lt;/em&gt;   dog.&lt;/div&gt; 

^^^ right here trouble. actual text displaying in box, rather html being rendered. think because of token formatting.

also, if pass in actual characters manually rather tokens, works. how can tokens symbols? appreciated... thank you!


Comments