[ 9 posts ]

Jide Rotilu

  • Username: jider
  • Joined: Sun Aug 19, 2012 8:58 am
  • Posts: 6
  • Offline
  • Profile

YUI rich text editor not outputting font formats

Post Posted: Sun Aug 19, 2012 9:20 am
+0-
I am having a problem with YUI rich text editor out put. It only outputs raw text (default font, bold and normal) and strips out colors, highlighted regions, underlines, other font formats, font sizes and all other formatting. I have been searching on the solution but can't seem to find what is wrong. Your help would be appreciated.

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: YUI rich text editor not outputting font formats

Post Posted: Mon Aug 20, 2012 5:38 am
+0-
What version of Editor are you using? You posted your question in a Gallery forum (not the proper location) so I guessed and moved it to the YUI 3 forum.

Jide Rotilu

  • Username: jider
  • Joined: Sun Aug 19, 2012 8:58 am
  • Posts: 6
  • Offline
  • Profile
Tags:

Re: YUI rich text editor not outputting font formats

Post Posted: Mon Aug 20, 2012 5:45 am
+0-
thanks for the move DAv. Im using version 2.9.0, i have a sample on my weblink here, http://wedobigthin.gs/dkk3/ , you can try it out, (it does not output colors or any other r formatting apart from the standard bold/normal/italics.

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: YUI rich text editor not outputting font formats

Post Posted: Mon Aug 20, 2012 7:10 am
+0-
Editor is working properly. I can see from debugging it that Editor is putting the HTML into the textarea and submitting it:

Code:
"<strong><em><span style="text-decoration: underline;"><span style="color: #00ffff; ">This is a </span>test.</span></em></strong>"


However, it seems that your server must be stripping the content when it get's it. Check your server configuration.

Jide Rotilu

  • Username: jider
  • Joined: Sun Aug 19, 2012 8:58 am
  • Posts: 6
  • Offline
  • Profile
Tags:

Re: YUI rich text editor not outputting font formats

Post Posted: Mon Aug 20, 2012 9:00 am
+0-
Thanks Dav, I found out some slashes were being added to my textarea output thereby commenting out the html tags (for the formatting), I just stripped them out and its working now. Thanks alot.
I also need to know how to change the background of RTE's output to transparent. right now it is defaulted to white (from yui) and blocking my background in the email

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: YUI rich text editor not outputting font formats

Post Posted: Mon Aug 20, 2012 9:16 am
+0-
The RTE does not set a background on the output unless the user sets one. The HTML that Editor outputs (similar to my snippet above) does not contain a background color.

Jide Rotilu

  • Username: jider
  • Joined: Sun Aug 19, 2012 8:58 am
  • Posts: 6
  • Offline
  • Profile
Tags:

Re: YUI rich text editor not outputting font formats

Post Posted: Mon Aug 20, 2012 9:33 am
+0-
Hi Dav, look at the output im getting for a trial text, i did not set any background:white is displayed in the style

<p class="yiv1742780440msonormal" style="margin:0cm;margin-bottom:.0001pt;
background:white"><span style="color: #333333; font-family: sans-serif; line-height: 22px; ">I noticed that the background col</span><span style="background-color: #00ffff; "><span style="color: #333333; line-height: 22px; ">or of the table for the W<span style="color: #bfbf00; ">YSIWYG editor </span>is being styled with a white background, which looks strange in</span>&nbsp;<span style="color: #333333; line-height: 22px; ">I noticed that the background color of the table for the WYSIWYG editor is being styled with a white background, which looks stra</span></span><span style="color: #333333; font-family: sans-serif; line-height: 22px; ">nge</span></p>

Jide Rotilu

  • Username: jider
  • Joined: Sun Aug 19, 2012 8:58 am
  • Posts: 6
  • Offline
  • Profile
Tags:

Re: YUI rich text editor not outputting font formats

Post Posted: Mon Aug 20, 2012 10:08 am
+0-
seen the problem, It was a copy/paste from MSWORD that added the white background

Jide Rotilu

  • Username: jider
  • Joined: Sun Aug 19, 2012 8:58 am
  • Posts: 6
  • Offline
  • Profile
Tags:

Re: YUI rich text editor not outputting font formats

Post Posted: Mon Aug 20, 2012 10:18 am
+0-
i used a string replace to replace 'background:white' to 'background:transparent' in the message....lol, it works well too....thanks Dav
  [ 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