On 5 Nov 2009, at 13:47, J. Tyler wrote:
> We are in the process of upgrading our current editor and replacing
> it with
> EditLive. One issue we just encountered is that our users have been
> placing
> style tags within the body of their html for years. EditLive
> realizes that
> a style tag should not be in the body and happily strips it out.
Actually, it doesn't strip it out, it moves it to the head section of
the document. The distinction turns out to be quite useful because
the style information isn't actually being lost and you can retrieve
it using the GetStyles call and it would also be included if you
retrieved the full document instead of just the body content. I
believe with the autosubmit architecture the styles are automatically
submitted in a field called editorName_styles (where editorName is the
field you'd get the main content from).
If you're happy to not follow standards, you can simply prepend the
styles information back onto the body. If you want to do it properly
you can store them in a separate database field and then output them
in the document head as appropriate. The only catch is that if you
have <sourceEditor showBodyOnly="true" /> the styles won't be shown in
code view because only the body content is being displayed. A
SourceFilter which put the styles back into the body would avoid that
since they run when switching views.
Regards,
Adrian Sutton.
______________________
Adrian Sutton, CTO
UK: +44 1 628 353 032 US: +1 (650) 292 9659 x717
Ephox
http://www.ephox.com/Ephox Blogs
http://planet.ephox.com/, Personal Blog
http://www.symphonious.net/_______________________________________________
[hidden email]
List instructions at
http://liveworks.ephox.com/mailing-list/