Forum closed. New forum available at http://community.wymeditor.org/

WYMEditor adds style to data

Support forum for WYMeditor.

WYMEditor adds style to data

Postby motylo on Tue Jun 30, 2009 1:07 pm

Hello,
I've got problem, maybe You can solve it (maybe there is the param to set):
sometimes when i copy/paste text it also adds
Code: Select all
<style type="text/css">
   <!--
      @page { size: 21cm 29.7cm; margin: 2cm }
      P { margin-bottom: 0.21cm }
   -->
</style>

to front of it. Sometimes it adds:
Code: Select all
<style type="text/css">
   <!--
      @page { size: 21cm 29.7cm; margin: 2cm }
      P { margin-bottom: 0.21cm }
      A:link { color: #000080; text-decoration: underline }
      A:visited { color: #800000; text-decoration: underline }
   -->
</style>

How can it be removed without use of PHP?

found, try it later: http://forum.wymeditor.org/forum/viewtopic.php?f=2&t=585

greetz
motylo
 
Posts: 3
Joined: Tue Jun 30, 2009 1:02 pm

Re: WYMEditor adds style to data

Postby motylo on Tue Jul 07, 2009 1:04 pm

Nothing has changed, adds to text:
Code: Select all
<style type="text/css">
   </style><style type="text/css"><!--
      @page { size: 21cm 29.7cm; margin: 2cm }
      P { margin-bottom: 0.21cm }
   --></style>


Should i use deletion of this code in php?
Can it be fixed in WYMEditor?
motylo
 
Posts: 3
Joined: Tue Jun 30, 2009 1:02 pm

Re: WYMEditor adds style to data

Postby mr_lundis on Thu Jul 09, 2009 8:13 pm

Hi!
WYMeditor does not add any styling to content you paste into the editor. The style element is most likely coming from wherever you're taking the content, or maybe the processing of the content done by your browser (or any other software) your using. The absolutely easiest way to fix it if you can't control the source would probably be some post-processing done on the server (using PHP or any other server side language).

Cheers! ;)
Jonatan Lundin - designer, developer and forum moderator. You should follow me on Twitter!
mr_lundis
 
Posts: 335
Joined: Sun Dec 02, 2007 10:59 am
Location: Sweden

Re: WYMEditor adds style to data

Postby motylo on Thu Jul 16, 2009 7:11 am

Thanks for the reply,

Found that this only happens when copy/paste from Open Office to Firefox.
Fixed by using regexp after post.
motylo
 
Posts: 3
Joined: Tue Jun 30, 2009 1:02 pm


Return to Support

Who is online

Users browsing this forum: No registered users and 2 guests