[TYPO3-RTE] tt_news and HTMLarea rendering issue
Tyler Kraft
headhunterxiii at yahoo.ca
Sat May 6 17:02:27 CEST 2006
Hi
Warning this is a long posting, and its on the rte news
group for help (also posted on main English group, and the
news group as it seems to predominantly effect that content,
and for any help possible ;-)
Ok, I'm not saying its a bug or where the issue actually
lies, but I do need help in solving a major problem! And
soon, as the client is loosing confidence in Typo3 rapidly....
Firstly the setup:
Typo3 V4.0 (although originally began development on
V4.0beta2), htmlarea 1.3.7 (originally 1.2.0), tt_news
2.2.24, with many other extensions used
Secondly the problem:
When we/client edit content we will have it formatted the
way we want it to be with properly used semantic markup
(h3-h6, p, ul, ol, li, etc) and then save it, and view on
the front end, where it looks exactly as we want and the way
it is in the RTE. Great - All's fine and we leave it. But
then if we look at it the next day (in some case days later)
it often will be rendered differently and have lost large
amounts of the formatting and no longer be structured
correctly. It will have often have one large P tag wrapping
around what should be and was many headlines, paragraphs and
lists suddenly. During this time no one will have made any
changes to the content and I have not altered the the system
at all in any way. It almost appears as if it just stops
rendering correctly on the front end for no apparent reason.
Yet some articles continue to look fine and render correctly.
And if I look at the source in the DB its fine. But if one
opens up the article and re-saves it, it will have
permanently lost many of the paragraph tags when it
re-enters the RTE, but it will return to the correct
rendering on the FE, with content sort of being rendered
correctly, and not nesting tags inside paragraphs. And then
looking at the DB again the content will have not changed
*at all* upon re-saving, but it will render totally different.
This seems to be an issue for only tt_news content (so far).
It behaved this way with the default RTE setup, so I
originally though it was due to needing tweaking of the RTE
setup, but that still has not solved the issue - nor has
upgrading the RTE from 1.2.0 to 1.3.7. Any help or
suggestion would be greatly appreciated.
Is it possible that this is related to posting
"[TYPO3-ttnews] htmlarea configuration has no effect in
tt_news" from Sacha Vorbeck on 30/03/2006?
Below is the RTE setup (installed as demo setting, with
images enabled), followed by the source code after it has
lost much of the formatting suddenly (I don't think anyone
needs to she what the desired source code should be like, as
we all know what correctly rendered content is ;-)
Thanks in advance for any help.
############### RTE 1.3.7 ~ BEGIN #################
RTE {
## Define labels and styles to be applied to class
selectors in the interface of the RTE. The examples included
here make partial re-use of color scheme and frame scheme
from CSS Styled Content extension
classes {
align-left {
name =
LLL:EXT:rtehtmlarea/htmlarea/locallang_tooltips.xml:justifyleft
value = text-align: left;
}
align-center {
name =
LLL:EXT:rtehtmlarea/htmlarea/locallang_tooltips.xml:justifycenter
value = text-align: center;
}
align-right {
name =
LLL:EXT:rtehtmlarea/htmlarea/locallang_tooltips.xml:justifyright
value = text-align: right;
}
}
## Anchor classes configuration for use by the anchor
accessibility feature (htmlArea RTE only)
classesAnchor {
externalLink {
class = external
type = url
image >
altText >
titleText >
}
externalLinkInNewWindow {
class = external
type = url
image >
altText >
titleText >
}
internalLink {
class = internal
type = page
image >
altText >
titleText >
}
internalLinkInNewWindow {
class = internal
type = page
image >
altText >
titleText >
}
download {
class = download
type = file
image >
altText >
titleText >
}
mail {
class = mail
type = mail
image >
altText >
titleText >
}
}
default {
skin = EXT:rtehtmlarea/htmlarea/skins/default/htmlarea.css
ignoreMainStyleOverride=1
## Use stylesheet file rather than mainStyleOverride and
inlineStyle properties to style the contents
contentCSS = fileadmin/template/resources/rtestyle.css
classesParagraph = align-left, align-center, align-right
classesImage = align-left, align-center, align-right
classesTable =
classesTD = align-left, align-center, align-right
classesCharacter =
classesLinks = external, internal, download, mail
classesAnchor = external, internal, download, mail
classesAnchor.default {
page = internal
url = external
file = download
mail = mail
}
disableContextMenu = 0
disableTYPO3Browsers = 0
disableSelectColor = 0
mainStyleOverride >
useCSS = 0
disableEnterParagraphs = 0
defaultLinkTarget =
enableWordClean = 1
removeTrailingBR = 1
removeComments = 1
removeTags = center, font, o:p, sdfield, strike
removeTagsAndContents = style,script
showButtons = *
showButtons >
showButtons = formatblock, bold, italic, underline,
orderedlist, unorderedlist, outdent, indent,
insertcharacter, image, link, removeformat, line, copy, cut,
paste, undo, redo, findreplace, left, center, right,
showhelp, acronym, spellcheck, subscript, superscript,
table, toggleborders, tableproperties, rowproperties,
rowinsertabove, rowinsertunder, rowdelete, rowsplit,
columninsertbefore, columninsertafter, columndelete,
columnsplit, cellproperties, cellinsertbefore,
cellinsertafter, celldelete, cellsplit, cellmerge, class
hideButtons = blockstylelabel, blockstyle, textstylelabel,
textstyle, fontstyle, fontsize, strikethrough, lefttoright,
righttoleft, justifyfull, textcolor, bgcolor, textindicator,
emoticon, user, inserttag, chMode, about
keepButtonGroupTogether = 1
showStatusBar = 1
showTagFreeClasses = 1
hidePStyleItems = pre,address,h1
hideTags = font, font (full), strike, center, pre, address
enablePersonalDicts = 1
hideTableOperationsInToolbar = 0
keepToggleBordersInToolbar = 1
disableAlignmentFieldsetInTableOperations = 0
disableSpacingFieldsetInTableOperations = 0
disableColorFieldsetInTableOperations = 1
disableLayoutFieldsetInTableOperations = 0
disableBordersFieldsetInTableOperations = 0
proc {
overruleMode = ts_css
dontConvBRtoParagraph = 1
remapParagraphTag = p
keepPDIVattribs = xml:lang, style, class
allowTagsOutside = img, table, tbody, thead, tfoot, td,
th, tr, tt, ul, ol, li, dl, dt, dd, blockquote, caption, img
allowTags = a, abbr, acronym, blockquote, b, br, caption,
cite, code, div, em, h2, h3, h4, h5, h6, hr, i, img, li,
link, nobr, ol, p, pre, q, sdfield, span, strong, sub, sup,
table, tbody, thead, tfoot, td, th, tr, tt, u, ul, dd, dl,
dt, caption
denyTags = pre, hr, address, sdfield, center, font, h1
## List all class selectors that are allowed on the way
to the database
allowedClasses = external, internal, download, mail,
align-left, align-center, align-right
entryHTMLparser_db = 1
entryHTMLparser_db {
allowTags < RTE.default.proc.allowTags
allowTagsOutside < RTE.default.proc.allowTagsOutside
denyTags < RTE.default.proc.denyTags
htmlSpecialChars = 0 ## AVOID TO HSC TWICE
removeTags = center, font, o:p, sdfield, strike, hr,
address, pre, h1
keepNonMatchedTags = protect
noAttrib = br,dl,dt,dd
## CLEAN TAGS
tags {
img >
span.fixAttrib.style.unset = 1
p.fixAttrib.align.unset=1
p.allowedAttribs = class,style
div.fixAttrib.align.unset = 1
hr.allowedAttribs = 0
hr.rmTagIfNoAttrib=1
b.allowedAttribs = xml:lang
blockquote.allowedAttribs = xml:lang
cite.allowedAttribs = xml:lang
em.allowedAttribs = xml:lang
i.allowedAttribs = xml:lang
q.allowedAttribs = xml:lang
strong.allowedAttribs = xml:lang
sub.allowedAttribs = xml:lang
sup.allowedAttribs = xml:lang
tt.allowedAttribs = xml:lang
}
}
HTMLparser_db {
## STRIP ALL ATTRIBUTES FROM THESE TAGS - If this list
of tags is not set, it will default to:
b,i,u,br,center,hr,sub,sup,strong,em,li,ul,ol,blockquote,strike.
However, we want to keep xml:lang attribute on most tags and
tags from the default list where cleaned on entry.
noAttrib = br
## XHTML COMPLIANCE - Note that applying xhtml_cleaning
on exit would break non-standard attributes of typolink tags
xhtml_cleaning = 1
}
exitHTMLparser_db = 1
exitHTMLparser_db {
allowTags < RTE.default.proc.allowTags
allowTagsOutside < RTE.default.proc.allowTagsOutside
denyTags < RTE.default.proc.denyTags
## REMAP B AND I TAGS - b and i tags are used by
Mozilla/Firefox in editing mode. This must be done on exit
because the default HTMLparser_db parsing executes the
reverse mapping.
tags.b.remap = strong
tags.i.remap = em
## KEEP ALL TAGS - Unwanted tags were removed on entry,
without this rule, the parser will remove all tags!
Presumably, this rule will be more efficient than repeating
the allowTags rule
keepNonMatchedTags = 1
htmlSpecialChars = 0 ## AVOID CONTENT BEING HSC'ed TWICE
}
} // close proc
} // close default
} // close RTE
## Use same processing as on entry to database to clean
content pasted into the editor
#RTE.default.enableWordClean.HTMLparser <
RTE.default.proc.entryHTMLparser_db
## tt_content RTE configuration
RTE.config.tt_content.bodytext >
RTE.config.tt_content.bodytext.proc.overruleMode = ts_css
RTE.config.tt_content.bodytext.types.text.proc.overruleMode
= ts_css
RTE.config.tt_content.bodytext.types.textpic.proc.overruleMode
= ts_css
## Use same RTE config in FE
RTE.default.FE < RTE.default
RTE.default.FE.showStatusBar = 0
RTE.default.FE.hideButtons = chMode
RTE.default.FE.userElements >
RTE.default.FE.userLinks >
RTE.default.FE.showButtons < RTE.default.showButtons
RTE.default.FE.proc.allowTagsOutside <
RTE.default.proc.allowTagsOutside
RTE.default.FE.proc.entryHTMLparser_db.tags.img >
## tt_content TCEFORM configuration
TCEFORM.tt_content.bodytext.RTEfullScreenWidth= 100%
############### RTE 1.3.7 ~ END #################
The rendered HTML (will lost/wrong formatting):
<div id="main"><!--TYPO3SEARCH_begin--><a id="c1"></a>
<div class="news-single-item">
<h1>OpenOffice.org 1.01 office suite</h1>
<span class="level"><img
src="fileadmin/template/resources/level1.gif" alt="Level"
width="45" height="19" class="valign" />Basic</span>
<p class="intro">OpenOffice.org is the open source, free
version of Sun Microsystems StarOffice suite. It was started
as a community project to be worked upon by a team of
volunteer developers back in 2000. With Microsoft Office
Standard edition costing around £100 per licensed copy for
charities, is OpenOffice.org the way to go for cash-strapped
organisations? In January 2003, Lasa's Information Systems
Team (IST) looked at the second release OpenOffice.org 1.01
and took the Writer application for a test drive...</p>
<p><h2>Open Source?</h2>
Open source software is a method of software development and
licensing and doesn't just mean you have access to the
source code for development purposes or that it's free.
Generally speaking, open source software requires the
distribution of the code, in a readable form, with the
application. Access to the code allows people to make
changes to the software, add features, or build other
applications that will work with it. They can distribute
these changes as long as the source code stays open. Open
source software is usually developed by a community of
people who are associated by interest in the project.
Changes, upgrades, and often the main application itself,
are made by people who are volunteering their time. They are
usually working for the end result - the ability to use a
tool that does what they need it to do - rather than for
financial gain. For more information see the <a
href="http://www.opensource.org/docs/definition.php"
class="external">open source definition</a> on the <a
href="http://www.opensource.org/" class="external">Open
Source Initiative (OSI) website</a>.
<h2>Getting OpenOffice.org </h2>
The suite is available as a 50Mb zip file download from <a
href="http://www.openoffice.org"
class="external">OpenOffice.org</a> and is also available on
CDROM from <a
href="http://distribution.openoffice.org/cdrom/sellers.html"
class="external">various outlets</a>. OpenOffice.org
1.01 (Ooo101 for short) will run on a PC with a Pentium or
compatible processor with a minimum of 64 MB <a
href="index.php?id=46&tx_a21glossary[uid]=60&tx_a21glossary[back]=4&cHash=6254a3a591"
class="glossary"><dfn title="Random Access
Memory">RAM</dfn></a> running Windows 95 or higher with
approximately 190 to 250 MB of free hard drive space. After
unzipping the files, installation is simple and painless -
clicking on setup.exe starts a familiar install wizard and
you are soon ready to run the applications.
<h3>What do you get?</h3>
<strong></strong> There are 5 component parts of Ooo101:
</p><ul><li>Writer, the word processor</li><li>Calc,
spreadsheet</li><li>Impress, presentations</li><li>Draw, for
graphics</li><li>Math for creating equations </li></ul><p>
What's missing from a comprehensive suite is a database and
an Outlook-style application. The Adabas database can,
however, be obtained if you purchase StarOffice instead
(around £45 per single user license which includes support).
But Adabas is not a simple database program to get your head
around especially if you've been used to Access. The lack of
an email client could possibly be addressed by use of one of
the other free clients such as the highly regarded Eudora or
Pegasus Mail or maybe the open source option like Phoenix
Mail. In addition, the <a href="http://www.mozilla.org/"
class="external">Mozilla</a> open source Web browser
includes its own email client and of course Microsoft's <a
href="index.php?id=46&tx_a21glossary[uid]=34&tx_a21glossary[back]=4&cHash=03ef4a3044"
class="glossary"><dfn>Internet</dfn></a> Explorer, which is
free, includes Outlook Express. This won't, however, give
you all the functionality of Outlook like the calendar, task
lists etc. In a networked environment you may need a mail
server but there are low cost alternatives to the ubiquitous
Exchange Server such as the shareware <a
href="http://www.pscs.co.uk/products/vpop3/"
class="external">VPOP3</a>, Ipswitch's <a
href="http://www.ipswitch.com/products/imail/index.asp"
class="external">Imail Server</a> or Eudora's <a
href="http://www.eudora.com/worldmail/"
class="external">WorldMail Server</a>.
<h2>Writer </h2>
As word processing is the most commonly used application, we
concentrated on looking at Writer and wrote this article
using it. Users familiar with Word or any other word
processing package shouldn't have too much trouble getting
their head around Writer. Typing up a fairly standard
document such as this article presented no real problems.
Most of the word processing features you are used to are
there : fonts, formatting, columns, mail merge, headers,
graphics, tables, spell check, etc. etc. Writer will save in
various formats including Word 6 onwards, native Ooo101 text
(.sxw - a zipped up XML) and template, text, rtf, web page
etc. Opening a Writer document saved in Word format in Word
produced slight formatting differences with bulleted lists,
for example, but no problem with a table with background
colours, merged and split cells. Opening a Word file in
Writer is generally OK but Word doesn't like opening .sxw
files though! This could lead to potential hazards when
exchanging files with other organisations who are likely to
be using Microsoft products. Whilst there were a number of
features that were liked in Writer they were outnumbered by
annoyances such as inconsistencies with Word's shortcuts,
formatting differences, lack of some familiar tool and mail
merges being hard work.
<h2>Should you go open source? </h2>
So, is it a viable alternative to the all-powerful Microsoft
suites for a small organisation? The pros are that the price
is right, it's fairly easy to use, and it does everything
(and more) that you're likely to want to do. If you are
uneasy about the stranglehold that Microsoft has over the
software industry - or are an active supporter of the open
source movement - then Ooo101 is going to appeal to you.
However, at the moment there are significant cons - for
example, at the time of writing there is little formal
training available for users. Whilst staff may be competent
in Word, say, they may require some cross-training and
that's just not around very much at the moment. Consequently
there's likely to be more pressure on internal support staff
(if you have them!) especially in the short term. The good
news is that at least one U.K. based IT training
organisation, <a href="http://www.happy.co.uk"
class="external">Happy Computers</a> is planning to run
courses on Star Office in the near future. <a
href="http://www.communitytechnology.org.uk/train/index.php"
class="external">Community Technology</a> also offer
training in OpenOffice and other open source software. If
you want to read about OpenOffice.org and train yourself,
again there are few OpenOffice books listed by Amazon
although there are a number planned for publication. The My
OpenOffice.org Resource Kit user's guide and CD by Solveig
Haughland and Floyd Jones is now available from sources
including <a
href="http://www.amazon.co.uk/exec/obidos/ASIN/0131407457/qid=1038357183/026-5704556-0205247"
class="external">amazon.co.uk</a>. You can also get a fairly
comprehensive 460 page manual if you buy StarOffice. At
present OpenOffice.org is more likely to find favour with
large organisations who don't want to go up the Microsoft
upgrade path anymore and can afford the luxury of having
in-house trainers and support staff. But for a download
which might cost you the price of a pint it could be just
what you're looking for - why not check it out for yourself?
<h2>More information</h2>
The latest version of OpenOffice.org, is available from the
<a href="http://www.openoffice.org"
class="external">OpenOffice.org website</a>. Version 2.02
contains new features and bug fixes. Visit the website for a
<a href="http://www.openoffice.org/product/"
class="external">product description</a>.For more on open
source issues see the knowledgebase articles "<a
href="news.php?id=230">Going with open source
software</a>" and <a href="news.php?id=231">Open source
is on the map</a>.
<h2>Non open source low priced alternatives </h2>
It might also be worth considering one of the other office
suites around if you don't want to go open source but still
want to save money. <a
href="http://www-142.ibm.com/software/sw-lotus/products/product2.nsf/wdocs/sshome"
class="external">Lotus Smartsuite</a> (v 9.8 includes Word
Pro, 1-2-3, Freelance, Approach, Smart Centre, Organiser and
Fast Site) - around £15 plus delivery at <a
href="http://www.amazon.co.uk/">Amazon.co.uk</a> (Apr 2006)</p>
<br class="clear" /><!--TYPO3SEARCH_end-->
</div>
More information about the TYPO3-project-rte
mailing list