* Added "rtehtmlarea" as a system extension
authorMichael Stucki <michael.stucki@typo3.org>
Wed, 28 Dec 2005 00:49:12 +0000 (00:49 +0000)
committerMichael Stucki <michael.stucki@typo3.org>
Wed, 28 Dec 2005 00:49:12 +0000 (00:49 +0000)
- Important notice: Because of a known bug, the buttons "blockstylelabel", "blockstyle", "textstylelabel" and "textstyle" will not work with this version.
* Fixed bug #1155: Install tool want to recreate the tables, and drop the old ones
* Fixed Gremlin #1690: nav_frame is sometimes out of sync with the selected page
* Various changes in t3lib_parsehtml_proc (on behalf of Stanislas Rolland):
- Allow style and xml:lang attributes on span tags
- Include "hr", "address" and "dl" in headListTags
- Avoid insertion of superfluous linebreaks by transform_db
- Eliminate true linebreaks inside Hx tags
- Convert linebreaks to spaces instead of deleting them
- Wrap a-tags that contain a style attribute with a span-tag
- Honor setting RTE.default.proc.HTMLparser_db.xhtml_cleaning=1

git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@955 709f56b5-9817-0410-a4d7-c38de5d9e867

377 files changed:
ChangeLog
NEWS.txt
t3lib/class.t3lib_browsetree.php
t3lib/class.t3lib_foldertree.php
t3lib/class.t3lib_install.php
t3lib/class.t3lib_parsehtml_proc.php
t3lib/class.t3lib_treeview.php
typo3/alt_db_navframe.php
typo3/alt_file_navframe.php
typo3/alt_main.php
typo3/class.db_list.inc
typo3/class.db_list_extra.inc
typo3/class.file_list.inc
typo3/db_list.php
typo3/file_list.php
typo3/sysext/cms/layout/db_layout.php
typo3/sysext/install/mod/class.tx_install.php
typo3/sysext/rtehtmlarea/ChangeLog [new file with mode: 0644]
typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_loremipsum_wiz.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/class.ux_t3lib_parsehtml_proc.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/conf.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/doc/manual.sxw [new file with mode: 0644]
typo3/sysext/rtehtmlarea/ext_conf_template.txt [new file with mode: 0644]
typo3/sysext/rtehtmlarea/ext_emconf.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/ext_icon.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/ext_localconf.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/ext_tables.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/ext_tables.sql [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/htmlarea-compressed.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/htmlarea-gecko-compressed.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/htmlarea-gecko.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/htmlarea-ie-compressed.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/htmlarea-ie.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/license.txt [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/locallang_dialogs.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/locallang_msg.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/locallang_tooltips.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/Acronym/acronym-compressed.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/Acronym/acronym.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/Acronym/locallang.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/CharacterMap/character-map-compressed.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/CharacterMap/character-map.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/CharacterMap/locallang.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/CharacterMap/popups/select_character.html [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/ContextMenu/context-menu-compressed.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/ContextMenu/context-menu.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/ContextMenu/locallang.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/DynamicCSS/dynamiccss-compressed.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/DynamicCSS/dynamiccss.css [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/DynamicCSS/dynamiccss.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/DynamicCSS/img/red_arrow_bullet.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/DynamicCSS/locallang.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/FindReplace/find-replace-compressed.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/FindReplace/find-replace.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/FindReplace/fr_engine.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/FindReplace/locallang.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/FindReplace/popups/find_replace.html [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/FullPage/lang/ro.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/InlineCSS/inlinecss-compressed.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/InlineCSS/inlinecss.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/InlineCSS/locallang.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/InsertSmiley/insert-smiley-compressed.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/InsertSmiley/insert-smiley.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/InsertSmiley/locallang.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/InsertSmiley/popups/insertsmiley.html [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/InsertSmiley/smileys/0001.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/InsertSmiley/smileys/0002.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/InsertSmiley/smileys/0003.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/InsertSmiley/smileys/0004.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/InsertSmiley/smileys/0005.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/InsertSmiley/smileys/0006.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/InsertSmiley/smileys/0007.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/InsertSmiley/smileys/0008.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/InsertSmiley/smileys/0009.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/InsertSmiley/smileys/0010.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/InsertSmiley/smileys/0011.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/InsertSmiley/smileys/0012.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/InsertSmiley/smileys/0013.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/InsertSmiley/smileys/0014.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/InsertSmiley/smileys/0015.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/InsertSmiley/smileys/0016.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/InsertSmiley/smileys/0017.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/InsertSmiley/smileys/0018.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/InsertSmiley/smileys/0019.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/InsertSmiley/smileys/0020.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/QuickTag/locallang.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/QuickTag/popups/quicktag.html [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/QuickTag/quick-tag-compressed.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/QuickTag/quick-tag.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/QuickTag/tag-lib.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/RemoveFormat/locallang.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/RemoveFormat/popups/removeformat.html [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/RemoveFormat/remove-format-compressed.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/RemoveFormat/remove-format.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/SelectColor/locallang.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/SelectColor/select-color-compressed.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/SelectColor/select-color.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/SpellChecker/locallang.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/SpellChecker/popups/spell-check-ui-iso-8859-1.html [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/SpellChecker/popups/spell-check-ui.html [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/SpellChecker/spell-check-logic.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/SpellChecker/spell-check-style.css [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/SpellChecker/spell-check-ui.html [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/SpellChecker/spell-check-ui.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/SpellChecker/spell-checker-compressed.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/SpellChecker/spell-checker.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Browsers/img/download.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Browsers/img/external_link.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Browsers/img/external_link_new_window.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Browsers/img/internal_link.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Browsers/img/internal_link_new_window.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Browsers/img/mail.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Browsers/locallang.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Browsers/typo3browsers-compressed.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Browsers/typo3browsers.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3HtmlParser/locallang.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3HtmlParser/typo3html-parser-compressed.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3HtmlParser/typo3html-parser.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/TableOperations/locallang.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/TableOperations/table-operations-compressed.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/TableOperations/table-operations.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/UserElements/locallang.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/UserElements/user-elements-compressed.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/plugins/UserElements/user-elements.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/popups/about.html [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/popups/blank.html [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/popups/editor_help.html [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/popups/insert_image.html [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/popups/insert_table.html [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/popups/link.html [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/popups/popup.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/popups/select_color.html [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/popupwin-compressed.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/popupwin.js [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/button-background.png [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/htmlarea-edited-content.css [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/htmlarea.css [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/Acronym/ed_acronym.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/CharacterMap/ed_charmap.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/FindReplace/ed_find.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/InsertSmiley/ed_smiley.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/QuickTag/ed_quicktag.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/RemoveFormat/ed_clean.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/SelectColor/CO-forecolor.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/SelectColor/CO-hilitecolor.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/SpellChecker/spell-check.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/TYPO3Browsers/ed_image.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/TYPO3Browsers/ed_link.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/TYPO3Browsers/ed_unlink.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/TableOperations/cell-delete.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/TableOperations/cell-insert-after.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/TableOperations/cell-insert-before.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/TableOperations/cell-merge.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/TableOperations/cell-prop.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/TableOperations/cell-split.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/TableOperations/col-delete.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/TableOperations/col-insert-after.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/TableOperations/col-insert-before.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/TableOperations/col-split.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/TableOperations/insert_table.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/TableOperations/row-delete.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/TableOperations/row-insert-above.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/TableOperations/row-insert-under.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/TableOperations/row-prop.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/TableOperations/row-split.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/TableOperations/table-prop.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/TableOperations/toggle-borders.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/UserElements/ed_user.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/ed_about.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/ed_align_center.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/ed_align_justify.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/ed_align_left.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/ed_align_right.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/ed_blank.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/ed_color_bg.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/ed_color_fg.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/ed_copy.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/ed_custom.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/ed_cut.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/ed_delete.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/ed_format_bold.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/ed_format_italic.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/ed_format_strike.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/ed_format_sub.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/ed_format_sup.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/ed_format_underline.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/ed_help.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/ed_hr.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/ed_html.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/ed_image.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/ed_indent_less.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/ed_indent_more.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/ed_left_to_right.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/ed_link.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/ed_list_bullet.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/ed_list_num.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/ed_paste.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/ed_redo.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/ed_right_to_left.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/ed_splitblock.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/ed_splitcel.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/ed_undo.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/ed_unlink.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/images/insert_table.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/blue-look/separator.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/htmlarea-edited-content.css [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/htmlarea.css [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/Acronym/ed_acronym.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/CharacterMap/ed_charmap.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/FindReplace/ed_find.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/InsertSmiley/ed_smiley.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/QuickTag/ed_quicktag.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/RemoveFormat/ed_clean.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/SelectColor/CO-forecolor.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/SelectColor/CO-hilitecolor.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/SpellChecker/spell-check.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/TYPO3Browsers/ed_image.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/TYPO3Browsers/ed_link.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/TableOperations/cell-delete.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/TableOperations/cell-insert-after.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/TableOperations/cell-insert-before.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/TableOperations/cell-merge.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/TableOperations/cell-prop.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/TableOperations/cell-split.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/TableOperations/col-delete.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/TableOperations/col-insert-after.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/TableOperations/col-insert-before.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/TableOperations/col-split.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/TableOperations/insert_table.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/TableOperations/row-delete.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/TableOperations/row-insert-above.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/TableOperations/row-insert-under.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/TableOperations/row-prop.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/TableOperations/row-split.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/TableOperations/table-prop.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/TableOperations/toggle-borders.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/UserElements/ed_user.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/ed_about.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/ed_align_center.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/ed_align_justify.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/ed_align_left.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/ed_align_right.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/ed_blank.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/ed_color_bg.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/ed_color_fg.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/ed_copy.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/ed_custom.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/ed_cut.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/ed_delete.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/ed_format_bold.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/ed_format_italic.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/ed_format_strike.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/ed_format_sub.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/ed_format_sup.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/ed_format_underline.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/ed_help.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/ed_hr.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/ed_html.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/ed_image.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/ed_indent_less.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/ed_indent_more.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/ed_left_to_right.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/ed_link.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/ed_list_bullet.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/ed_list_num.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/ed_paste.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/ed_redo.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/ed_right_to_left.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/ed_save.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/ed_splitblock.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/ed_splitcel.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/ed_undo.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/ed_unlink.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/fullscreen_maximize.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/fullscreen_minimize.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/default/images/insert_table.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/back.png [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/button-background.png [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/hover.png [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/htmlarea-edited-content.css [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/htmlarea.css [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/Acronym/ed_acronym.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/CharacterMap/ed_charmap.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/FindReplace/ed_find.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/InsertSmiley/ed_smiley.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/QuickTag/ed_quicktag.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/RemoveFormat/ed_clean.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/SelectColor/CO-forecolor.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/SelectColor/CO-hilitecolor.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/SpellChecker/spell-check.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/TYPO3Browsers/ed_image.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/TYPO3Browsers/ed_link.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/TYPO3Browsers/ed_unlink.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/TableOperations/cell-delete.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/TableOperations/cell-insert-after.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/TableOperations/cell-insert-before.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/TableOperations/cell-merge.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/TableOperations/cell-prop.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/TableOperations/cell-split.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/TableOperations/col-delete.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/TableOperations/col-insert-after.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/TableOperations/col-insert-before.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/TableOperations/col-split.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/TableOperations/insert_table.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/TableOperations/row-delete.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/TableOperations/row-insert-above.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/TableOperations/row-insert-under.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/TableOperations/row-prop.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/TableOperations/row-split.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/TableOperations/table-prop.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/TableOperations/toggle-borders.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/UserElements/ed_user.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/ed_about.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/ed_align_center.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/ed_align_justify.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/ed_align_left.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/ed_align_right.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/ed_blank.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/ed_color_bg.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/ed_color_fg.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/ed_copy.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/ed_custom.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/ed_cut.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/ed_delete.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/ed_format_bold.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/ed_format_italic.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/ed_format_strike.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/ed_format_sub.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/ed_format_sup.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/ed_format_underline.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/ed_help.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/ed_hr.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/ed_html.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/ed_image.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/ed_indent_less.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/ed_indent_more.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/ed_left_to_right.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/ed_link.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/ed_list_bullet.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/ed_list_num.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/ed_paste.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/ed_redo.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/ed_right_to_left.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/ed_splitblock.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/ed_splitcel.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/ed_undo.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/ed_unlink.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/images/insert_table.gif [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/selected.png [new file with mode: 0644]
typo3/sysext/rtehtmlarea/htmlarea/skins/xp-blue/separator.png [new file with mode: 0644]
typo3/sysext/rtehtmlarea/locallang.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/locallang_db.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/locallang_rtehtmlarea_acronym.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/locallang_rtehtmlarea_browse_links.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/locallang_rtehtmlarea_select_image.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/locallang_rtehtmlarea_user.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/pageTSConfigAdvanced.txt [new file with mode: 0644]
typo3/sysext/rtehtmlarea/pageTSConfigDemo.txt [new file with mode: 0644]
typo3/sysext/rtehtmlarea/pageTSConfigImage.txt [new file with mode: 0644]
typo3/sysext/rtehtmlarea/pageTSConfigProc.txt [new file with mode: 0644]
typo3/sysext/rtehtmlarea/pageTSConfigTypical.txt [new file with mode: 0644]
typo3/sysext/rtehtmlarea/pi1/class.tx_rtehtmlarea_pi1.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/pi1/locallang.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/pi2/class.tx_rtehtmlarea_pi2.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/pi2/locallang.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/rtehtmlarea_acronym.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/rtehtmlarea_browse_links.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/rtehtmlarea_parse_html.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/rtehtmlarea_select_image.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/rtehtmlarea_user.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/t3_popup.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/tca.php [new file with mode: 0644]
typo3/sysext/rtehtmlarea/userTSConfigAdvanced.txt [new file with mode: 0644]
typo3/sysext/rtehtmlarea/userTSConfigDemo.txt [new file with mode: 0644]
typo3/sysext/rtehtmlarea/userTSConfigTypical.txt [new file with mode: 0644]

index 22d8b07..5bcee67 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,20 @@
+2005-12-28  Michael Stucki  <michael@typo3.org>
+
+       * Added "rtehtmlarea" as a system extension
+               - Important notice: Because of a known bug, the buttons "blockstylelabel", "blockstyle", "textstylelabel" and "textstyle" will not work with this version.
+       * Fixed bug #1155: Install tool want to recreate the tables, and drop the old ones
+       * Fixed Gremlin #1690: nav_frame is sometimes out of sync with the selected page
+       * Various changes in t3lib_parsehtml_proc (on behalf of Stanislas Rolland):
+               - Allow style and xml:lang attributes on span tags
+               - Include "hr", "address" and "dl" in headListTags
+               - Avoid insertion of superfluous linebreaks by transform_db
+               - Eliminate true linebreaks inside Hx tags
+               - Convert linebreaks to spaces instead of deleting them
+               - Wrap a-tags that contain a style attribute with a span-tag
+               - Honor setting RTE.default.proc.HTMLparser_db.xhtml_cleaning=1
+
 2005-12-27  Bernhard Kraft  <kraftb@kraftb.at>
+
        * Fixed bug #1685 partly: replaced ereg calls with preg pendants in t3lib_parsehtml.php and made some minor modifications to improve overall speed (report bugs with inproperly replaced markers or subparts with previously working setup or TV problems with HTML templates having no problems before at http://bugs.typo3.org/view.php?id=1685)
 
 2005-12-27  Dmitry Dulepov  <typo3@accio.lv>
index 1790f03..a53805f 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -47,4 +47,4 @@ Accessibility
 Speed
 =====
 
-  * HTML Parsing class got a speed improvement (faster preg instead of ereg, report bugs with inproperly replaced markers or subparts with previously working setup or TV problems with HTML templates having no problems before at http://bugs.typo3.org/view.php?id=1685)
+  * HTML Parsing class got a speed improvement (use faster preg instead of ereg, report bugs with inproperly replaced markers or subparts with previously working setup or TV problems with HTML templates having no problems before at http://bugs.typo3.org/view.php?id=1685)
index 9798af2..8cc9995 100755 (executable)
@@ -124,7 +124,7 @@ class t3lib_browseTree extends t3lib_treeView {
                if (!$this->ext_IconMode)       {
                        $theIcon = $GLOBALS['TBE_TEMPLATE']->wrapClickMenuOnIcon($theIcon,$this->treeName,$this->getId($row),0);
                } elseif (!strcmp($this->ext_IconMode,'titlelink'))     {
-                       $aOnClick = 'return jumpTo(\''.$this->getJumpToParam($row).'\',this,\''.$this->domIdPrefix.$this->getId($row).'_'.$this->bank.'\');';
+                       $aOnClick = 'return jumpTo(\''.$this->getJumpToParam($row).'\',this,\''.$this->domIdPrefix.$this->getId($row).'\','.$this->bank.');';
                        $theIcon='<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.$theIcon.'</a>';
                }
                return $theIcon;
index 1c003ed..04f8eb9 100755 (executable)
@@ -112,7 +112,7 @@ class t3lib_folderTree extends t3lib_treeView  {
                if (!$this->ext_IconMode)       {
                        $theFolderIcon = $GLOBALS['TBE_TEMPLATE']->wrapClickMenuOnIcon($theFolderIcon,$row['path'],'',0);
                } elseif (!strcmp($this->ext_IconMode,'titlelink'))     {
-                       $aOnClick = 'return jumpTo(\''.$this->getJumpToParam($row).'\',this,\''.$this->domIdPrefix.$this->getId($row).'_'.$this->bank.'\');';
+                       $aOnClick = 'return jumpTo(\''.$this->getJumpToParam($row).'\',this,\''.$this->domIdPrefix.$this->getId($row).'\','.$this->bank.');';
                        $theFolderIcon='<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.$theFolderIcon.'</a>';
                }
                return $theFolderIcon;
@@ -128,7 +128,7 @@ class t3lib_folderTree extends t3lib_treeView  {
         * @access private
         */
        function wrapTitle($title,$row,$bank=0) {
-               $aOnClick = 'return jumpTo(\''.$this->getJumpToParam($row).'\',this,\''.$this->domIdPrefix.$this->getId($row).'_'.$bank.'\');';
+               $aOnClick = 'return jumpTo(\''.$this->getJumpToParam($row).'\',this,\''.$this->domIdPrefix.$this->getId($row).'\','.$bank.');';
                $CSM = '';
                if ($GLOBALS['TYPO3_CONF_VARS']['BE']['useOnContextMenuHandler'])       {
                        $CSM = ' oncontextmenu="'.htmlspecialchars($GLOBALS['TBE_TEMPLATE']->wrapClickMenuOnIcon('',$row['path'],'',0,'','',TRUE)).'"';
index eaac330..b2344b0 100755 (executable)
@@ -279,7 +279,7 @@ class t3lib_install {
                                if (!$isTable)  {
                                        $parts = explode(' ',$value);
                                        if ($parts[0]=='CREATE' && $parts[1]=='TABLE')  {
-                                               $isTable = $parts[2];
+                                               $isTable = str_replace( '`', '', $parts[2]);
                                                if (TYPO3_OS=='WIN') {  // tablenames are always lowercase on windows!
                                                        $isTable = strtolower($isTable);
                                                }
@@ -305,11 +305,16 @@ class t3lib_install {
                                                $parts[1] = preg_replace('/(.*) (default .*) (NOT NULL)/', '$1 $3 $2', $parts[1]);
                                                $parts[1] = preg_replace('/(.*) (default .*) (NULL)/', '$1 $3 $2', $parts[1]);
 
+                                                       // Remove double blanks
+                                               $parts[1] = preg_replace('/([^ ]+)[ ]+([^ ]+)/', '$1 $2', $parts[1]);
+
                                                if ($parts[0]!='PRIMARY' && $parts[0]!='KEY' && $parts[0]!='UNIQUE')    {
-                                                       $total[$isTable]['fields'][$parts[0]] = $parts[1];
+                                                       $key = str_replace('`', '', $parts[0]);
+                                                       $total[$isTable]['fields'][$key] = $parts[1];
                                                } else {
                                                        $newParts = explode(' ',$parts[1],2);
-                                                       $total[$isTable]['keys'][($parts[0]=='PRIMARY'?$parts[0]:$newParts[0])] = $lineV;
+                                                       $key = str_replace('`', '', ($parts[0]=='PRIMARY'?$parts[0]:$newParts[0]));
+                                                       $total[$isTable]['keys'][$key] = str_replace('`', '', $lineV);
                                                }
                                        }
                                }
@@ -434,7 +439,8 @@ class t3lib_install {
                                                $keyTypes = explode(',','fields,keys');
                                                foreach($keyTypes as $theKey)   {
                                                        if (is_array($info[$theKey]))   {
-                                                               foreach($info[$theKey] as $fieldN => $fieldC) {
+                                                               foreach($info[$theKey] as $fieldN => $fieldC)   {
+                                                                       $fieldN = str_replace('`','',$fieldN);
                                                                        if (!isset($FDcomp[$table][$theKey][$fieldN]))  {
                                                                                $extraArr[$table][$theKey][$fieldN] = $fieldC;
                                                                        } elseif (strcmp($FDcomp[$table][$theKey][$fieldN], $fieldC))   {
@@ -496,7 +502,7 @@ class t3lib_install {
                                                                                $statement = 'ALTER TABLE '.$table.' ADD '.$fN.' '.$fV.';';
                                                                                $statements['add'][md5($statement)] = $statement;
                                                                        }
-                                                               } elseif ($theKey=='diff') {
+                                                               } elseif ($theKey=='diff')      {
                                                                        $statement = 'ALTER TABLE '.$table.' CHANGE '.$fN.' '.$fN.' '.$fV.';';
                                                                        $statements['change'][md5($statement)] = $statement;
                                                                        $statements['change_currentValue'][md5($statement)] = $diffArr['diff_currentValues'][$table]['fields'][$fN];
@@ -507,11 +513,7 @@ class t3lib_install {
                                        if (is_array($info['keys']))    {
                                                foreach($info['keys'] as $fN => $fV) {
                                                        if ($info['whole_table'])       {
-                                                               if ($fN=='PRIMARY')     {
-                                                                       $whole_table[] = $fV;
-                                                               } else {
-                                                                       $whole_table[] = $fV;
-                                                               }
+                                                               $whole_table[] = $fV;
                                                        } else {
                                                                if ($theKey=='extra')   {
                                                                        if ($remove)    {
@@ -724,8 +726,8 @@ class t3lib_install {
                                }
                                $out[]='
                                        <tr>
-                                               <td valign="top"><input type="checkbox" id="'.$this->dbUpdateCheckboxPrefix.'['.$key.']" name="'.$this->dbUpdateCheckboxPrefix.'['.$key.']" value="1"'.($checked?' checked="checked"':'').' /></td>
-                                               <td nowrap="nowrap"><label for="'.$this->dbUpdateCheckboxPrefix.'['.$key.']">'.nl2br($ico.htmlspecialchars($string)).'</label></td>
+                                               <td valign="top"><input type="checkbox" id="db-'.$key.'" name="'.$this->dbUpdateCheckboxPrefix.'['.$key.']" value="1"'.($checked?' checked="checked"':'').' /></td>
+                                               <td nowrap="nowrap"><label for="db-'.$key.'">'.nl2br($ico.htmlspecialchars($string)).'</label></td>
                                        </tr>';
                                if (isset($currentValue[$key])) {
                                        $out[]='
index 55670fe..0658e1e 100755 (executable)
@@ -102,7 +102,7 @@ require_once (PATH_t3lib.'class.t3lib_parsehtml.php');
 class t3lib_parsehtml_proc extends t3lib_parsehtml {
 
                // Static:
-       var $headListTags = 'PRE,UL,OL,H1,H2,H3,H4,H5,H6';              // List of tags for header, pre and list containers
+       var $headListTags = 'PRE,UL,OL,H1,H2,H3,H4,H5,H6,HR,ADDRESS,DL';        // List of tags for these elements
 
                // Internal, static:
        var $recPid = 0;                                // Set this to the pid of the record manipulated by the class.
@@ -791,6 +791,12 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
                $cc=0;
                $aC = count($blockSplit);
 
+                       // Avoid superfluous linebreaks by transform_db after ending headListTag
+               while($aC && !strcmp(trim($blockSplit[$aC-1]),''))      {
+                       unset($blockSplit[$aC-1]);
+                       $aC = count($blockSplit);
+               }
+
                        // Traverse the blocks
                foreach($blockSplit as $k => $v)        {
                        $cc++;
@@ -822,14 +828,14 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
                                                                $blockSplit[$k]='<typolist'.$params.'>'.chr(10).implode(chr(10),$parts).chr(10).'</typolist>'.$lastBR;
                                                        }
                                                } else {
-                                                       $blockSplit[$k].=$lastBR;
+                                                       $blockSplit[$k]=$this->transformStyledATags($blockSplit[$k]).$lastBR;
                                                }
                                        break;
                                        case 'table':   // Tables are NOT allowed in any form (unless preserveTables is set or CSS is the mode)
                                                if (!$this->procOptions['preserveTables'] && !$css)     {
                                                        $blockSplit[$k]=$this->TS_transform_db($this->removeTables($blockSplit[$k]));
                                                } else {
-                                                       $blockSplit[$k]=str_replace(chr(10),'',$blockSplit[$k]).$lastBR;
+                                                       $blockSplit[$k]=str_replace(chr(10),' ',$this->transformStyledATags($blockSplit[$k])).$lastBR;
                                                }
                                        break;
                                        case 'h1':
@@ -863,16 +869,18 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
                                                                                                $lastBR;
                                                        }
                                                } else {
-                                                       $blockSplit[$k].=$lastBR;
+                                                               // Eliminate true linebreaks inside Hx tags
+                                                       $blockSplit[$k]=str_replace(chr(10),' ',$this->transformStyledATags($blockSplit[$k])).$lastBR;
                                                }
                                        break;
                                        default:
-                                               $blockSplit[$k].=$lastBR;
+                                               $blockSplit[$k]=$this->transformStyledATags($blockSplit[$k]).$lastBR;
                                        break;
                                }
                        } else {        // NON-block:
                                if (strcmp(trim($blockSplit[$k]),''))   {
-                                       $blockSplit[$k]=$this->divideIntoLines($blockSplit[$k]).$lastBR;
+                                       $blockSplit[$k]=$this->divideIntoLines(str_replace(chr(10),' ',$blockSplit[$k])).$lastBR;
+                                       $blockSplit[$k]=$this->transformStyledATags($blockSplit[$k]);
                                } else unset($blockSplit[$k]);
                        }
                }
@@ -882,6 +890,29 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
        }
 
        /**
+        * Wraps a-tags that contain a style attribute with a span-tag
+        *
+        * @param       string          Content input
+        * @return      string          Content output
+        */
+       function transformStyledATags($value)   {
+               $blockSplit = $this->splitIntoBlock('A',$value);
+               foreach($blockSplit as $k => $v)        {
+                       if ($k%2)       {       // If an A-tag was found:
+                               $attribArray = $this->get_tag_attributes_classic($this->getFirstTag($v),1);
+                               if ($attribArray['style'])      {       // If "style" attribute is set!
+                                       $attribArray_copy['style'] = $attribArray['style'];
+                                       unset($attribArray['style']);
+                                       $bTag='<span '.t3lib_div::implodeAttributes($attribArray_copy,1).'><a '.t3lib_div::implodeAttributes($attribArray,1).'>';
+                                       $eTag='</a></span>';
+                                       $blockSplit[$k] = $bTag.$this->removeFirstAndLastTag($blockSplit[$k]).$eTag;
+                               }
+                       }
+               }
+               return implode('',$blockSplit);
+       }
+
+       /**
         * Transformation handler: 'ts_transform' + 'css_transform' / direction: "rte"
         * Set (->rte) for standard content elements (ts)
         *
@@ -1015,7 +1046,13 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
                $kUknown = $this->procOptions['dontRemoveUnknownTags_db'] ? 1 : 0;              // Default: remove unknown tags.
                $hSC = $this->procOptions['dontUndoHSC_db'] ? 0 : -1;                                   // Default: re-convert literals to characters (that is &lt; to <)
 
-               return $this->HTMLcleaner($content,$keepTags,$kUknown,$hSC);
+                       // Create additional configuration in order to honor the setting RTE.default.proc.HTMLparser_db.xhtml_cleaning=1
+               $addConfig=array();
+               if ((is_array($this->procOptions['HTMLparser_db.']) && $this->procOptions['HTMLparser_db.']['xhtml_cleaning']) || (is_array($this->procOptions['entryHTMLparser_db.']) && $this->procOptions['entryHTMLparser_db.']['xhtml_cleaning']) || (is_array($this->procOptions['exitHTMLparser_db.']) && $this->procOptions['exitHTMLparser_db.']['xhtml_cleaning']))   {
+                       $addConfig['xhtml']=1;
+               }
+
+               return $this->HTMLcleaner($content,$keepTags,$kUknown,$hSC,$addConfig);
         }
 
        /**
@@ -1068,7 +1105,7 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
                                        if (isset($keepTags['span']))           {
                                                $classes=array_merge(array(''),$this->allowedClasses);
                                                $keepTags['span']=array(
-                                                       'allowedAttribs'=>'class',
+                                                       'allowedAttribs' => 'class,style,xml:lang',
                                                        'fixAttrib' => Array(
                                                                'class' => Array (
                                                                        'list' => $classes,
index bf9cad4..1051408 100755 (executable)
@@ -509,7 +509,7 @@ class t3lib_treeView {
         * @access private
         */
        function wrapTitle($title,$row,$bank=0) {
-               $aOnClick = 'return jumpTo(\''.$this->getJumpToParam($row).'\',this,\''.$this->domIdPrefix.$this->getId($row).'_'.$bank.'\');';
+               $aOnClick = 'return jumpTo(\''.$this->getJumpToParam($row).'\',this,\''.$this->domIdPrefix.$this->getId($row).'\','.$bank.');';
                return '<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.$title.'</a>';
        }
 
index 1748d33..c09ea32 100755 (executable)
@@ -151,7 +151,7 @@ class localPageTree extends t3lib_browseTree {
         * @access private
         */
        function wrapTitle($title,$row,$bank=0) {
-               $aOnClick = 'return jumpTo(\''.$this->getJumpToParam($row).'\',this,\''.$this->domIdPrefix.$this->getId($row).'_'.$bank.'\');';
+               $aOnClick = 'return jumpTo(\''.$this->getJumpToParam($row).'\',this,\''.$this->domIdPrefix.$this->getId($row).'\','.$bank.');';
                $CSM = '';
                if ($GLOBALS['TYPO3_CONF_VARS']['BE']['useOnContextMenuHandler'])       {
                        $CSM = ' oncontextmenu="'.htmlspecialchars($GLOBALS['TBE_TEMPLATE']->wrapClickMenuOnIcon('','pages',$row['uid'],0,'&bank='.$this->bank,'',TRUE)).'"';
@@ -236,8 +236,9 @@ class SC_alt_db_navframe {
        ($this->currentSubScript?'top.currentSubScript=unescape("'.rawurlencode($this->currentSubScript).'");':'').'
 
                // Function, loading the list frame from navigation tree:
-       function jumpTo(id,linkObj,highLightID) {       //
+       function jumpTo(id,linkObj,highLightID,bank)    {
                var theUrl = top.TS.PATH_typo3+top.currentSubScript+"?id="+id;
+               top.fsMod.currentBank = bank;
 
                if (top.condensedMode)  {
                        top.content.document.location=theUrl;
@@ -245,7 +246,7 @@ class SC_alt_db_navframe {
                        parent.list_frame.document.location=theUrl;
                }
 
-               '.($this->doHighlight?'hilight_row("web",highLightID);':'').'
+               '.($this->doHighlight?'hilight_row("web",highLightID+"_"+bank);':'').'
 
                '.(!$GLOBALS['CLIENT']['FORMSTYLE'] ? '' : 'if (linkObj) {linkObj.blur();}').'
                return false;
index d351d2b..17ad86b 100755 (executable)
@@ -109,8 +109,9 @@ class SC_alt_file_navframe {
        ($this->currentSubScript?'top.currentSubScript=unescape("'.rawurlencode($this->currentSubScript).'");':'').'
 
                // Function, loading the list frame from navigation tree:
-       function jumpTo(id,linkObj,highLightID) {       //
+       function jumpTo(id,linkObj,highLightID,bank)    {       //
                var theUrl = top.TS.PATH_typo3+top.currentSubScript+"?id="+id;
+               top.fsMod.currentBank = bank;
 
                if (top.condensedMode)  {
                        top.content.document.location=theUrl;
@@ -118,7 +119,7 @@ class SC_alt_file_navframe {
                        parent.list_frame.document.location=theUrl;
                }
 
-        '.($this->doHighlight?'hilight_row("file",highLightID);':'').'
+        '.($this->doHighlight?'hilight_row("file",highLightID+"_"+bank);':'').'
                '.(!$CLIENT['FORMSTYLE'] ? '' : 'if (linkObj) {linkObj.blur();}').'
                return false;
        }
index 622961d..55b7886 100755 (executable)
@@ -357,6 +357,7 @@ class SC_alt_main {
                this.recentIds=new Array();                                     // used by frameset modules to track the most recent used id for list frame.
                this.navFrameHighlightedID=new Array();         // used by navigation frames to track which row id was highlighted last time
                this.currentMainLoaded="";
+               this.currentBank="0";
        }
        var fsMod = new fsModules();
        '.$fsMod.'
index 7b9a3d3..eec2ab3 100755 (executable)
@@ -581,7 +581,7 @@ class recordList extends t3lib_recordList {
                        default:
                                        // Output the label now:
                                if ($table=='pages')    {
-                                       $code = '<a href="'.htmlspecialchars($this->listURL($uid,'')).'">'.$code.'</a>';
+                                       $code = '<a href="'.htmlspecialchars($this->listURL($uid,'')).'" onclick="setHighlight('.$uid.')">'.$code.'</a>';
                                } else {
                                        $code = $this->linkUrlMail($code,$origCode);
                                }
index 5487a82..21d4665 100755 (executable)
@@ -246,7 +246,7 @@ class localRecordList extends recordList {
 
                                // Setting title of page + the "Go up" link:
                        $theData[$titleCol].='<br /><span title="'.htmlspecialchars($row['_thePathFull']).'">'.htmlspecialchars(t3lib_div::fixed_lgd_cs($row['_thePath'],-$this->fixedL)).'</span>';
-                       $theData['up'][]='<a href="'.htmlspecialchars($this->listURL($row['pid'])).'">'.
+                       $theData['up'][]='<a href="'.htmlspecialchars($this->listURL($row['pid'])).'" onclick="setHighlight('.$row['pid'].')">'.
                                                        '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/i/pages_up.gif','width="18" height="16"').' title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.upOneLevel',1).'" alt="" />'.
                                                        '</a>';
 
@@ -434,7 +434,7 @@ class localRecordList extends recordList {
                                        }
                                }
                        } else {
-                               $theUpIcon = ($table=='pages'&&$this->id&&isset($this->pageRow['pid'])) ? '<a href="'.htmlspecialchars($this->listURL($this->pageRow['pid'])).'"><img'.t3lib_iconWorks::skinImg('','gfx/i/pages_up.gif','width="18" height="16"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.upOneLevel',1).'" alt="" /></a>':'';
+                               $theUpIcon = ($table=='pages'&&$this->id&&isset($this->pageRow['pid'])) ? '<a href="'.htmlspecialchars($this->listURL($this->pageRow['pid'])).'" onclick="setHighlight('.$this->pageRow['pid'].')"><img'.t3lib_iconWorks::skinImg('','gfx/i/pages_up.gif','width="18" height="16"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.upOneLevel',1).'" alt="" /></a>':'';
                                $out.=$this->addelement(1,$theUpIcon,$theData,' class="c-headLineTable"','');
                        }
 
index f2a7aa2..33c35a9 100755 (executable)
@@ -235,7 +235,7 @@ class fileList extends t3lib_recordList {
 
                        // Directories are added
                $iOut = '';
-               $iOut.= $this->formatDirList($dirs,$titleCol);
+               $iOut.= $this->formatDirList($dirs);
 
                if (count($dirs['sorting']))    {
                                // half line is drawn
@@ -367,12 +367,13 @@ class fileList extends t3lib_recordList {
         */
        function linkWrapDir($code,$path)       {
                $href = $this->script.'?id='.rawurlencode($path);
+               $onclick = ' onclick="'.htmlspecialchars('top.content.nav_frame.hilight_row("file","folder'.t3lib_div::md5int($path).'_"+top.fsMod.currentBank)').'"';
 
                        // Sometimes $code contains plain HTML tags. In such a case the string should not be modified!
                if(!strcmp($code,strip_tags($code)))    {
-                       return '<a href="'.htmlspecialchars($href).'" title="'.htmlspecialchars($code).'">'.t3lib_div::fixed_lgd($code,$this->fixedL).'</a>';
+                       return '<a href="'.htmlspecialchars($href).'"'.$onclick.' title="'.htmlspecialchars($code).'">'.t3lib_div::fixed_lgd($code,$this->fixedL).'</a>';
                } else  {
-                       return '<a href="'.htmlspecialchars($href).'">'.$code.'</a>';
+                       return '<a href="'.htmlspecialchars($href).'"'.$onclick.'>'.$code.'</a>';
                }
        }
 
index 73e9b25..21065ae 100755 (executable)
@@ -303,6 +303,14 @@ class SC_db_list {
                                        document.location = URL+(T3_RETURN_URL?"&returnUrl="+T3_RETURN_URL:"");
                                        return false;
                                }
+                               function setHighlight(id)       {
+                                       top.fsMod.recentIds["web"]=id;
+                                       top.fsMod.navFrameHighlightedID["web"]="pages"+id+"_"+top.fsMod.currentBank;    // For highlighting
+
+                                       if (top.content && top.content.nav_frame && top.content.nav_frame.refresh_nav)  {
+                                               top.content.nav_frame.refresh_nav();
+                                       }
+                               }
                                '.$this->doc->redirectUrls($dblist->listURL()).'
                                '.$dblist->CBfunctions().'
                                function editRecords(table,idList,addParams,CBflag)     {       //
index 6ab271d..f147955 100755 (executable)
@@ -203,6 +203,12 @@ class SC_file_list {
                                }
                        }
 
+                       if (!isset($this->MOD_SETTINGS['sort']))        {
+                                       // Set default sorting
+                               $this->MOD_SETTINGS['sort'] = 'file';
+                               $this->MOD_SETTINGS['reverse'] = 0;
+                       }
+
                                // Start up filelisting object, include settings.
                        $this->pointer = t3lib_div::intInRange($this->pointer,0,100000);
                        $filelist->start($this->id,$this->pointer,$this->MOD_SETTINGS['sort'],$this->MOD_SETTINGS['reverse'],$this->MOD_SETTINGS['clipBoard']);
index a5544e9..5839660 100755 (executable)
@@ -403,6 +403,7 @@ class SC_db_layout {
                        $this->doc->JScode = '<script type="text/javascript" src="'.$BACK_PATH.'t3lib/jsfunc.updateform.js"></script>';
                        $this->doc->JScode.= $this->doc->wrapScriptTags('
                                if (top.fsMod) top.fsMod.recentIds["web"] = '.intval($this->id).';
+                               if (top.fsMod) top.fsMod.navFrameHighlightedID["web"] = "pages'.intval($this->id).'_"+top.fsMod.currentBank; '.intval($this->id).';
                                function jumpToUrl(URL,formEl)  {       //
                                        if (document.editform && document.TBE_EDITOR_isFormChanged)     {       // Check if the function exists... (works in all browsers?)
                                                if (!TBE_EDITOR_isFormChanged())        {       //
index d14c3a4..a0bef82 100755 (executable)
@@ -3438,10 +3438,13 @@ From sub-directory:
 
                                                        // Init again / first time depending...
                                                $FDdb = $this->getFieldDefinitions_database();
+
                                                $diff = $this->getDatabaseExtra($FDfile, $FDdb);
                                                $update_statements = $this->getUpdateSuggestions($diff);
+
                                                $diff = $this->getDatabaseExtra($FDdb, $FDfile);
-                                               $remove_statements = $this->getUpdateSuggestions($diff,"remove");
+                                               $remove_statements = $this->getUpdateSuggestions($diff,'remove');
+
                                                $tLabel = "Update database tables and fields";
 
                                                if ($remove_statements || $update_statements)   {
diff --git a/typo3/sysext/rtehtmlarea/ChangeLog b/typo3/sysext/rtehtmlarea/ChangeLog
new file mode 100644 (file)
index 0000000..afbeaf0
--- /dev/null
@@ -0,0 +1,409 @@
+2005-12-24  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Extend t3lib_parsehtml_proc only if TYPO3_VERSION is smaller than 4.0
+       * Cleanup images folders.
+
+2005-12-23  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Update to language files.
+
+2005-12-22  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Update to Proc, Demo and Typical Page TSConfig.
+       * Correction for No font and No size elements if font and size selectors.
+       * Add support for thead and tfoot in TableOperations plugin.
+       * Update to skins for th tags
+       * Correction to some cleaning regular expressions in RemoveFormat plugin. Thanks to Ernesto Baschny.
+       * Keep character map window open until explicitly closed.
+       * Feature for Mozilla/Firefox: apply style to multiple selected cells of a table.
+       * Correction to the extraction of class selectors from some css rules.
+
+2005-12-20  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * New FAQ about style selector boxes in IE.
+       * Numerous adjustments for eventual Opera support. Waiting for Opera Software to correct reported problems.
+       * Add non-breaking space to the palette of the insertcharacter palette. Add hotkety ctrl+space to insert a non-breaking space.
+       * Restructure the order of characters in the Insert special character popup window.
+       * Page TSConfig removeTags property would incorrectly remove too many tags.
+       * New Page TSConfig property keepToggleBordersInToolbar.
+       * Update of the link to the Mozilla/Firefox AllowClipboardHelper extension. The new version has new features, new translations and will work with Firefox 1.5.
+       * New TYPO3HtmlParser plugin and enableWordClean configurability.
+       * Add support for header cells (th tag) in table operations.
+       * Add support for all Page TSConfig properties supported by Classic RTE: RTE.classes, classesTable, classesTD, classesLinks, mainStyleOverride, mainStyleOverride_add, mainStyle_font, mainStyle_size, mainStyle_color, mainStyle_bgcolor, inlineStyle, disableRightClick and disablePCexamples.
+       * Make Page TSCongfig settings compatible when migrating from Classic RTE to htmlArea RTE.
+       * Restructure processing of Page TSConfig setup.
+       * New default configurations: Typical, Advanced, Demo. Extension configuration variable Enable all editor options is replaced by Default configuration settings.
+       * Correction for Mozilla/Firefox: when an email address is automatically recognized, the created link would be wrong if the local part of the email address contained parts with only one letter.
+       * Correction: some icons were missing in the element browser when adding or editing links.
+       * Correction for IE: the link button did not get activated when text was selected using keyboard arrows.
+       * Correction: The title and alt attributes produced by the link creation/editing button could undergo incorrect character sets conversions in some configurations of backend and/or frontend character sets.
+       * Add Page TSConfig properties to configure table operations dialogs: disableAlignmentFieldsetInTableOperations, disableSpacingFieldsetInTableOperations, disableColorFieldsetInTableOperations, disableLayoutFieldsetInTableOperations and disableBordersFieldsetInTableOperations
+       * New Page TSConfig property ignoreMainStyleOverride for ease of migration from Classic RTE to htmlArea RTE.
+       * Cleaning Mozilla folder.
+
+2005-11-20  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Version 1.0.0
+       * Extension of system class t3lib_parsehtml_proc : move any style attribute of an a-tag to a wrapping span-tag, so that the link may be transformed into a typolink, if no other attribute prevents its transformation. Thanks to Dimitrij Denissenko for this idea and its implementation.
+       * Correction: updating the properties of an image was broken in version 0.7.6.
+       * Correction: in the Remove Format window, when some text is selected, the default cleaning area will be ?Selection? (rather than ?All?). Thanks to Bernhard Kraft for noting this usability issue.
+       * Method HTMLcleaner_db of class t3lib_parsehtml_proc is modified to honor Page TSConfig setting RTE.default.proc.HTMLparser_db.xhtml_cleaning = 1. See section Known problems.
+
+2005-11-10  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Version 0.7.6:
+       * Two new extension configuration variables allow to specify the maximum resolution of plain images inserted with the TYPO3 image browser.
+       * Correction for TYPO3 3.8 on Windows server: the path to the locallang file of the spell checker was incorrectly set.
+       * Addition of Danish translation.
+       * Update to Russian translation.
+       * Correction: if multiple instances of the editor were loaded on the same page, with different plugins configuration for each, only the scripts of plugins enabled in the last instance were loaded on the page, resulting in JavaScript errors.
+       * New Page TSConfig and User TSConfig property enablePersonalDicts may be used to enable the use of personal dictionaries when using the spell checker.
+       * Correction: some links could not be edited. See http://bugs.typo3.org/view.php?id=1748
+       * Correction: possible incorrect character set conversion of default titleText (set in language file through anchor accessibility feature configuration) when backend is utf-8.
+
+2005-10-17  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Version 0.7.4
+       * Correction for Mozilla/Firefox: when the editor was loaded in a hidden tab, the size of the editing area would be incorrect when the tab becomes visible.
+       * Update to Finnish and Italian translations.
+       * Addition of Czech translation.
+       * Correction to the documentation of the anchor accessibility feature.
+       * Correction: insufficiently qualified CSS selectors in the editor skins resulted in styling problems mainly when the editor is used in the front end. Thanks to Claudio Strizzolo.
+       * Correction: toggleborders button caused inconsistencies in the class selector of the table properties popup window.
+       * Correction to the character set used by the xml parser and Aspell when invoked by the spell checker with iso-8859-1 content.
+
+2005-10-05  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Version 0.7.2
+       * Correction: incorrect display of the toolbar in some configurations.
+       * Correction: incorrect update of some table properties.
+       * Adjustments to the names of the css selectors of some toolbar buttons. Skins sr_rtehtmlarea_bluelook and sr_rtehtmlarea_xpblue need to be upgraded. Custom skins need to be updated.
+       * Correction: incorrect  behavior of the hot keys (ctrl+key) and of the context menu's access keys (alt+key).
+       * Remove generation of Mozilla/Firefox extension. Remove requirement for PHP zlib. Remove Archive_Zip package. Trigger install of AllowClipboard Helper  for all supported versions of Mozilla/Firefox. AllowClipboardHelper Firefox extension has been localized to French and Spanish.
+       * Correction: some labels of the non-TYPO3 link and image insertion popups were not localized.
+       * Revised About window. Skins need to be upgraded. Custom skins need to be updated.
+       * New anchor accessibility feature.
+       * Correction: erratic behaviors in Mozilla/Firefox when automatically detecting links and when backspacing.
+       * Correction: PHP Fatal error when SpellChecker is enabled under PHP5. See http://bugs.typo3.org/view.php?id=1470 
+       * Update to the Dutch and German translations.
+       * Correction for IE (and maybe other cases, see http://bugs.typo3.org/view.php?id=1425): When an unforgiving browser refuses to parse the content coming from the database, a popup window will inform the user that the HTML document is not well-formed, and the editor will be started in textmode so that the user can edit the error in the HTML source.
+       * Correction: nested lists were not compliant with XHTML.
+       * Correction: the path to skin file htmlarea-edited-content.css could be incorrect when typo3 is installed in a sub-directory.
+       * Correction for IE: the paragraph style selector box was disabled.
+
+2005-08-29  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Version 0.7.0
+       * Correction: the  editor failed to initialize correctly when Page TSConfig property hideTableOperationsInToolbar was set to 1.
+       * Addition of Toggle borders in the context memu.
+       * Correction: updating a link did not work when the link was set on an image and on multiple elements.
+       * Problem with Firefox extension \93All-in-One Gestures\94 documented as Known problem.
+       * Blue-look and xp-blue skins moved to separate extensions: sr_rtehtmlarea_bluelook and sr_rtehtmlarea_xpblue respectively.
+       * Update to Finnish and Norwegian translations.
+
+2005-08-16  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Version 0.6.2
+       * Correction: the  image update popup dialog was broken in the previous version.
+       * Update to the recommended server configuration for png images.
+       * Addition of two example skins: blue-look and xp-blue, inspired by Xinha.
+       * New Page TSConfig property: keepButtonGroupTogether will keep buttons of a same group together on the same line of the editor tool bar. Not supported in IE, nor in Mozilla 1.3.
+       * Adjustments to the default skin. Custom skins may need to be adjusted.
+
+2005-08-09  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Version 0.6.1
+       * Added documentation section on server configuration.
+       * Correction: the compressed version of plugin scripts were not used.
+       * Various changes for performance improvement.
+       * Added FAQ on hotkeys.
+       * Update to Finnish and Norwegian translations.
+
+2005-08-05  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Version 0.5.9
+       * Correction: the MS Word Formatting option of the RemoveFormat button was broken in version 0.5.5.
+       * Url of AllowClipboard Helper is added as an extension configuration variable.
+       * The address and dl tags are added to the list $headListTags of TYPO3 system class t3lib_parsehtml_proc. See Known problems.
+       * Correction: since version 0.5.5, html attribute values could be html-encoded more than once.
+       * Correction: the editor will load correctly even if it is located in a hidden tab at te time of loading. See Known problems.
+       * Improved memory management for IE.
+       * Correction for IE: with some locales, the type of paragraph displayed in the toolbar may not correspond to the type of paragraph of the current selection.
+       * Address is added to the default list of types of paragraphs.
+       * Correction: since 0.5.5, html-encoding of single quotes was causing incompatibilities.
+       * Correction: the Acronym plugin was broken since version 0.5.5.
+       * Correction: if a title is added on a link, the link is not eligible as typolink, and TYPO3 will add a rtekeep attribute on the a tag; if the link is edited and the title removed, the editor should remove the rtekeep attribute so that the link becomes eligible as typolink again.
+       * Correction: since 0.5.2, the Insert/Modify Link dialog could be broken in TYPO3 3.6.
+       * New Page TSConfig property: removeTrailingBR. In Mozilla/Firefox/Netscape browsers, whenever some text is entered in an empty block, a trailing br tag is added by the browser. If this property is set, any trailing br tag in a block element will be removed on save and/or change mode. However, multiple trailing br tags will be preserved.
+       * For IE: an error message will be displayed if execution of ActiveX controls is not enabled.
+
+2005-07-23  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Version 0.5.5
+       * The size of the back end editor area may be configured in User TSConfig. See the configuration section. Thanks to Peter Enzenberger.
+       * In Mozilla/Firefox, url's and email's are automatically transformed into links as soon as they are followed by a space; hitting escape or ctrl-z before any other key unlinks the text. Thanks to Xinha.
+       * Scripts compressed by about 25%. Use of compressed scripts is controlled by extension configuration.
+       * Improved memory management and reduced memory leakage.
+       * Correction: the cellinsertafter button was incorrectly configured in the default configuration.
+       * Correction: when multiple instances of the editor were loaded on the same page, the always-show buttons were added only on the tool bar of the first instance.
+       * Correction: the path to default skin component htmlarea-edited-content.css was incorrectly set.
+       * When the configuration variable Enable Mozilla/Firefox extension is enabled, if the client browser is Firefox 1+, the installation of the Firefox extension AllowClipboard Helper will triggered instead of the extension generated by this TYPO3 extension.
+       * In Mozilla/Firefox, an exception will be raised only when performing a paste with the tool bar button. Pasting with ctrl-v key will not raise any exception. Thanks to Guillaume Crico.
+
+2005-07-06  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Version 0.5.4
+       * Correction: one label of plugin RemoveFormat was not localized.
+       * Correction: custom skins prevented correct loading of the RTE.
+       * Correction for IE: incorrect display of the current class in the paragraph style selector in some configurations.
+       * Correction for IE: the border handles of images and tables could not be selected for resizing.
+       * Correction for IE: table, img, ol and ul elements may be correctly selected through the editor status bar.
+       * Correction for IE: incorrect positioning of some popup window.
+       * Correction for IE: incorrect behavior of the InlineCSS text style selector when Arabic text was selected.
+
+2005-06-14  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Version 0.5.3
+       * Correction for IE: when the collapsed borders attribute was set on a table, the table properties popup dialog did not reflect the set attribute: the checkbox was not checked.
+       * Correction: when TYPO3 is not installed in the web server's root path, the dynamiccss.css file was not properly included. Thanks to Johannes Bornhold for this correction.
+       * Correction for IE: on some Windows platforms, the display of the window status bar cannot be avoided unless the script is granted some privileges; in such cases, the height of the resized popup windows was insufficient; the resizing algorithm has been revised in order to correct this situation.
+       * Correction: Correction to misbehavior of mailto link popup when no anchor class is specified in Page TSConfig.
+       * Allow insertion of a file uploader on the File tab of the Insert/Modify link popup window (when TYPO3Browsers is used); the feature is enabled when property options.uploadFieldsInTopOfEB is set to 1 in User TSConfig. Thanks to Peter Niederlag for adding this feature.
+       * For TYPO3 3.7.0+: use the tab menu in TYPO3 Insert/Modify link popup window.
+       * Modify default Page TSConfig RTE configuration so as to remove Open Office <sdfield>-tags.
+       * New Page TSConfig properties: removeComments, removeTags, removeTagsAndContents.
+       * Correction for Mozilla/Firefox: when pasting in text by pressing the ctrl-v keys, the Mozilla extension installation was incorrectly triggered and/or failed.
+       * Correction: inserting a paragraph from the context menu when positioned in a table or a list produced incorrect result.
+       * New plugin/button allows to insert/edit acronyms and abbreviations. Not currently available in IE. Acronyms and abbreviations may be pre-defined with Acronym record type inserted on the TYPO3 site root.
+       * Transform abbr tags into acronym tags when IE is used.
+
+2005-05-23  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Version 0.5.1
+       * Correction to the behavior of the style selection lists.
+
+2005-05-21  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Version 0.5.0
+       * Using TYPO3 classes to access language files.
+       * Correcting character set conversion for the front end editor in some configurations.
+       * Update to Brazilian Portuguese and Finnish translations.
+       * Use doubleval in place of floatval in SpellChecker plugin.
+       * Use XMLHttpRequest to asynchronously download required scripts.
+       * Add troubleshooting log and extension configuration variable to enable logging.
+       * Multiple changes to support Safari 1.3. Although the editor loads in Safari 1.3, it does not currently execute correctly due to some bugs in Safari edit mode.
+       * Restructure the tool bar as an unordered list of label, select and button elements so that it can be walked through with the tab key. The list, including the button icons, is css-styled through the editor skin.
+       * Restructure the context menu as an unordered list of button elements. The context menu, including the button icons, is css-styled through the editor skin.
+       * Show in the context menu all table operations enabled in the given context.
+       * Each of the table operations becomes a configurable tool bar element like all other tool bar elements.
+       * New RTE Page TSConfig property: hideTableOperationsInToolbar. If set, the table operations buttons will not be displayed in the tool bar, but will appear in the context menu, when enabled in the given context.
+       * Method TS_transform_db of class t3lib_parsehtml_proc is modified in order to replace true line breaks with spaces, instead of eliminating them. Thanks to Johannes Bornhold.
+       * New htmlArea plugin UserElements to enable the "user" button.
+       * Add the title attribute on the TYPO3 link insertion/modification dialog.
+       * New toggleborders button to show table borders. Imported from Xinha.
+
+2005-04-18  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Version 0.4.70
+       * Correction to problem in method TS_transfrom_db.
+       * Correction for Mozilla/Firefox and TCA feature dividers2Tabs.
+       * Tune and simplify RTE processing options.
+       * New FAQ on custom tags.
+       * Method TS_transform_db is modified in order to remove true line breaks from hx tag content.
+       * Correction to link removal.
+       * Correction to default Page TSConfig.
+       * Corrections to the front end editor plugin: allow all htmlArea plugins except TYPO3Browsers, remove call to t3lib_BEfunc.
+       * Using TYPO3 db manipulation class.
+       * Correcting the spell checker style sheet in IE for the front end editor.
+
+2005-04-01  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Version 0.4.64
+       * Move minimal and full default Page TsConfig to external files.
+       * Generate Javascript localization files in typo3temp folder so that they can be cached by the browser.
+       * Generate the Mozilla/Firefox xpi extension file only when necessary.
+       * Method TS_transform_db of class t3lib_parsehtml_proc in order to avoid insertion of superfluous line breaks after tags PRE, UL, OL, H1, H2, H3, H4, H5, H6, HR, TABLE and BLOCKQUOTE. See section Known problems.
+       * Correction to problem with some popup windows in Mozilla 1.4.
+       * Produce xhtml-strict-compliant img tags when editing with Mozilla/Firefox. In editing mode, IE sets all names of style properties to upper case.
+
+2005-03-21  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Version 0.4.60
+       * Further adjustments to width of editor components.
+       * Correction to incorrect behavior in IE when selecting an image or a table and when the textstyle toolbar element is shown.
+       * If extension Lorem Ipsum is installed, htmlArea RTE will extend it so that dummy content may be inserted when the editor is in wysiwyg mode. Lorem Ipsum must however be installed before htmlArea RTE itself is installed.
+       * Initial release of class tx_rtehtmlarea_pi2 allowing rich text editing in the front end. See Modern Guestbook Extended for an example.
+       * New FAQ's.
+       * Strip style attribute out of hr tags.
+       * Eliminate warning from some servers on insert link, insert image and spell check popup windows.
+       * Correction JavaScript error when selecting an image in Mozila/Firefox.
+       * Correction to image width and height setting.
+       * Allow setting only one dimension of the image for proportional display.
+       * Allow setting image alternate text independently of the title attribute.
+
+2005-03-13  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Version 0.4.55
+       * Adjust default skin, width, height.
+       * Clean up some code.
+
+2005-03-12  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Version 0.4.54
+       * Eliminate superfluous line break before and after edited content.
+       * Eliminate extension conflict with clasical RTE extension.
+       * Update to Dutch and Finnish translations.
+       * Correction for IE: a JavaScript error was raised when selecting an image and then clicking on inserttag, emoticon or insertcharacter button.
+       * Easier setting of extension configuration variables at the time of installation.
+       * Correction for IE5.5: working around missing ownerDocument property.
+       * New RTE Page TSConfig property: skin.
+       * Moving context menu styles to the editor default skin CSS file.
+       * Correcting editing area width in Firefox.
+       * Ensure a default value for the editor skin.
+       * Correcting path to default skin in some configurations.
+       * Correcting editing area width and height when in text mode and/or in full page mode.
+       * Adding class attribute to table, row and cell properties popup windows when blockstyle toolbar element is enabled.
+       * Correcting target and class setting on links.
+
+2005-02-26  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Version 0.4.45
+       * Correcting path setting warning in insert link and insert image dialogs on some server configurations.
+       * Correction for Mozilla/Firefox: when "Save and preview" was clicked, the editor was grabbing the focus away from the preview popup window.
+       * Correction to the behavior of the status bar. See Known problems for remaining problem in IE.
+       * New default value for RTE Page TSConfig property classesCharacter.
+       * New  RTE Page TSConfig property: showTagFreeClasses.
+       * Further internal structure changes and event handlers release.
+
+2005-02-23  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Version 0.4.44
+       * Internal structure changes for improved memory management, garbage collection, event handlers removal, etc.
+
+2005-02-21  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Version 0.4.43
+       * Enable the context menu when right-clicking on items of the status bar.
+       * Setting class attribute in Insert/Modify link and Insert/Modify image dialogs. Add RTE configuration properties: classesAnchor and classesImage.
+       * Setting special toolbarOrder defaults, for narrow and wide document background, in order to workaround  wrapping  bug in float style property in Mozilla 1.3.1 (for Mac OS 9).
+
+2005-02-19  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Version 0.4.41
+       * RTE was not loading in Mozilla 1.3.1 (wamcom release ) for Mac OS 9 (last Mozilla release for this platform).
+       * Improved undo/redo operations.
+
+2005-02-17  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Version 0.4.39
+       * Added q, cite, abbr and acronym as allowed tags when "Enable all editor options" is checked.
+       * Added q, cite and tt tags to the tags supported by the QuickTag plugin (inserttag button).
+       * Work around bug in Mozilla 1.4 and Netscape 7.1 affecting DynamicCSS and InlineCSS plugins.
+       * Two know problems documented.
+       * Added tutorial by Jan Wulff on mod_gzip and IE caching problem.
+       * Correction for IE: if a table was selected by clicking on its border and the delete or backspace key was pressed, a Javascript error was produced, but the table was deleted anyway. The Javascript error is now gone.
+       * Correction: The TYPO3 back end form containing a text field edited with htmlArea RTE was submitted regardless of errors that should have been raised on the other fields of the form.
+
+2005-02-15  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Version 0.4.37
+       * Correction to the generated Mozilla/Firefox extension.
+       * Correction to table operations: the current vertical alignment property of tables, rows and cell was incorrectly displayed.
+       * New FAQs.
+       * Replacing htmlArea plugin EnterParagrahs with corrected function from htmlArea 3 RC3 (modified for table cells). Corrects never ending header tag formatting.
+       * Improved installation dialog and platform-independence of Mozilla/Firefox/Netscape extension for access to clipboard.
+       * Eliminate warning when spell checking reverts to command mode with Aspell 0.5.
+       * Further extension to system class t3lib_parsehtml_proc to add hr tag to $headListTags.
+       * Added tt as allowed tags when "Enable all editor options" is checked.
+
+2005-02-09  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Version 0.4.35
+       * Browser recognition.
+       * HTTPS in Mozilla/Firefox.
+       * Style on font tag.
+       * Vertical align display.
+
+2005-02-05  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Version 0.4.33
+       * Generation of Mozilla/Firefox extension.
+       * Addition of Archive_Zip package (PEAR).
+       * Fixing the height of the editing area.
+       * Vertical align setting in table rows and cells.
+       * Fixing CGI detection.
+
+2005-02-01  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Version 0.4.32
+       * The editor was not loading in Mozilla/Firefox in some configurations.
+       * Replacement of inline styles.
+       * Resizing of fullscreen editor.
+
+2005-01-28  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Insert column after last corrected in IE.
+       * Italian translation.
+
+2005-01-18  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Last row, column, cell deletion in tables.
+       * CGI detection corrected.
+       * Character conversion corrected.
+
+2005-01-14  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Toolbar configuration.
+       * Fullpage plugin deletion.
+
+2005-01-12  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Add float property on images
+       * Correct CharacterMap initialization
+       * Do not grab focus on generate
+
+2005-01-11  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Revision of table operations popups
+       * Language files from typo3.org
+
+2004-12-22  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Strip value="0" attribute reported by IE on all li tags
+       * Cleanup code in RemoveFormat and QuickTag plugins
+
+2004-12-20  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Revision of initial dimensions setting of all popup windows
+
+2004-12-18  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Correction to textarea width
+       * Addition of InlineCSS plugin
+
+2004-12-13  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Correction to link update
+       * Correction to interface between SelectColor and QuickTag plugins
+       * New showStatusBar property
+       * New minimal/full options configuration check box
+       * Documentation of version 0.4.10
+
+2004-12-12  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * New QuickTag plugin and hideTags config property
+       * Documentation of version 0.4.9
+
+2004-12-10  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Correcting color formatting in gecko browsers
+       * New useCSS RTE property
+
+2004-12-08  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Correcting the default language labels
+       * Making initialization DOM only.
+
+2004-12-04  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+       * Cleaning up
+       * German translation
+
+2004-12-02  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+
+       * Removing dependency on sr_static_info when spell checker is not enabled
+       * Integrating EnterParagraphs plugin
+       * Streamlining CSS loading
+       * Correcting delete/backspace in Firefox on initial load
+       * Correcting toolbar in Firefox on return from textmode
+       * Correcting RemoveFormat for non-breaking spaces
+       * Correcting SpellChecker for non-breaking spaces
+
+2004-11-28  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+
+       * Changing extension from sr_htmlarea to rtehtmlarea
+
+2004-11-27  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+
+       * Correcting the behavior of the paragraph (formatblock) drop down list in IE
+       * Deleting Indite plugin
+       * Correcting color chooser styles for IE
+       * Adjusting popup windows
+
+2004-11-26  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+
+       * onload function moved from typo3_rte.js to htmlarea.js to correct loading with Firefox/WindowsXP
+       * Correcting popup window opening with Linux/Firefox (popup.js, CharacterMap, RemoveFormat)
+       * New default RTE processing options in ext_localconf.php
+
+2004-11-23  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+
+       * Standardizing popup window positioning (RemoveFormat and CharacterMap plugins)
+       * Enabling the CharacterMap plugin (ext_localconf.php and class.tx_rtepbhtmlarea_base.php)
+       * Update to documentation (doc/manual.sxw)
+       * Update to version 0.3.12 of sr_htmlarea (ext_emconf.php)
+
+2004-11-22  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
+
+       * Initial synchronization with latest version
+
+2004-11-18  Michael Stucki  <michael@typo3.org>
+
+       * Adding a ChangeLog
+       * Initial CVS upload
diff --git a/typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php b/typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php
new file mode 100644 (file)
index 0000000..7b0620b
--- /dev/null
@@ -0,0 +1,1852 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2004 Kasper Skaarhoj (kasper@typo3.com)
+*  (c) 2004 Philipp Borgmann <philipp.borgmann@gmx.de>
+*  (c) 2004-2005 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+*  All rights reserved
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*  A copy is found in the textfile GPL.txt and important notices to the license
+*  from the author is found in LICENSE.txt distributed with these scripts.
+*
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+/**
+ * A RTE using the htmlArea editor
+ *
+ * @author     Philipp Borgmann <philipp.borgmann@gmx.de>
+ * @author     Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+ *
+ * $Id$  *
+ */
+
+require_once(PATH_t3lib.'class.t3lib_rteapi.php');
+require_once(PATH_t3lib.'class.t3lib_cs.php');
+
+class tx_rtehtmlarea_base extends t3lib_rteapi {
+
+               // Configuration of supported browsers
+       var $conf_supported_browser = array (
+                       'msie' => array (
+                               1 => array (
+                                       'version' => 5.5,
+                                       'system' => 'win'
+                               )
+                       ),
+                       'gecko' => array (
+                               1 => array (
+                                       'version' => 1.3
+                               )
+                       ),
+                       'safari' => array (
+                               1 => array (
+                                       'version' => 312
+                               )
+                       ),
+                       'opera' => array (
+                               1 => array (
+                                       'version' => 9,
+                                       'system' => 'win'
+                               )
+                       )
+               );
+
+               // Always hide these toolbar buttons (TYPO3 button name)
+       var $conf_toolbar_hide = array (
+               'showhelp',             // Has no content yet
+               );
+       
+               // Hide these toolbar buttons not implemented in Safari
+       var $conf_toolbar_safari_hide = array (
+               'strikethrough',
+               'line',
+               'orderedlist',
+               'unorderedlist',
+               );
+       
+               // Hide these toolbar buttons not implemented in Opera
+       var $conf_toolbar_opera_hide = array (
+               'textstyle',
+               'blockstyle',
+               'copy',
+               'cut',
+               'paste',
+               );
+       
+               // Always show these toolbar buttons (TYPO3 button name)
+       var $conf_toolbar_show = array (
+               'undo',
+               'redo',
+               //'showhelp',
+               'about',
+               );
+       
+               // The order of the toolbar: the name is the TYPO3-button name
+       var $defaultToolbarOrder;
+
+               // The default hotkeys: the name is the TYPO3-button name
+       var $defaultHotKeyList = 'selectall, bold, italic, underline, strikethrough, left, center, right, justifyfull, formatblock, paste, cleanword, undo, redo';
+
+               // Conversion array: TYPO3 button names to htmlArea button names
+       var $conf_toolbar_convert = array (
+                       // 'TYPO3 name' => 'htmlArea name'
+               'fontstyle'             => 'FontName',
+               'fontsize'              => 'FontSize',
+               'textcolor'             => 'ForeColor',
+               'bgcolor'               => 'HiliteColor',
+               'bold'                  => 'Bold',
+               'italic'                => 'Italic',
+               'underline'             => 'Underline',
+               'left'                  => 'JustifyLeft',
+               'center'                => 'JustifyCenter',
+               'right'                 => 'JustifyRight',
+               'orderedlist'           => 'InsertOrderedList',
+               'unorderedlist'         => 'InsertUnorderedList',
+               'outdent'               => 'Outdent',
+               'indent'                => 'Indent',
+               'emoticon'              => 'InsertSmiley',
+               'line'                  => 'InsertHorizontalRule',
+               'link'                  => 'CreateLink',
+               'table'                 => 'InsertTable',
+               'image'                 => 'InsertImage',
+               'cut'                   => 'Cut',
+               'copy'                  => 'Copy',
+               'paste'                 => 'Paste',
+               'formatblock'           => 'FormatBlock',
+               'chMode'                => 'HtmlMode',
+               'user'                  => 'UserElements',
+               
+                       // htmlArea extra buttons
+               'lefttoright'           => 'LeftToRight',
+               'righttoleft'           => 'RightToLeft',
+               'justifyfull'           => 'JustifyFull',
+               'strikethrough'         => 'StrikeThrough',
+               'superscript'           => 'Superscript',
+               'subscript'             => 'Subscript',
+               'showhelp'              => 'ShowHelp',
+               'insertcharacter'       => 'InsertCharacter',
+               'findreplace'           => 'FindReplace',
+               'spellcheck'            => 'SpellCheck',
+               'removeformat'          => 'RemoveFormat',
+               'inserttag'             => 'InsertTag',
+               'acronym'               => 'Acronym',
+               'splitblock'            => 'SplitBlock',
+               'blockstylelabel'       => 'I[style]',  
+               'blockstyle'            => 'DynamicCSS-class',
+               'textstylelabel'        => 'I[text_style]',
+               'textstyle'             => 'InlineCSS-class',
+               'toggleborders'         => 'TO-toggle-borders',
+               'tableproperties'       => 'TO-table-prop',
+               'rowproperties'         => 'TO-row-prop',
+               'rowinsertabove'        => 'TO-row-insert-above',
+               'rowinsertunder'        => 'TO-row-insert-under',
+               'rowdelete'             => 'TO-row-delete',
+               'rowsplit'              => 'TO-row-split',
+               'columninsertbefore'    => 'TO-col-insert-before',
+               'columninsertafter'     => 'TO-col-insert-after',
+               'columndelete'          => 'TO-col-delete',
+               'columnsplit'           => 'TO-col-split',
+               'cellproperties'        => 'TO-cell-prop',
+               'cellinsertbefore'      => 'TO-cell-insert-before',
+               'cellinsertafter'       => 'TO-cell-insert-after',
+               'celldelete'            => 'TO-cell-delete',
+               'cellsplit'             => 'TO-cell-split',
+               'cellmerge'             => 'TO-cell-merge',
+
+                       // Toolbar formating
+               'space'                 => 'space',
+               'bar'                   => 'separator',
+               'linebreak'             => 'linebreak',
+
+                       // Always show
+               'undo'                  => 'Undo',
+               'redo'                  => 'Redo',
+               'textindicator'         => 'TextIndicator',
+               'about'                 => 'About',
+               );
+       
+       var $defaultParagraphs = array(
+               'p'             => 'Normal',
+               'h1'            => 'Heading 1',
+               'h2'            => 'Heading 2',
+               'h3'            => 'Heading 3',
+               'h4'            => 'Heading 4',
+               'h5'            => 'Heading 5',
+               'h6'            => 'Heading 6',
+               'pre'           => 'Preformatted',
+               'address'       => 'Address',
+               );
+       
+       var $defaultFontFaces = array(
+               'Arial'                 => 'Arial,sans-serif',
+               'Arial Black'           => 'Arial Black,sans-serif',
+               'Verdana'               => 'Verdana,Arial,sans-serif',
+               'Times New Roman'       => 'Times New Roman,Times,serif',
+               'Garamond'              => 'Garamond',
+               'Lucida Handwriting'    => 'Lucida Handwriting',
+               'Courier'               => 'Courier',
+               'Webdings'              => 'Webdings',
+               'Wingdings'             => 'Wingdings',
+               );
+                               
+       var $defaultFontSizes = array(
+               '1' =>  '1 (8 pt)',
+               '2' =>  '2 (10 pt)',
+               '3' =>  '3 (12 pt)',
+               '4' =>  '4 (14 pt)',
+               '5' =>  '5 (18 pt)',
+               '6' =>  '6 (24 pt)',
+               '7' =>  '7 (36 pt)',
+               );
+
+       var $pluginList = 'TableOperations, ContextMenu, SpellChecker, SelectColor, TYPO3Browsers, InsertSmiley, FindReplace, RemoveFormat, CharacterMap, QuickTag, InlineCSS, DynamicCSS, UserElements, Acronym, TYPO3HtmlParser';
+
+       var $pluginButton = array(
+               'InlineCSS'             => 'textstyle',
+               'DynamicCSS'            => 'blockstyle',
+               'SpellChecker'          => 'spellcheck',
+               'InsertSmiley'          => 'emoticon',
+               'FindReplace'           => 'findreplace',
+               'RemoveFormat'          => 'removeformat',
+               'QuickTag'              => 'inserttag',
+               'CharacterMap'          => 'insertcharacter',
+               'TableOperations'       => 'table, toggleborders, tableproperties, rowproperties, rowinsertabove, rowinsertunder, rowdelete, rowsplit,
+                                               columninsertbefore, columninsertafter, columndelete, columnsplit,
+                                               cellproperties, cellinsertbefore, cellinsertafter, celldelete, cellsplit, cellmerge',
+               'UserElements'          => 'user',
+               'Acronym'               => 'acronym',
+               );
+
+       var $pluginLabel = array(
+               'InlineCSS'     => 'textstylelabel',
+               'DynamicCSS'    => 'blockstylelabel',
+               );
+
+       var $spellCheckerModes = array( 'ultra', 'fast', 'normal', 'bad-spellers');
+
+               // External:
+       var $RTEdivStyle;                       // Alternative style for RTE <div> tag.
+       var $extHttpPath;                       // full Path to this extension for http (so no Server path). It ends with "/"
+       var $siteURL;                           // TYPO3 site url
+       var $hostURL;                           // TYPO3 host url
+       var $typoVersion;                       // Typo3 version
+
+               // Internal, static:
+       var $ID = 'rtehtmlarea';                // Identifies the RTE as being the one from the "rte" extension if any external code needs to know...
+       var $debugMode = FALSE;                 // If set, the content goes into a regular TEXT area field - for developing testing of transformations. (Also any browser will load the field!)
+
+               // For the editor
+       var $client;
+       var $TCEform;
+       var $elementId;
+       var $elementParts;
+       var $tscPID;
+       var $typeVal;
+       var $thePid;
+       var $RTEsetup;
+       var $thisConfig;
+       var $confValues;
+       var $language;
+       var $BECharset;
+       var $OutputCharset;
+       var $editorCSS;
+       var $spellCheckerLanguage;
+       var $spellCheckerCharset;
+       var $spellCheckerMode;
+       var $quickTagHideTags;
+       var $specConf;
+       var $toolBar = array();                 // Save the buttons for the toolbar
+       var $toolbar_level_size;                // The size for each level in the toolbar:
+       var $toolbarOrderArray = array();
+       var $pluginEnableList;
+       var $pluginEnableArray = array();
+
+       /**
+        * Returns true if the RTE is available. Here you check if the browser requirements are met.
+        * If there are reasons why the RTE cannot be displayed you simply enter them as text in ->errorLog
+        *
+        * @return      boolean         TRUE if this RTE object offers an RTE in the current browser environment
+        */
+
+       function isAvailable()  {
+               $this->client = $this->clientInfo();
+               $this->errorLog = array();
+               if (!$this->debugMode)  {       // If debug-mode, let any browser through
+                       $rteIsAvailable = 0;
+                       $rteConfBrowser = $this->conf_supported_browser;
+                       if (is_array($rteConfBrowser)) {
+                               reset($rteConfBrowser);
+                               while(list ($browser, $browserConf) = each($rteConfBrowser)){
+                                       if ($browser == $this->client['BROWSER']) {
+                                                       // Config for Browser found, check it:
+                                               if (is_array($browserConf)) {
+                                                       reset($browserConf);
+                                                       while(list ($browserConfNr, $browserConfSub) = each($browserConf)){
+                                                               if ($browserConfSub['version'] <= $this->client['VERSION'] || empty($browserConfSub['version'])) {
+                                                                       // Version is correct
+                                                                       if ($browserConfSub['system'] == $this->client['SYSTEM'] || empty($browserConfSub['system'])) {
+                                                                                       // System is correctly
+                                                                               $rteIsAvailable = 1;
+                                                                       }// End of System
+                                                               }// End of Version
+                                                       }// End of while-BrowserSubpart
+                                               } else {
+                                                       // no config for this browser found, so all versions or system with this browsers are allow
+                                                       $rteIsAvailable = 1;
+                                               }
+                                       } // End of Browser Check
+                               } // while: Browser Check
+                       } else {
+                               // no Browser config for this RTE-Editor, so all Clients are allow                         
+                       }
+                       if (!$rteIsAvailable) {
+                               $this->errorLog[] = "rte: Browser not supported. Only msie Version 5 or higher and Mozilla based client 1. and higher.";
+                       }
+               }
+               if ($rteIsAvailable)    return true;
+       }
+
+       /**
+        * Draws the RTE as an iframe
+        *
+        * @param       object          Reference to parent object, which is an instance of the TCEforms.
+        * @param       string          The table name
+        * @param       string          The field name
+        * @param       array           The current row from which field is being rendered
+        * @param       array           Array of standard content for rendering form fields from TCEforms. See TCEforms for details on this. Includes for instance the value and the form field name, java script actions and more.
+        * @param       array           "special" configuration - what is found at position 4 in the types configuration of a field from record, parsed into an array.
+        * @param       array           Configuration for RTEs; A mix between TSconfig and otherwise. Contains configuration for display, which buttons are enabled, additional transformation information etc.
+        * @param       string          Record "type" field value.
+        * @param       string          Relative path for images/links in RTE; this is used when the RTE edits content from static files where the path of such media has to be transformed forth and back!
+        * @param       integer         PID value of record (true parent page id)
+        * @return      string          HTML code for RTE!
+        */
+
+       function drawRTE(&$pObj,$table,$field,$row,$PA,$specConf,$thisConfig,$RTEtypeVal,$RTErelPath,$thePidValue)      {
+               global $BE_USER,$LANG;
+
+               $this->TCEform = $pObj;
+               $LANG->includeLLFile('EXT:' . $this->ID . '/locallang.php');
+               $this->client = $this->clientInfo();
+               $this->typoVersion = t3lib_div::int_from_ver($GLOBALS['TYPO_VERSION']);
+               $this->userUid = 'BE_' . $BE_USER->user['uid'];
+               
+                       // Draw form element:
+               if ($this->debugMode)   {       // Draws regular text area (debug mode)
+                       $item = parent::drawRTE($pObj,$table,$field,$row,$PA,$specConf,$thisConfig,$RTEtypeVal,$RTErelPath,$thePidValue);
+               } else {        // Draw real RTE
+               
+                       /* =======================================
+                        * INIT THE EDITOR-SETTINGS
+                        * =======================================
+                        */
+
+                               // first get the http-path to typo3:
+                       $this->httpTypo3Path = substr( substr( t3lib_div::getIndpEnv('TYPO3_SITE_URL'), strlen( t3lib_div::getIndpEnv('TYPO3_REQUEST_HOST') ) ), 0, -1 );
+                       if (strlen($this->httpTypo3Path) == 1) {
+                               $this->httpTypo3Path = "/";
+                       } else {
+                               $this->httpTypo3Path .= "/";
+                       }
+                               // Get the path to this extension:
+                       $this->extHttpPath = $this->httpTypo3Path . t3lib_extMgm::siteRelPath($this->ID);
+                               // Get the site URL
+                       $this->siteURL = t3lib_div::getIndpEnv('TYPO3_SITE_URL');
+                               // Get the host URL
+                       $this->hostURL = t3lib_div::getIndpEnv('TYPO3_REQUEST_HOST');
+
+                               // Element ID + pid
+                       $this->elementId = $PA['itemFormElName']; // Form element name
+                       $this->elementParts = explode('][',ereg_replace('\]$','',ereg_replace('^(TSFE_EDIT\[data\]\[|data\[)','',$this->elementId)));
+
+                               // Find the page PIDs:
+                       list($this->tscPID,$this->thePid) = t3lib_BEfunc::getTSCpid(trim($this->elementParts[0]),trim($this->elementParts[1]),$thePidValue);
+
+                               // Record "types" field value:
+                       $this->typeVal = $RTEtypeVal; // TCA "types" value for record
+
+                               // Find "thisConfig" for record/editor:
+                       unset($this->RTEsetup);
+                       $this->RTEsetup = $BE_USER->getTSConfig('RTE',t3lib_BEfunc::getPagesTSconfig($this->tscPID));
+                       $this->thisConfig = $thisConfig;
+
+                               // Special configuration and default extras:
+                       $this->specConf = $specConf;
+                       
+                       /* =======================================
+                        * LANGUAGES & CHARACTER SETS
+                        * =======================================
+                        */
+
+                               // Languages: interface and content
+                       $this->language = $LANG->lang;
+                       if ($this->language=='default' || !$this->language)     {
+                               $this->language='en';
+                       }
+                       $this->contentTypo3Language = $this->language;
+                       
+                       $this->contentLanguageUid = ($row['sys_language_uid'] > 0) ? $row['sys_language_uid'] : 0;
+                       if (t3lib_extMgm::isLoaded('sr_static_info')) {
+                               if ($this->contentLanguageUid) {
+                                       $tableA = 'sys_language';
+                                       $tableB = 'static_languages';
+                                       $languagesUidsList = $this->contentLanguageUid;
+                                       $selectFields = $tableA . '.uid,' . $tableB . '.lg_iso_2,' . $tableB . '.lg_country_iso_2,' . $tableB . '.lg_typo3';
+                                       $table = $tableA . ' LEFT JOIN ' . $tableB . ' ON ' . $tableA . '.static_lang_isocode=' . $tableB . '.uid';
+                                       $whereClause = $tableA . '.uid IN (' . $languagesUidsList . ') ';
+                                       $whereClause .= t3lib_BEfunc::BEenableFields($tableA);
+                                       $whereClause .= t3lib_BEfunc::deleteClause($tableA);
+                                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($selectFields, $table, $whereClause);
+                                       while($languageRow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
+                                               $this->contentISOLanguage = strtolower(trim($languageRow['lg_iso_2']).(trim($languageRow['lg_country_iso_2'])?'_'.trim($languageRow['lg_country_iso_2']):''));
+                                               $this->contentTypo3Language = strtolower(trim($languageRow['lg_typo3']));
+                                       }
+                               } else {
+                                       $this->contentISOLanguage = trim($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->ID]['defaultDictionary']) ? trim($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->ID]['defaultDictionary']) : 'en';
+                                       $selectFields = 'lg_iso_2, lg_typo3';
+                                       $table = 'static_languages';
+                                       $whereClause = 'lg_iso_2 = "' . strtoupper($this->contentISOLanguage) . '"';
+                                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($selectFields, $table, $whereClause);
+                                       while($languageRow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
+                                               $this->contentTypo3Language = strtolower(trim($languageRow['lg_typo3']));
+                                       }
+                               }
+                       }
+
+                               // Character sets: interface and content
+                       $this->charset = $LANG->csConvObj->charSetArray[$this->language];
+                       $this->charset = $this->charset ? $this->charset : 'iso-8859-1';
+                       $this->BECharset = trim($GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset']) ? trim($GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset']) : $this->charset;
+                       $this->OutputCharset = $this->BECharset;
+                       
+                       $this->contentCharset = $LANG->csConvObj->charSetArray[$this->contentTypo3Language];
+                       $this->contentCharset = $this->contentCharset ? $this->contentCharset : 'iso-8859-1';
+                       $this->origContentCharSet = $this->contentCharset;
+                       $this->contentCharset = (trim($GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset']) ? trim($GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset']) : $this->contentCharset);
+
+                       /* =======================================
+                        * TOOLBAR CONFIGURATION
+                        * =======================================
+                        */
+
+                               // htmlArea plugins list
+                       $this->pluginEnableArray = array_intersect(t3lib_div::trimExplode(',', $this->pluginList , 1), t3lib_div::trimExplode(',', $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->ID]['HTMLAreaPluginList'], 1));
+                       $hidePlugins = array();
+                       if(!t3lib_extMgm::isLoaded('sr_static_info') || in_array($this->language, t3lib_div::trimExplode(',', $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->ID]['noSpellCheckLanguages']))) $hidePlugins[] = 'SpellChecker';
+                       if ($this->client['BROWSER'] == 'msie') $hidePlugins[] = 'Acronym';
+                       if ($this->client['BROWSER'] == 'opera') {
+                               $hidePlugins[] = 'ContextMenu';
+                               $this->thisConfig['hideTableOperationsInToolbar'] = 0;
+                       }
+                       $this->pluginEnableArray = array_diff($this->pluginEnableArray, $hidePlugins);
+                       $this->pluginEnableArrayMultiple = $this->pluginEnableArray;
+
+                               // Toolbar
+                       $this->setToolBar();
+
+                               // Check if some plugins need to be disabled
+                       $this->setPlugins();
+
+                       /* =======================================
+                        * PLUGIN-SPECIFIC CONFIGURATION
+                        * =======================================
+                        */
+                       
+                       if ($this->isPluginEnable('SpellChecker')) {
+                                       // Set the language of the content for the SpellChecker
+                               $this->spellCheckerLanguage = $this->contentISOLanguage;
+                               $this->spellCheckerTypo3Language = $this->contentTypo3Language;
+                               
+                                       // Set the charset of the content for the SpellChecker
+                               $this->spellCheckerCharset = $this->contentCharset;
+                               $this->spellCheckerCharset = trim($GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset']) ? trim($GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset']) : $this->spellCheckerCharset;
+                               
+                                       // Set the SpellChecker mode
+                               $this->spellCheckerMode = isset($BE_USER->userTS['options.']['HTMLAreaPspellMode']) ? trim($BE_USER->userTS['options.']['HTMLAreaPspellMode']) : 'normal';
+                               if( !in_array($this->spellCheckerMode, $this->spellCheckerModes)) {
+                                       $this->spellCheckerMode = 'normal';
+                               }
+                               
+                                       // Set the use of personal dictionary
+                               $this->spellCheckerPersonalDicts = $this->thisConfig['enablePersonalDicts'] ? (isset($BE_USER->userTS['options.']['enablePersonalDicts']) ? true : false) : false;
+                               if (ini_get('safe_mode')) {
+                                       $this->spellCheckerPersonalDicts = false;
+                               }
+                       }
+
+                       if ($this->isPluginEnable('QuickTag') && trim($this->thisConfig['hideTags'])) {
+                               $this->quickTagHideTags = implode(',', t3lib_div::trimExplode(',', $this->thisConfig['hideTags'], 1));
+                       }
+
+                       /* =======================================
+                        * SET STYLES
+                        * =======================================
+                        */
+
+                       $RTEWidth = isset($BE_USER->userTS['options.']['RTESmallWidth']) ? $BE_USER->userTS['options.']['RTESmallWidth'] : '460';
+                       $RTEHeight = isset($BE_USER->userTS['options.']['RTESmallHeight']) ? $BE_USER->userTS['options.']['RTESmallHeight'] : '380';
+                       $RTEWidth  = $RTEWidth + ($pObj->docLarge ? (isset($BE_USER->userTS['options.']['RTELargeWidthIncrement']) ? $BE_USER->userTS['options.']['RTELargeWidthIncrement'] : '150') : 0);
+                       $RTEHeight = $RTEHeight + ($pObj->docLarge ?  (isset($BE_USER->userTS['options.']['RTELargeHeightIncrement']) ? $BE_USER->userTS['options.']['RTELargeHeightIncrement'] : 0) : 0);
+                       $editorWrapWidth = $RTEWidth . 'px';
+                       $editorWrapHeight = $RTEHeight . 'px';
+                       $this->RTEdivStyle = $this->RTEdivStyle ? $this->RTEdivStyle : 'position:relative; left:0px; top:0px; height:' . $RTEHeight . 'px; width:'.$RTEWidth.'px; border: 1px solid black; padding: 2px 0px 2px 2px;';
+                       $this->toolbar_level_size = $RTEWidth;
+
+                       /* =======================================
+                        * LOAD CSS AND JAVASCRIPT
+                        * =======================================
+                        */
+
+                               // Preloading the pageStyle
+                       $filename = trim($this->thisConfig['contentCSS']) ? trim($this->thisConfig['contentCSS']) : 'EXT:' . $this->ID . '/htmlarea/plugins/DynamicCSS/dynamiccss.css';
+                       $pObj->additionalCode_pre['loadCSS'] = '
+               <link rel="alternate stylesheet" type="text/css" href="' . $this->getFullFileName($filename) . '" />';
+
+                               // Loading the editor skin
+                       $skinFilename = trim($this->thisConfig['skin']) ? trim($this->thisConfig['skin']) : 'EXT:' . $this->ID . '/htmlarea/skins/default/htmlarea.css';
+                       if($this->client['BROWSER'] == 'gecko' && $this->client['VERSION'] == '1.3' && substr($skinFilename,0,4) == 'EXT:')  {
+                               $skinFilename = 'EXT:' . $this->ID . '/htmlarea/skins/default/htmlarea.css';
+                       }
+                       if (substr($skinFilename,0,4) == 'EXT:')      {       // extension
+                               list($extKey,$local) = explode('/',substr($skinFilename,4),2);
+                               $skinFilename='';
+                               if (strcmp($extKey,'') &&  t3lib_extMgm::isLoaded($extKey) && strcmp($local,'')) {
+                                       $skinFilename = $this->httpTypo3Path . t3lib_extMgm::siteRelPath($extKey) . $local;
+                                       $skinDir = $this->siteURL . t3lib_extMgm::siteRelPath($extKey) . dirname($local);
+                               }
+                       } elseif (substr($skinFilename,0,1) != '/') {
+                               $skinDir = $this->siteURL.dirname($skinFilename);
+                               $skinFilename = $this->siteURL . $skinFilename;
+                       } else {
+                               $skinDir = substr($this->siteURL,0,-1) . dirname($skinFilename);
+                       }
+                       $this->editorCSS = $skinFilename;
+                       $this->editedContentCSS = $skinDir . '/htmlarea-edited-content.css';
+                       $pObj->additionalCode_pre['loadCSS'] .= '
+               <link rel="alternate stylesheet" type="text/css" href="' . $this->editedContentCSS . '" />';
+
+                       $pObj->additionalCode_pre['loadCSS'] .= '
+               <link rel="stylesheet" type="text/css" href="' . $this->editorCSS . '" />';
+
+                               // Loading JavaScript files and code
+                       $pObj->additionalCode_pre['loadJSfiles'] = $this->loadJSfiles($pObj->RTEcounter);
+                       $pObj->additionalJS_pre['loadJScode'] = $this->loadJScode($pObj->RTEcounter);
+
+                       /* =======================================
+                        * DRAW THE EDITOR
+                        * =======================================
+                        */
+
+                               // Transform value:
+                       $value = $this->transformContent('rte',$PA['itemFormElValue'],$table,$field,$row,$specConf,$thisConfig,$RTErelPath,$thePidValue);
+                       
+                               // Change some tags
+                       if ($this->client['BROWSER'] == 'gecko') {
+                                       // change <strong> to <b>
+                               $value = preg_replace("/<(\/?)strong/i", "<$1b", $value);
+                                       // change <em> to <i>
+                               $value = preg_replace("/<(\/?)em/i", "<$1i", $value);
+                       }
+                       if ($this->client['BROWSER'] == 'msie') {
+                                       // change <abbr> to <acronym>
+                               $value = preg_replace("/<(\/?)abbr/i", "<$1acronym", $value);
+                       }
+
+                               // Register RTE windows
+                       $pObj->RTEwindows[] = $PA['itemFormElName'];
+
+                               // Check if wizard_rte called this for fullscreen edtition; if so, change the size of the RTE to fullscreen using JS
+                       if (basename(PATH_thisScript) == 'wizard_rte.php') {
+                               $height = 'window.innerHeight';
+                               $width = 'window.innerWidth';
+                               if ($this->client['BROWSER'] == 'msie') {
+                                       $height = 'document.body.offsetHeight';
+                                       $width = 'document.body.offsetWidth';
+                               }
+                               $editorWrapWidth = '100%';
+                               $editorWrapHeight = '100%';
+                               $this->RTEdivStyle = 'position:relative; left:0px; top:0px; height:100%; width:100%; border: 1px solid black; padding: 2px 0px 2px 2px;';
+                               $pObj->additionalJS_post[] = $this->setRTEsizeByJS('RTEarea'.$pObj->RTEcounter, $height, $width);
+                       }
+
+                               // Register RTE in JS:
+                       $pObj->additionalJS_post[] = $this->registerRTEinJS($pObj->RTEcounter);
+
+                               // Set the save option for the RTE:
+                       $pObj->additionalJS_submit[] = $this->setSaveRTE($pObj->RTEcounter, $pObj->formName, htmlspecialchars($PA['itemFormElName']));
+
+                               // Draw the textarea
+                       $visibility = 'hidden';
+                       $item = $this->triggerField($PA['itemFormElName']).'
+                               <div id="pleasewait' . $pObj->RTEcounter . '" class="pleasewait">' . $LANG->getLL('Please wait') . '</div>
+                               <div id="editorWrap' . $pObj->RTEcounter . '" class="editorWrap" style="visibility:' . $visibility . '; width:' . $editorWrapWidth . '; height:' . $editorWrapHeight . ';">
+                               <textarea id="RTEarea'.$pObj->RTEcounter.'" name="'.htmlspecialchars($PA['itemFormElName']).'" style="'.t3lib_div::deHSCentities(htmlspecialchars($this->RTEdivStyle)).'">'.t3lib_div::formatForTextarea($value).'</textarea>
+                               </div>' . ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->ID]['enableDebugMode'] ? '<div id="HTMLAreaLog"></div>' : '') . '
+                               ';
+               }
+
+                       // Return form item:
+               return $item;
+       }
+
+       /**
+        * Set the toolbar config (only in this PHP-Object, not in JS):
+        *
+        */
+
+       function setToolBar() {
+               global $BE_USER;
+               
+               $this->defaultToolbarOrder = 'bar, blockstylelabel, blockstyle, space, textstylelabel, textstyle, linebreak,
+                       bar, fontstyle, space, fontsize, space, formatblock,
+                       bar, bold, italic, underline, strikethrough, subscript, superscript,
+                       bar, lefttoright, righttoleft, bar, left, center, right, justifyfull,
+                       bar, orderedlist, unorderedlist, outdent, indent, bar, textcolor, bgcolor, textindicator,
+                       bar, emoticon, insertcharacter, line, link, image, table,' . (trim($this->thisConfig['hideTableOperationsInToolbar'] && trim($this->thisConfig['keepToggleBordersInToolbar'])) ? ' toggleborders,': '') . ' user, acronym, bar, findreplace, spellcheck,
+                       bar, chMode, inserttag, removeformat, bar, copy, cut, paste, bar, undo, redo, bar, showhelp, about, linebreak, 
+                       ' . (trim($this->thisConfig['hideTableOperationsInToolbar']) ? '': 'bar, toggleborders,') . ' bar, tableproperties, bar, rowproperties, rowinsertabove, rowinsertunder, rowdelete, rowsplit, bar,
+                       columninsertbefore, columninsertafter, columndelete, columnsplit, bar,
+                       cellproperties, cellinsertbefore, cellinsertafter, celldelete, cellsplit, cellmerge';
+               
+                       // Special toolbar for Mozilla Wamcom on Mac OS 9
+               if($this->client['BROWSER'] == 'gecko' && $this->client['VERSION'] == '1.3')  {
+                       $this->defaultToolbarOrder = $this->TCEform->docLarge ? 'bar, blockstylelabel, blockstyle, space, textstylelabel, textstyle, linebreak, 
+                               bar, fontstyle, space, fontsize, space, formatblock, bar, bold, italic, underline, strikethrough, 
+                               subscript, superscript, lefttoright, righttoleft, bar, left, center, right, justifyfull, linebreak, 
+                               bar, orderedlist, unorderedlist, outdent, indent, bar, textcolor, bgcolor, textindicator, bar, emoticon, 
+                               insertcharacter, line, link, image, table, user, acronym, bar, findreplace, spellcheck, bar, chMode, inserttag, 
+                               removeformat, bar, copy, cut, paste, bar, undo, redo, bar, showhelp, about, linebreak, 
+                               bar, toggleborders, bar, tableproperties, bar, rowproperties, rowinsertabove, rowinsertunder, rowdelete, rowsplit, bar,
+                               columninsertbefore, columninsertafter, columndelete, columnsplit, bar,
+                               cellproperties, cellinsertbefore, cellinsertafter, celldelete, cellsplit, cellmerge'
+                               : 'bar, blockstylelabel, blockstyle, space, textstylelabel, textstyle, linebreak, 
+                               bar, fontstyle, space, fontsize, space, formatblock, bar, bold, italic, underline, strikethrough, 
+                               subscript, superscript, linebreak, bar, lefttoright, righttoleft, bar, left, center, right, justifyfull, 
+                               orderedlist, unorderedlist, outdent, indent, bar, textcolor, bgcolor, textindicator, bar, emoticon, 
+                               insertcharacter, line, link, image, table, user, acronym, linebreak, bar, findreplace, spellcheck, bar, chMode, inserttag, 
+                               removeformat, bar, copy, cut, paste, bar, undo, redo, bar, showhelp, about, linebreak, 
+                               bar, toggleborders, bar, tableproperties, bar, rowproperties, rowinsertabove, rowinsertunder, rowdelete, rowsplit, bar,
+                               columninsertbefore, columninsertafter, columndelete, columnsplit, bar,
+                               cellproperties, cellinsertbefore, cellinsertafter, celldelete, cellsplit, cellmerge';
+               }
+               $toolbarOrder = $this->thisConfig['toolbarOrder'] ? $this->thisConfig['toolbarOrder'] : $this->defaultToolbarOrder;
+
+                       // Getting rid of undefined buttons
+               $this->toolbarOrderArray = array_intersect(t3lib_div::trimExplode(',', $toolbarOrder, 1), t3lib_div::trimExplode(',', $this->defaultToolbarOrder, 1));
+               $toolbarOrder = array_unique(array_values($this->toolbarOrderArray));
+
+                       // Fetching specConf for field from backend
+               $pList = is_array($this->specConf['richtext']['parameters']) ? implode(',',$this->specConf['richtext']['parameters']) : '';
+               if ($pList != '*') {    // If not all
+                       $show = is_array($this->specConf['richtext']['parameters']) ? $this->specConf['richtext']['parameters'] : array();
+                       if ($this->thisConfig['showButtons'])   {
+                               if ($this->thisConfig['showButtons'] != '*') {
+                                       $show = array_unique(array_merge($show,t3lib_div::trimExplode(',',$this->thisConfig['showButtons'],1)));
+                               } else {
+                                       $show = array_unique(array_merge($show, $toolbarOrder));
+                               }
+                       }
+                       if (is_array($this->thisConfig['showButtons.'])) {
+                               reset($this->thisConfig['showButtons.']);
+                               while(list($button,$value) = each($this->thisConfig['showButtons.'])) {
+                                       if ($value) $show[] = $button;
+                               }
+                               $show = array_unique($show);
+                       }
+               } else {
+                       $show = $toolbarOrder;
+               }
+
+                       // Resticting to RTEkeyList for backend user
+               if(is_object($BE_USER)) {
+                       $RTEkeyList = isset($BE_USER->userTS['options.']['RTEkeyList']) ? $BE_USER->userTS['options.']['RTEkeyList'] : '*';
+                       if ($RTEkeyList != '*') {       // If not all
+                               $show = array_intersect($show, t3lib_div::trimExplode(',',$RTEkeyList,1));
+                       }
+               }
+               
+                       // Hiding buttons of disabled plugins
+               $hideButtons = array('space', 'bar', 'linebreak');
+               reset($this->pluginButton);
+               while(list($plugin, $buttonList) = each($this->pluginButton) ) {
+                       if(!$this->isPluginEnable($plugin)) {
+                               $buttonArray = t3lib_div::trimExplode(',',$buttonList,1);
+                               foreach($buttonArray as $button) {
+                                       $hideButtons[] = $button;
+                               }
+                       }
+               }
+
+                       // Hiding labels of disabled plugins
+               reset($this->pluginLabel);
+               while(list($plugin, $label) = each($this->pluginLabel) ) {
+                       if(!$this->isPluginEnable($plugin)) $hideButtons[] = $label;
+               }
+
+                       // Hiding buttons not implemented in Safari
+               if ($this->client['BROWSER'] == 'safari') {
+                       reset($this->conf_toolbar_safari_hide);
+                       while(list(, $button) = each($this->conf_toolbar_safari_hide) ) {
+                               $hideButtons[] = $button;
+                       }
+               }
+               
+                       // Hiding buttons not implemented in Opera
+               if ($this->client['BROWSER'] == 'opera') {
+                       reset($this->conf_toolbar_opera_hide);
+                       while(list(, $button) = each($this->conf_toolbar_opera_hide) ) {
+                               $hideButtons[] = $button;
+                       }
+               }
+
+                       // Hiding the buttons
+               $show = array_diff($show, $this->conf_toolbar_hide, $hideButtons, t3lib_div::trimExplode(',',$this->thisConfig['hideButtons'],1));
+
+                       // Adding the always show buttons
+               $show = array_unique(array_merge($show, $this->conf_toolbar_show));
+               $toolbarOrder = array_unique(array_merge($toolbarOrder, $this->conf_toolbar_show));
+               reset($this->conf_toolbar_show);
+               while(list(,$button) = each($this->conf_toolbar_show)) {
+                       if(!in_array($button, $this->toolbarOrderArray)) $this->toolbarOrderArray[] = $button;
+               }
+
+                       // Getting rid of the buttons for which we have no position
+               $show = array_intersect($show, $toolbarOrder);
+               $this->toolBar = $show;
+       }
+
+       /**
+        * Disable some plugins
+        *
+        */
+
+       function setPlugins() {
+               
+               $hideButtons = array();
+                       // Disabling the plugins if their buttons are not in the toolbar
+               $hidePlugins = array();
+               reset($this->pluginButton);
+               while(list($plugin, $buttonList) = each($this->pluginButton) ) {
+                       $buttonArray = t3lib_div::trimExplode(',',$buttonList,1);
+                       if(!in_array($buttonArray[0],$this->toolBar)) {
+                               $hidePlugins[] = $plugin;
+                               foreach($buttonArray as $button) {
+                                       $hideButtons[] = $button;
+                               }
+                       }
+               }
+               
+               if($this->thisConfig['disableContextMenu'] || $this->thisConfig['disableRightClick']) $hidePlugins[] = 'ContextMenu';
+               if($this->thisConfig['disableSelectColor']) $hidePlugins[] = 'SelectColor';
+               if($this->thisConfig['disableTYPO3Browsers']) $hidePlugins[] = 'TYPO3Browsers';
+               if(!t3lib_extMgm::isLoaded('sr_static_info') || in_array($this->language, t3lib_div::trimExplode(',', $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->ID]['noSpellCheckLanguages']))) $hidePlugins[] = 'SpellChecker';
+               
+               $this->pluginEnableArray = array_diff($this->pluginEnableArray, $hidePlugins);
+               
+                       // Hiding labels of disabled plugins
+               reset($this->pluginLabel);
+               while(list($plugin, $label) = each($this->pluginLabel) ) {
+                       if(!$this->isPluginEnable($plugin)) $hideButtons[] = $label;
+               }
+               $this->toolBar = array_diff($this->toolBar, $hideButtons);
+
+                       // Renaming buttons of replacement plugins
+               if( $this->isPluginEnable('SelectColor') ) {
+                       $this->conf_toolbar_convert['textcolor'] = 'CO-forecolor';
+                       $this->conf_toolbar_convert['bgcolor'] = 'CO-hilitecolor';
+               }
+       }
+
+       /**
+        * Convert the TYPO3 names of buttons into the names for htmlArea RTE
+        * 
+        * @param       string  buttonname (typo3-name)
+        * @return      string  buttonname (htmlarea-name)
+        */
+
+        function convertToolBarForHTMLArea($button) {
+               return $this->conf_toolbar_convert[$button];
+        }
+
+       /**
+        * Return the JS-function for setting the RTE size.
+        *
+        * @param       string          DivID-Name
+        * @param       int                     the height for the RTE
+        * @param       int                     the width for the RTE
+        * @return string               Loader function in JS
+        */
+       function setRTEsizeByJS($divId, $height, $width) {
+               return '
+                       setRTEsizeByJS(\''.$divId.'\','.$height.', '.$width.');
+               ';
+       }
+
+       /**
+        * Return the HTML-Code for loading the Javascript-Files
+        *
+        * @return string               the html-code for loading the Javascript-Files
+        */
+       function loadJSfiles($number) {
+               return '
+               <script type="text/javascript">
+               /*<![CDATA[*/
+                       var _editor_url = "' . $this->extHttpPath . 'htmlarea";
+                       var _editor_lang = "' . $this->language . '";
+                       var _editor_CSS = "' . $this->editorCSS . '";
+                       var _editor_skin = "' . dirname($this->editorCSS) . '";
+                       var _editor_edited_content_CSS = "' .  $this->editedContentCSS  . '";
+                       var _typo3_host_url = "' . $this->hostURL . '";
+                       var _editor_debug_mode = ' . ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->ID]['enableDebugMode'] ? 'true' : 'false') . ';
+                       var _editor_compressed_scripts = ' . ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->ID]['enableCompressedScripts'] ? 'true' : 'false') . ';
+                       var _editor_mozAllowClipboard_url = "' . ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->ID]['mozAllowClipboardUrl'] ? $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->ID]['mozAllowClipboardUrl'] : '') . '";
+                       var _spellChecker_lang = "' . $this->spellCheckerLanguage . '";
+                       var _spellChecker_charset = "' . $this->spellCheckerCharset . '";
+                       var _spellChecker_mode = "' . $this->spellCheckerMode . '";
+                       var _quickTag_hideTags = "' . $this->quickTagHideTags . '";
+               /*]]>*/
+               </script>
+               <script type="text/javascript" src="' . $this->buildJSMainLangFile($number) . '"></script>
+               <script type="text/javascript" src="' . $this->extHttpPath . 'htmlarea/htmlarea' . ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->ID]['enableCompressedScripts']?'-compressed':'') .'.js"></script>
+               ';
+       }
+
+       /**
+        * Return the JS-Code to initialize the Editor
+        *
+        * @return string       the html-code for loading the Javascript-Files
+        */
+
+       function loadJScode($number) {
+               global $TSFE;
+               $loadPluginCode = '';
+               $pluginArray = t3lib_div::trimExplode(',', $this->pluginList , 1);
+               while( list(,$plugin) = each($pluginArray) ) {
+                       if ($this->isPluginEnable($plugin) || (intval($number) > 1 && in_array($plugin, $this->pluginEnableArrayMultiple))) {
+                               $loadPluginCode .= '
+                       HTMLArea.loadPlugin("' . $plugin . '", true);';
+                       }
+               }
+               return (!is_object($TSFE) ? '' : '
+               ' . '/*<![CDATA[*/') . '
+                       var conf_RTEtsConfigParams = "&RTEtsConfigParams=' . rawurlencode($this->RTEtsConfigParams()) . '";
+                       var RTEarea = new Array();
+                       var extHttpPath = "'.$this->extHttpPath.'";
+                       var rtePathImageFile = "'. $this->extHttpPath . $this->ID . '_select_image.php";
+                       var rtePathLinkFile = "' . $this->extHttpPath . $this->ID . '_browse_links.php";
+                       var rtePathUserFile = "' . $this->extHttpPath . $this->ID . '_user.php";
+                       var rtePathAcronymFile = "' . $this->extHttpPath . $this->ID . '_acronym.php";
+                       var rtePathParseHtmlFile = "' . $this->extHttpPath . $this->ID . '_parse_html.php";'
+                       . $loadPluginCode .  '
+                       HTMLArea.init();' . (!is_object($TSFE) ? '' : '
+               /*]]>*/
+               ');
+       }
+
+       /**
+        * Return the JS-Code for Register the RTE in JS
+        *
+        * @return string               the JS-Code for Register the RTE in JS
+        */
+       
+       function registerRTEinJS($number) {
+               global $TSFE;
+               
+               $registerRTEinJSString = (!is_object($TSFE) ? '' : '
+                       ' . '/*<![CDATA[*/') . '
+                       RTEarea['.$number.'] = new Array();
+                       RTEarea['.$number.']["number"] = '.$number.';
+                       RTEarea['.$number.']["id"] = "RTEarea'.$number.'";
+                       RTEarea['.$number.']["enableWordClean"] = ' . (trim($this->thisConfig['enableWordClean'])?'true':'false') . ';
+                       RTEarea['.$number.']["htmlRemoveComments"] = ' . (trim($this->thisConfig['removeComments'])?'true':'false') . ';
+                       RTEarea['.$number.']["disableEnterParagraphs"] = ' . (trim($this->thisConfig['disableEnterParagraphs'])?'true':'false') . ';
+                       RTEarea['.$number.']["removeTrailingBR"] = ' . (trim($this->thisConfig['removeTrailingBR'])?'true':'false') . ';
+                       RTEarea['.$number.']["useCSS"] = ' . (trim($this->thisConfig['useCSS'])?'true':'false') . ';
+                       RTEarea['.$number.']["keepButtonGroupTogether"] = ' . (trim($this->thisConfig['keepButtonGroupTogether'])?'true':'false') . ';
+                       RTEarea['.$number.']["disablePCexamples"] = ' . (trim($this->thisConfig['disablePCexamples'])?'true':'false') . ';
+                       RTEarea['.$number.']["statusBar"] = ' . (trim($this->thisConfig['showStatusBar'])?'true':'false') . ';
+                       RTEarea['.$number.']["showTagFreeClasses"] = ' . (trim($this->thisConfig['showTagFreeClasses'])?'true':'false') . ';
+                       RTEarea['.$number.']["useHTTPS"] = ' . (trim(stristr($this->siteURL, 'https'))?'true':'false') . ';
+                       RTEarea['.$number.']["enableMozillaExtension"] = ' . (($this->client['BROWSER'] == 'gecko' && $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->ID]['enableMozillaExtension'])?'true':'false') . ';';
+               
+                       // The following properties apply only to the backend
+               if (!is_object($TSFE)) {
+                       $registerRTEinJSString .= '
+                       RTEarea['.$number.']["typo3ContentLanguage"] = "' . $this->contentTypo3Language . '";
+                       RTEarea['.$number.']["typo3ContentCharset"] = "' . $this->contentCharset . '";
+                       RTEarea['.$number.']["enablePersonalDicts"] = ' . ($this->spellCheckerPersonalDicts ? 'true' : 'false') . ';
+                       RTEarea['.$number.']["userUid"] = "' . $this->userUid . '";';
+               }
+               
+                       // Setting the plugin flags
+               $registerRTEinJSString .= '
+                       RTEarea['.$number.']["plugin"] = new Array();';
+               
+               $pluginArray = t3lib_div::trimExplode(',', $this->pluginList , 1);
+               while( list(,$plugin) = each($pluginArray) ) {
+                       if ($this->isPluginEnable($plugin)) {
+                               $registerRTEinJSString .= '
+                       RTEarea['.$number.']["plugin"]["'.$plugin.'"] = true;';
+                       }
+               }
+
+                       // Setting the list of tags to be removed if specified in the RTE config
+               if (trim($this->thisConfig['removeTags']))  {
+                       $registerRTEinJSString .= '
+                       RTEarea['.$number.']["htmlRemoveTags"] = /^(' . implode('|', t3lib_div::trimExplode(',', $this->thisConfig['removeTags'], 1)) . ')$/i;';
+               }
+
+                       // Setting the list of tags to be removed with their contents if specified in the RTE config
+               if (trim($this->thisConfig['removeTagsAndContents']))  {
+                       $registerRTEinJSString .= '
+                       RTEarea['.$number.']["htmlRemoveTagsAndContents"] = /^(' . implode('|', t3lib_div::trimExplode(',', $this->thisConfig['removeTagsAndContents'], 1)) . ')$/i;';
+               }
+               
+                       // Process default style configuration
+               $registerRTEinJSString .= '
+                       RTEarea['.$number.']["defaultPageStyle"] = "' . substr($this->siteURL,0,-1) . $this->buildJSFile('css', $this->buildStyleSheet(), 'css') . '";';
+                       
+                       // Setting the pageStyle
+               $filename = trim($this->thisConfig['contentCSS']) ? trim($this->thisConfig['contentCSS']) : 'EXT:' . $this->ID . '/htmlarea/plugins/DynamicCSS/dynamiccss.css';
+               $registerRTEinJSString .= '
+                       RTEarea['.$number.']["pageStyle"] = "' . $this->getFullFileName($filename) .'";';
+               
+                       // Process colors configuration
+               if ( $this->isPluginEnable('SelectColor') ) {
+                       $registerRTEinJSString .= $this->buildJSColorsConfig($number);
+               }
+               
+                       // Process classes configuration
+               if ($this->isPluginEnable('InlineCSS') || $this->isPluginEnable('DynamicCSS')) {
+                       $registerRTEinJSString .= $this->buildJSClassesConfig($number);
+               }
+               
+                       // Process font faces configuration
+               $registerRTEinJSString .= $this->buildJSFontFacesConfig($number);
+               
+                       // Process paragraphs configuration
+               $registerRTEinJSString .= $this->buildJSParagraphsConfig($number);
+               
+                       // Process font sizes configuration
+               $registerRTEinJSString .= $this->buildJSFontSizesConfig($number);
+               
+               if ($this->isPluginEnable('TableOperations')) {
+                       $registerRTEinJSString .= '
+                       RTEarea['.$number.']["hideTableOperationsInToolbar"] = ' . (trim($this->thisConfig['hideTableOperationsInToolbar']) ? 'true' : 'false') . ';
+                       RTEarea['.$number.']["keepToggleBordersInToolbar"] = ' . (trim($this->thisConfig['keepToggleBordersInToolbar'])?'true':'false') . ';
+                       RTEarea['.$number.']["disableLayoutFieldsetInTableOperations"] = ' . (trim($this->thisConfig['disableLayoutFieldsetInTableOperations'])?'true':'false') . ';
+                       RTEarea['.$number.']["disableAlignmentFieldsetInTableOperations"] = ' . (trim($this->thisConfig['disableAlignmentFieldsetInTableOperations'])?'true':'false') . ';
+                       RTEarea['.$number.']["disableSpacingFieldsetInTableOperations"] = ' . (trim($this->thisConfig['disableSpacingFieldsetInTableOperations'])?'true':'false') . ';
+                       RTEarea['.$number.']["disableBordersFieldsetInTableOperations"] = ' . (trim($this->thisConfig['disableBordersFieldsetInTableOperations'])?'true':'false') . ';
+                       RTEarea['.$number.']["disableColorFieldsetInTableOperations"] = ' . (trim($this->thisConfig['disableColorFieldsetInTableOperations'])?'true':'false') . ';';
+               }
+               
+               if ($this->isPluginEnable('Acronym')) {
+                       $registerRTEinJSString .= '
+                       RTEarea['.$number.']["acronymUrl"] = "' . $this->buildJSFile('acronym_'.$this->contentLanguageUid, $this->buildJSAcronymArray()) . '";';
+               }
+               
+               if ($this->isPluginEnable('TYPO3Browsers')) {
+                       $registerRTEinJSString .= $this->buildJSClassesAnchorConfig($number);
+               }
+               
+               $registerRTEinJSString .= '
+                       RTEarea['.$number.']["toolbar"] = '.$this->getJSToolbarArray().';
+                       HTMLArea.initEditor('.$number.');' . (!is_object($TSFE) ? '' : '
+                       /*]]>*/');
+               return $registerRTEinJSString;
+       }
+
+       /**
+        * Return ture, if the plugin can loaded
+        *
+        * @return boolean              1 if the plugin can be loaded
+        */
+
+       function isPluginEnable($plugin) { 
+               return in_array($plugin, $this->pluginEnableArray);
+       }
+       
+       
+       /**
+        * Return JS configuration of font sizes
+        *
+        * @return string               JS font sizes configuration
+        */
+       function buildJSFontSizesConfig($number) {
+               global $LANG, $TSFE;
+               $registerRTEinJSString = '';
+               
+                       // Builing JS array of default font sizes
+               $HTMLAreaFontSizes = array();
+               if (is_object($TSFE)) {
+                       $HTMLAreaFontSizes[0] = $TSFE->csConvObj->conv($TSFE->getLLL('No size',$this->LOCAL_LANG), $TSFE->labelsCharset, $TSFE->renderCharset);
+               } else {
+                       $HTMLAreaFontSizes[0] = $LANG->getLL('No size');
+               }
+               
+               //$HTMLAreaFontSizes = $this->defaultFontSizes;
+               reset($this->defaultFontSizes);
+               while( list($FontSizeItem,$FontSizeLabel) = each($this->defaultFontSizes)) {
+                       $HTMLAreaFontSizes[$FontSizeItem] = $FontSizeLabel;
+               }
+               if ($this->thisConfig['hideFontSizes'] ) {
+                       $hideFontSizes =  t3lib_div::trimExplode(',', $this->cleanList($this->thisConfig['hideFontSizes']), 1);
+                       foreach($hideFontSizes as $item)  unset($HTMLAreaFontSizes[strtolower($item)]);
+               }
+               
+               $HTMLAreaJSFontSize = '{';
+               if ($this->cleanList($this->thisConfig['hideFontSizes']) != '*') {
+                       reset($HTMLAreaFontSizes);
+                       $HTMLAreaParagraphIndex = 0;
+                       while( list($FontSizeItem,$FontSizeLabel) = each($HTMLAreaFontSizes)) {
+                               if($HTMLAreaFontSizeIndex) { 
+                                       $HTMLAreaJSFontSize .= ',';
+                               }
+                               $HTMLAreaJSFontSize .= '
+                               "' . $FontSizeLabel . '" : "' . ($FontSizeItem?$FontSizeItem:'') . '"';
+                               $HTMLAreaFontSizeIndex++;
+                       }
+               }
+               $HTMLAreaJSFontSize .= '};';
+               $registerRTEinJSString .= '
+                       RTEarea['.$number.']["fontsize"] = '. $HTMLAreaJSFontSize;
+                       
+               return $registerRTEinJSString;
+       }
+       /**
+        * Return JS configuration of paragraphs
+        *
+        * @return string               JS paragraphs configuration
+        */
+       function buildJSParagraphsConfig($number) {
+               global $TSFE, $LANG;
+               $registerRTEinJSString = '';
+               
+                       // Paragraphs
+               $HTMLAreaParagraphs = $this->defaultParagraphs;
+               if ($this->thisConfig['hidePStyleItems']) {
+                       $hidePStyleItems =  t3lib_div::trimExplode(',', $this->cleanList($this->thisConfig['hidePStyleItems']), 1);
+                       foreach($hidePStyleItems as $item)  unset($HTMLAreaParagraphs[strtolower($item)]);
+               }
+               $HTMLAreaJSParagraph = '{';
+               if ($this->cleanList($this->thisConfig['hidePStyleItems']) != '*') {
+                       reset($HTMLAreaParagraphs);
+                       $HTMLAreaParagraphIndex = 0;
+                       while( list($PStyleItem,$PStyleLabel) = each($HTMLAreaParagraphs)) {
+                               if($HTMLAreaParagraphIndex) { 
+                                       $HTMLAreaJSParagraph .= ',';
+                               }
+                               if (is_object($TSFE)) {
+                                       $HTMLAreaJSParagraph .= '
+                               "' . $TSFE->csConvObj->conv($TSFE->getLLL($PStyleLabel,$this->LOCAL_LANG), $TSFE->labelsCharset, $TSFE->renderCharset) . '" : "' . $PStyleItem . '"';
+
+                               } else {
+                                       $HTMLAreaJSParagraph .= '
+                               "' . $LANG->getLL($PStyleLabel) . '" : "' . $PStyleItem . '"';
+                               }
+                               $HTMLAreaParagraphIndex++;
+                       }
+               }
+               $HTMLAreaJSParagraph .= '};';
+               $registerRTEinJSString .= '
+                       RTEarea['.$number.']["paragraphs"] = '. $HTMLAreaJSParagraph;
+                       
+               return $registerRTEinJSString;
+       }
+       
+       /**
+        * Return JS configuration of font faces
+        *
+        * @return string               JS font faces configuration
+        */
+       function buildJSFontfacesConfig($number) {
+               global $TSFE, $LANG;
+               
+               if (is_object($TSFE)) {
+                       $RTEProperties = $this->RTEsetup;
+               } else {
+                       $RTEProperties = $this->RTEsetup['properties'];
+               }
+               
+               $registerRTEinJSString = '';
+               
+                       // Builing JS array of default font faces
+               $HTMLAreaFontname = array();
+               $HTMLAreaFontname['nofont'] = '
+                               "' . $fontName . '" : "' . $this->cleanList($fontValue) . '"';
+               $defaultFontFacesList = 'nofont,';
+               if (is_object($TSFE)) {
+                       $HTMLAreaFontname['nofont'] = '
+                               "' . $TSFE->csConvObj->conv($TSFE->getLLL('No font',$this->LOCAL_LANG), $TSFE->labelsCharset, $TSFE->renderCharset) . '" : ""';
+               } else {
+                       $HTMLAreaFontname['nofont'] = '
+                               "' . $LANG->getLL('No font') . '" : ""';
+               }
+               
+               $hideFontFaces = $this->cleanList($this->thisConfig['hideFontFaces']);
+               if ($hideFontFaces != '*') {
+                       $index = 0;
+                       reset($this->defaultFontFaces);
+                       while (list($fontName,$fontValue) = each($this->defaultFontFaces)) {
+                               if (!t3lib_div::inList($hideFontFaces, $index+1)) {
+                                       $HTMLAreaFontname[$fontName] = '
+                               "' . $fontName . '" : "' . $this->cleanList($fontValue) . '"';
+                                       $defaultFontFacesList .= $fontName . ',';
+                               }
+                               $index++;
+                       }
+               }
+               
+                       // Adding configured font faces
+               if (is_array($RTEProperties['fonts.'])) {
+                       reset($RTEProperties['fonts.']);
+                       while(list($fontName,$conf)=each($RTEProperties['fonts.'])) {
+                               $fontName=substr($fontName,0,-1);
+                               if (is_object($TSFE)) {
+                                       $string = $TSFE->sL($conf['name']);
+                               } else {
+                                       $string = $LANG->sL($conf['name']);
+                               }
+                               $HTMLAreaFontname[$fontName] = '
+                               "' . str_replace('"', '\"', str_replace('\\\'', '\'', $string)) . '" : "' . $this->cleanList($conf['value']) . '"';
+                       }
+               }
+               
+                       // Setting the list of font faces
+               $HTMLAreaJSFontface = '{';
+               $HTMLAreaFontface = t3lib_div::trimExplode(',' , $this->cleanList($defaultFontFacesList . ',' . $this->thisConfig['fontFace']));
+               reset($HTMLAreaFontface);
+               $HTMLAreaFontfaceIndex = 0;
+               while( list(,$fontName) = each($HTMLAreaFontface)) {
+                       if($HTMLAreaFontfaceIndex) { 
+                               $HTMLAreaJSFontface .= ',';
+                       }
+                       $HTMLAreaJSFontface .= $HTMLAreaFontname[$fontName];
+                       $HTMLAreaFontfaceIndex++;
+               }
+               $HTMLAreaJSFontface .= '};';
+               
+               $registerRTEinJSString .= '
+                       RTEarea['.$number.']["fontname"] = '. $HTMLAreaJSFontface;
+               
+               return $registerRTEinJSString;
+       }
+       
+       /**
+        * Return JS configuration of colors
+        *
+        * @return string               JS colors configuration
+        */
+       function buildJSColorsConfig($number) {
+               global $TSFE, $LANG;
+               
+               if (is_object($TSFE)) {
+                       $RTEProperties = $this->RTEsetup;
+               } else {
+                       $RTEProperties = $this->RTEsetup['properties'];
+               }
+               
+               $registerRTEinJSString = '';
+               
+               if(trim($this->thisConfig['disableColorPicker'])) {
+                       $registerRTEinJSString .= '
+                       RTEarea['.$number.']["disableColorPicker"] = true;';
+               } else {
+                       $registerRTEinJSString .= '
+                       RTEarea['.$number.']["disableColorPicker"] = false;';
+               }
+               
+                       // Building JS array of configured colors
+               if (is_array($RTEProperties['colors.']) )  {
+                       $HTMLAreaColorname = array();
+                       reset($RTEProperties['colors.']);
+                       while(list($colorName,$conf)=each($RTEProperties['colors.']))      {
+                               $colorName=substr($colorName,0,-1);
+                               if (is_object($TSFE)) {
+                                       $string = $TSFE->csConvObj->conv($TSFE->sL(trim($conf['name'])), $TSFE->renderCharset, $TSFE->metaCharset);
+                                       $string = str_replace('"', '\"', str_replace('\\\'', '\'', $string));
+                                       $string = $this->feJScharCode($string);
+                               } else {
+                                       $string = $this->getLLContent(trim($conf['name']));
+                               }
+                               $HTMLAreaColorname[$colorName] = '
+                               [' . $string . ' , "' . $conf['value'] . '"]';
+                       }
+               }
+               
+                       // Setting the list of colors if specified in the RTE config
+               if ($this->thisConfig['colors'] ) {
+                       $HTMLAreaJSColors = '[';
+                       $HTMLAreaColors = t3lib_div::trimExplode(',' , $this->cleanList($this->thisConfig['colors']));
+                       reset($HTMLAreaColors);
+                       $HTMLAreaColorsIndex = 0;
+                       while( list(,$colorName) = each($HTMLAreaColors)) {
+                               if($HTMLAreaColorsIndex && $HTMLAreaColorname[$colorName]) { 
+                                       $HTMLAreaJSColors .= ',';
+                               }
+                               $HTMLAreaJSColors .= $HTMLAreaColorname[$colorName];
+                               $HTMLAreaColorsIndex++;
+                       }
+                       $HTMLAreaJSColors .= '];';
+                       $registerRTEinJSString .= '
+                       RTEarea['.$number.']["colors"] = '. $HTMLAreaJSColors;
+               }
+               
+               return $registerRTEinJSString;
+       }
+       
+       /**
+        * Build the default content style sheet
+        *
+        * @return string               Style sheet
+        */
+       function buildStyleSheet() {
+               
+               if (!trim($this->thisConfig['ignoreMainStyleOverride'])) {
+                       $mainStyle_font = $this->thisConfig['mainStyle_font'] ? $this->thisConfig['mainStyle_font']: 'Verdana,sans-serif';
+                       
+                       $mainElements = array();
+                       $mainElements['P'] = $this->thisConfig['mainStyleOverride_add.']['P'];
+                       $elList = explode(',','H1,H2,H3,H4,H5,H6,PRE');
+                       reset($elList);
+                       while(list(,$elListName)=each($elList)) {
+                               if ($this->thisConfig['mainStyleOverride_add.'][$elListName]) {
+                                       $mainElements[$elListName] = $this->thisConfig['mainStyleOverride_add.'][$elListName];
+                               }
+                       }
+                       
+                       $addElementCode = '';
+                       reset($mainElements);
+                       while(list($elListName,$elValue)=each($mainElements))   {
+                               $addElementCode .= strToLower($elListName) . ' {'.$elValue."}\n";
+                       }
+                       
+                       $stylesheet = $this->thisConfig['mainStyleOverride'] ? $this->thisConfig['mainStyleOverride'] : chr(10) .
+                               'body.htmlarea-content-body { font-family: ' . $mainStyle_font .
+                                       '; font-size: '.($this->thisConfig['mainStyle_size'] ? $this->thisConfig['mainStyle_size'] : '12px') .
+                                       '; color: '.($this->thisConfig['mainStyle_color']?$this->thisConfig['mainStyle_color'] : 'black') .
+                                       '; background-color: '.($this->thisConfig['mainStyle_bgcolor'] ? $this->thisConfig['mainStyle_bgcolor'] : 'white') .
+                                       ';'.$this->thisConfig['mainStyleOverride_add.']['BODY'].'}' . chr(10) .
+                               'td { ' . $this->thisConfig['mainStyleOverride_add.']['TD'].'}' . chr(10) .
+                               'div { ' . $this->thisConfig['mainStyleOverride_add.']['DIV'].'}' . chr(10) .
+                               'pre { ' . $this->thisConfig['mainStyleOverride_add.']['PRE'].'}' . chr(10) .
+                               'ol { ' . $this->thisConfig['mainStyleOverride_add.']['OL'].'}' . chr(10) .
+                               'ul { ' . $this->thisConfig['mainStyleOverride_add.']['UL'].'}' . chr(10) .
+                               'blockquote { ' . $this->thisConfig['mainStyleOverride_add.']['BLOCKQUOTE'].'}' . chr(10) .
+                               $addElementCode;
+       
+                       if (is_array($this->thisConfig['inlineStyle.']))        {
+                               $stylesheet .= chr(10) . implode(chr(10), $this->thisConfig['inlineStyle.']) . chr(10);
+                       }
+               } else {
+                       $stylesheet = '/* mainStyleOverride and inlineStyle properties ignored. */';
+               }
+               return $stylesheet;
+       }
+       
+       /**
+        * Return JS configuration of classes
+        *
+        * @return string               JS classes configuration
+        */
+       function buildJSClassesConfig($number) {
+               
+                       // Build JS array of lists of classes
+               $classesTagList = 'classesCharacter, classesParagraph, classesImage, classesTable, classesLinks, classesTD';
+               $classesTagConvert = array( 'classesCharacter' => 'span', 'classesParagraph' => 'p', 'classesImage' => 'img', 'classesTable' => 'table', 'classesLinks' => 'a', 'classesTD' => 'td');
+               $classesTagArray = t3lib_div::trimExplode(',' , $classesTagList);
+               $registerRTEinJSString = '
+                       RTEarea['.$number.']["classesTag"] = new Array();';
+               while( list(,$classesTagName) = each($classesTagArray)) {
+                       $HTMLAreaJSClasses = ($this->thisConfig[$classesTagName])?('"' . $this->cleanList($this->thisConfig[$classesTagName]) . '";'):'null;';
+                       $registerRTEinJSString .= '
+                       RTEarea['.$number.']["classesTag"]["'. $classesTagConvert[$classesTagName] .'"] = '. $HTMLAreaJSClasses;
+               }
+               
+                       // Include JS arrays of configured classes
+               $registerRTEinJSString .= '
+                       RTEarea['.$number.']["classesUrl"] = "' . substr($this->siteURL,0,-1) . $this->buildJSFile('classes_'.$this->contentLanguageUid, $this->buildJSClassesArray()) . '";';
+               
+               return $registerRTEinJSString;
+       }
+       
+       /**
+        * Return JS arrays of classes labels and noShow flags
+        *
+        * @return string               JS classes arrays
+        */
+       function buildJSClassesArray() {
+               global $TSFE, $LANG;
+               
+               if (is_object($TSFE)) {
+                       $RTEProperties = $this->RTEsetup;
+               } else {
+                       $RTEProperties = $this->RTEsetup['properties'];
+               }
+               
+               $linebreak = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->ID]['enableCompressedScripts'] ? '' : chr(10);
+               $index = 0;
+               $JSClassesLabelsArray = 'HTMLArea.classesLabels = { ' . $linebreak;
+               $JSClassesValuesArray = 'HTMLArea.classesValues = { ' . $linebreak;
+               $JSClassesNoShowArray = 'HTMLArea.classesNoShow = { ' . $linebreak;
+               
+                       // Scanning the list of classes if specified in the RTE config
+               if (is_array($RTEProperties['classes.']))  {
+                       $stylesheet = '';
+                       reset($RTEProperties['classes.']);
+                       while(list($className,$conf)=each($RTEProperties['classes.'])) {
+                               $className = substr($className,0,-1);
+                               if (is_object($TSFE)) {
+                                       $string = $TSFE->csConvObj->conv($TSFE->sL(trim($conf['name'])), $TSFE->renderCharset, $TSFE->metaCharset);
+                                       $string = str_replace('"', '\"', str_replace('\\\'', '\'', $string));
+                                       $string = $this->feJScharCode($string);
+                               } else {
+                                       $string = $this->getLLContent(trim($conf['name']));
+                               }
+                               $JSClassesLabelsArray .= (($index)?',':'') . '"' . $className . '": ' . $string . $linebreak;
+                               $JSClassesValuesArray .= (($index)?',':'') . '"' . $className . '":"' . str_replace('"', '\"', str_replace('\\\'', '\'', $conf['value'])) . '"' . $linebreak;
+                               $JSClassesNoShowArray .= (($index)?',':'') . '"' . $className . '":' . ($conf['noShow']?'true':'false') . $linebreak;
+                               $index++;
+                       }
+               }
+               $JSClassesLabelsArray .= '};' . $linebreak;
+               $JSClassesValuesArray .= '};' . $linebreak;
+               $JSClassesNoShowArray .= '};' . $linebreak;
+               
+               return $JSClassesLabelsArray . $JSClassesValuesArray . $JSClassesNoShowArray;
+       }
+       
+       /**
+        * Return a JS language array for htmlArea RTE
+        *
+        * @return string               JS language array
+        */
+       function buildJSMainLangArray() { 
+               global $TSFE, $LANG;
+
+               $linebreak = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->ID]['enableCompressedScripts'] ? '' : chr(10);
+               $JSLanguageArray .= 'var HTMLArea_langArray = new Array();' . $linebreak;
+               $JSLanguageArray .= 'HTMLArea_langArray = { ' . $linebreak;
+               if(is_object($TSFE)) {
+                       $JSLanguageArray = $TSFE->csConvObj->conv($JSLanguageArray, 'iso-8859-1', $this->OutputCharset);
+               } else {
+                       $JSLanguageArray = $LANG->csConvObj->conv($JSLanguageArray, 'iso-8859-1', $this->OutputCharset);
+               }
+
+               $subArrays = array( 'tooltips', 'msg' , 'dialogs');
+               $subArraysIndex = 0;
+               foreach($subArrays as $labels) {
+                       $JSLanguageArray .= (($subArraysIndex++)?',':'') . $labels . ': {' . $linebreak;
+                       if(is_object($TSFE)) {
+                               $LOCAL_LANG = $TSFE->readLLfile(t3lib_extMgm::extPath($this->ID).'htmlarea/locallang_' . $labels . '.php');
+                               if($this->typoVersion >= 3007000 ) {
+                                       $TSFE->csConvObj->convArray($LOCAL_LANG['default'], 'iso-8859-1', $this->OutputCharset);
+                                       if(!empty($LOCAL_LANG[$this->language])) $TSFE->csConvObj->convArray($LOCAL_LANG[$this->language], $this->charset, $this->OutputCharset);
+                               } else {
+                                       $this->convArray($LOCAL_LANG['default'], 'iso-8859-1', $this->OutputCharset);
+                                       if(!empty($LOCAL_LANG[$this->language])) $this->convArray($LOCAL_LANG[$this->language], $this->charset, $this->OutputCharset);
+                               }
+                       } else {
+                               $LOCAL_LANG = $LANG->readLLfile(t3lib_extMgm::extPath($this->ID).'htmlarea/locallang_' . $labels . '.php');
+                               if($this->typoVersion >= 3007000 ) {
+                                       $LANG->csConvObj->convArray($LOCAL_LANG['default'], 'iso-8859-1', $this->OutputCharset);
+                                       if(!empty($LOCAL_LANG[$this->language])) $LANG->csConvObj->convArray($LOCAL_LANG[$this->language], $this->charset, $this->OutputCharset);
+                               } else {
+                                       $this->convArray($LOCAL_LANG['default'], 'iso-8859-1', $this->OutputCharset);
+                                       if(!empty($LOCAL_LANG[$this->language])) $this->convArray($LOCAL_LANG[$this->language], $this->charset, $this->OutputCharset);
+                               }
+                       }
+                       if(!empty($LOCAL_LANG[$this->language])) {
+                               $LOCAL_LANG[$this->language] = t3lib_div::array_merge_recursive_overrule($LOCAL_LANG['default'], $LOCAL_LANG[$this->language]);
+                       } else {
+                               $LOCAL_LANG[$this->language] = $LOCAL_LANG['default'];
+                       }
+                       $index = 0;
+                       foreach ( $LOCAL_LANG[$this->language] as $labelKey => $labelValue ) {
+                               $JSLanguageArray .=  (($index++)?',':'') . '"' . $labelKey . '":"' . str_replace('"', '\"', $labelValue) . '"' . $linebreak;
+                       }
+                       if(is_object($TSFE)) {
+                               $JSLanguageArray .= $TSFE->csConvObj->conv(' }' . chr(10), 'iso-8859-1', $this->OutputCharset);
+                       } else {
+                               $JSLanguageArray .= $LANG->csConvObj->conv(' }' . chr(10), 'iso-8859-1', $this->OutputCharset);
+                       }
+               }
+
+               if(is_object($TSFE)) {
+                       $JSLanguageArray .= $TSFE->csConvObj->conv(' }' . chr(10), 'iso-8859-1', $this->OutputCharset);
+               } else {
+                       $JSLanguageArray .= $LANG->csConvObj->conv(' }' . chr(10), 'iso-8859-1', $this->OutputCharset);
+               }
+               return $JSLanguageArray;
+       }
+
+       /**
+        * Return an acronym array for the Acronym plugin
+        *
+        * @return string               acronym array
+        */
+
+       function buildJSAcronymArray() {
+
+               $linebreak = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->ID]['enableCompressedScripts'] ? '' : chr(10);
+               $acronymIndex = 0;
+               $abbraviationIndex = 0;
+               $JSAcronymArray .= 'acronyms = { ' . $linebreak;
+               $JSAbbreviationArray .= 'abbreviations = { ' . $linebreak;
+               $table = 'tx_rtehtmlarea_acronym';
+               if($this->contentLanguageUid > -1) {
+                       $whereClause = '(sys_language_uid="'.$this->contentLanguageUid . '" OR sys_language_uid="-1")';
+               } else {
+                       $whereClause = '1 = 1';
+               }
+               $whereClause .= t3lib_BEfunc::BEenableFields($table);
+               $whereClause .= t3lib_BEfunc::deleteClause($table);
+               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('type,term,acronym', $table, $whereClause);
+               while($acronymRow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))    {
+                       if($acronymRow['type'] == 1) $JSAcronymArray .= (($acronymIndex++)?',':'') . '"' . $acronymRow['acronym'] . '":"' . $acronymRow['term'] . '"' . $linebreak;
+                       if($acronymRow['type'] == 2) $JSAbbreviationArray .= (($AbbreviationIndex++)?',':'') . '"' . $acronymRow['acronym'] . '":"' . $acronymRow['term'] . '"' . $linebreak;
+               }
+               $JSAcronymArray .= '};' . $linebreak;
+               $JSAbbreviationArray .= '};' . $linebreak;
+
+               return $JSAcronymArray . $JSAbbreviationArray;
+       }
+       
+       /**
+        * Return JS configuration of special anchor classes
+        *
+        * @return string               JS special anchor classes configuration
+        */
+       function buildJSClassesAnchorConfig($number) {
+               global $TSFE;
+               
+               if (is_object($TSFE)) {
+                       $RTEProperties = $this->RTEsetup;
+               } else {
+                       $RTEProperties = $this->RTEsetup['properties'];
+               }
+               
+               $registerRTEinJSString = '';
+               if (is_array($RTEProperties['classesAnchor.'])) {
+                       $registerRTEinJSString .= '
+                       RTEarea['.$number.']["classesAnchorUrl"] = "' . $this->buildJSFile('classesAnchor_'.$this->contentLanguageUid, $this->buildJSClassesAnchorArray()) . '";';
+               }
+               return $registerRTEinJSString;
+       }
+       
+       /**
+        * Return a JS array for special anchor classes
+        *
+        * @return string               classesAnchor array definition
+        */
+       function buildJSClassesAnchorArray() {
+               global $LANG;
+               
+               $linebreak = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->ID]['enableCompressedScripts'] ? '' : chr(10);
+               $JSClassesAnchorArray .= 'editor.classesAnchorSetup = [ ' . $linebreak;
+               $classesAnchorIndex = 0;
+               reset($this->RTEsetup['properties']['classesAnchor.']);
+               while(list($label,$conf)=each($this->RTEsetup['properties']['classesAnchor.'])) {
+                       if(is_array($conf) && $conf['class']) {
+                               $JSClassesAnchorArray .= (($classesAnchorIndex++)?',':'') . ' { ' . $linebreak;
+                               $index = 0;
+                               $JSClassesAnchorArray .= (($index++)?',':'') . 'name : "' . $conf['class'] . '"' . $linebreak;
+                               if($conf['type']) $JSClassesAnchorArray .= (($index++)?',':'') . 'type : "' . $conf['type'] . '"' . $linebreak;
+                               if(trim($conf['image'])) {
+                                       $JSClassesAnchorArray .= (($index++)?',':'') . 'image : "' . $this->getFullFileName(trim($conf['image'])) . '"' . $linebreak;
+                               }
+                               if(trim($conf['altText'])) {
+                                       $string = $this->getLLContent(trim($conf['altText']));
+                                       $JSClassesAnchorArray .= (($index++)?',':'') . 'altText : ' . str_replace('"', '\"', str_replace('\\\'', '\'', $string)) . $linebreak;
+                               }
+                               if(trim($conf['titleText'])) {
+                                       $string = $this->getLLContent(trim($conf['titleText']));
+                                       $JSClassesAnchorArray .= (($index++)?',':'') . 'titleText : ' . str_replace('"', '\"', str_replace('\\\'', '\'', $string)) . $linebreak;
+                               }
+                               $JSClassesAnchorArray .= '}' . $linebreak;
+                       }
+               }       
+               $JSClassesAnchorArray .= '];' . $linebreak;
+               return $JSClassesAnchorArray;
+        }
+       
+       /**
+        * Return a file name built with the label and containing the specified contents
+        *
+        * @return string               filename
+        */
+
+       function buildJSFile($label,$contents,$ext='js') {
+               $relFilename = 'typo3temp/' . $this->ID . '_' . $label . '_' . md5($contents) . '.' . $ext;
+               $outputFilename = PATH_site . $relFilename;
+               if(!file_exists($outputFilename)) {
+                       $outputHandle = fopen($outputFilename,'wb');
+                       fwrite($outputHandle, $contents);
+                       fclose($outputHandle);
+               }
+               return $this->httpTypo3Path . $relFilename;
+       }
+
+       /**
+        * Return a file name containing the main JS language array for HTMLArea
+        *
+        * @return string               filename
+        */
+
+       function buildJSMainLangFile($number) { 
+               $contents = $this->buildJSMainLangArray() . chr(10);
+               $pluginArray = t3lib_div::trimExplode(',', $this->pluginList , 1);
+               while( list(,$plugin) = each($pluginArray) ) {
+                       if ($this->isPluginEnable($plugin)  || (intval($number) > 1 && in_array($plugin, $this->pluginEnableArrayMultiple))) {
+                               $contents .= $this->buildJSLangArray($plugin) . chr(10);
+                       }
+               }
+               return $this->buildJSFile($this->language.'_'.$this->OutputCharset,$contents);
+       }
+
+       /**
+        * Return a JS language array for the plugin
+        *
+        * @return string               JS language array
+        */
+
+       function buildJSLangArray($plugin) {
+               global $TSFE, $LANG;
+
+               $linebreak = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->ID]['enableCompressedScripts'] ? '' : chr(10);
+               if(is_object($TSFE)) {
+                       $LOCAL_LANG = $TSFE->readLLfile(t3lib_extMgm::extPath($this->ID).'htmlarea/plugins/' . $plugin . '/locallang.php');
+                       if($this->typoVersion >= 3007000 ) {
+                               if(!empty($LOCAL_LANG['default'])) $TSFE->csConvObj->convArray($LOCAL_LANG['default'], 'iso-8859-1', $this->OutputCharset);
+                               if(!empty($LOCAL_LANG[$this->language])) $TSFE->csConvObj->convArray($LOCAL_LANG[$this->language], $this->charset, $this->OutputCharset);
+                       } else {
+                               if(!empty($LOCAL_LANG['default'])) $this->convArray($LOCAL_LANG['default'], 'iso-8859-1', $this->OutputCharset);
+                               if(!empty($LOCAL_LANG[$this->language])) $this->convArray($LOCAL_LANG[$this->language], $this->charset, $this->OutputCharset);
+                       }
+               } else {
+                       $LOCAL_LANG = $LANG->readLLfile(t3lib_extMgm::extPath($this->ID).'htmlarea/plugins/' . $plugin . '/locallang.php');
+                       if($this->typoVersion >= 3007000 ) {
+                               if(!empty($LOCAL_LANG['default'])) $LANG->csConvObj->convArray($LOCAL_LANG['default'], 'iso-8859-1', $this->OutputCharset);
+                               if(!empty($LOCAL_LANG[$this->language])) $LANG->csConvObj->convArray($LOCAL_LANG[$this->language], $this->charset, $this->OutputCharset);
+                       } else {
+                               if(!empty($LOCAL_LANG['default'])) $this->convArray($LOCAL_LANG['default'], 'iso-8859-1', $this->OutputCharset);
+                               if(!empty($LOCAL_LANG[$this->language])) $this->convArray($LOCAL_LANG[$this->language], $this->charset, $this->OutputCharset);
+                       }
+               }
+
+               if(!empty($LOCAL_LANG[$this->language])) {
+                       $LOCAL_LANG[$this->language] = t3lib_div::array_merge_recursive_overrule($LOCAL_LANG['default'],$LOCAL_LANG[$this->language]);
+               } else {
+                       $LOCAL_LANG[$this->language] = $LOCAL_LANG['default'];
+               }
+               
+               $JSLanguageArray .= 'var ' . $plugin . '_langArray = new Array();' . $linebreak;
+               $JSLanguageArray .= $plugin . '_langArray = {' . $linebreak;
+               if(is_object($TSFE)) {
+                       $JSLanguageArray = $TSFE->csConvObj->conv($JSLanguageArray, 'iso-8859-1', $this->OutputCharset);
+               } else {
+                       $JSLanguageArray = $LANG->csConvObj->conv($JSLanguageArray, 'iso-8859-1', $this->OutputCharset);
+               }
+               
+               $index = 0;
+               foreach ( $LOCAL_LANG[$this->language] as $labelKey => $labelValue ) {
+                       $JSLanguageArray .=  (($index++)?',':'') . '"' . $labelKey . '":"' . str_replace('"', '\"', $labelValue) . '"' . $linebreak;
+               }
+               
+               if(is_object($TSFE)) {
+                       $JSLanguageArray .= $TSFE->csConvObj->conv(' }' . chr(10), 'iso-8859-1', $this->OutputCharset);
+               } else {
+                       $JSLanguageArray .= $LANG->csConvObj->conv(' }' . chr(10), 'iso-8859-1', $this->OutputCharset);
+               }
+
+               return $JSLanguageArray;
+       }
+
+       /**
+        * Return the JS-Code for the Toolbar-Config-Array for HTML-Area
+        *
+        * @return string               the JS-Code as an JS-Array
+        */
+
+       function getJSToolbarArray() {
+               $toolbar = "";                  // The JS-Code for the toolbar
+               $group = "";                    // The TS-Code for the group in the moment, each group are between "bar"s
+               $group_has_button = false;      // True if the group has any enabled buttons
+               $group_needs_starting_bar = false;
+               $previous_is_space = false;
+
+                       // process each button in the order list
+               reset($this->toolbarOrderArray);
+               while (list(, $button) = each($this->toolbarOrderArray) ) {
+                       // check if a new group starts
+                       if (($button == 'bar' || $button == 'linebreak') && $group_has_button) {
+                                       // New line
+                               if ($button == 'linebreak') {
+                                       $convertButton = '"' . $this->convertToolBarForHTMLArea('linebreak') . '"';
+                                       $group = ($group!='') ? ($group . ', ' . $convertButton) : $convertButton;
+                               }
+                                       // New group
+                               $toolbar .= $toolbar ? (', ' . $group) : ('[[' . $group);
+                               $group = '';
+                               $previous_is_space = false;
+                               $group_has_button = false;
+                               $group_needs_starting_bar = true;
+                       } elseif ($toolbar && $button == 'linebreak' && !$group_has_button) {
+                                       // Insert linebreak if no group is opened
+                               $group = '';
+                               $previous_is_space = false;
+                               $group_needs_starting_bar = false;
+                               $toolbar .= ', "' . $this->convertToolBarForHTMLArea($button) . '"';
+                       } elseif ($button == 'bar' && !$group_has_button) {
+                               $group_needs_starting_bar = true;
+                       } elseif ($button == "space" && $group_has_button && !$previous_is_space) {
+                               $convertButton = $this->convertToolBarForHTMLArea($button);
+                               $convertButton = '"' . $convertButton . '"';
+                               $group .= $group ? (', ' . $convertButton) : ($group_needs_starting_bar ? ('"' . $this->convertToolBarForHTMLArea('bar') . '", ' . $convertButton) : $convertButton);
+                               $group_needs_starting_bar = false;
+                               $previous_is_space = true;
+                       } elseif (in_array($button, $this->toolBar)) {
+                                       // Add the button to the group
+                               $convertButton = $this->convertToolBarForHTMLArea($button);
+                               if ($convertButton) {
+                                       $convertButton = '"' . $convertButton . '"';
+                                       $group .= $group ? (', ' . $convertButton) : ($group_needs_starting_bar ? ('"' . $this->convertToolBarForHTMLArea('bar') . '", ' . $convertButton) : $convertButton);
+                                       $group_has_button = true;
+                                       $group_needs_starting_bar = false;
+                                       $previous_is_space = false;
+                               }
+                       }
+                       // else ignore
+               }
+                       // add the last group
+               if($group_has_button) $toolbar .= $toolbar ? (', ' . $group) : ('[[' . $group);
+               $toolbar = $toolbar . "]]";
+               return $toolbar;
+       }
+       
+       function getLLContent($string) {
+               global $LANG;
+               $BE_lang = $LANG->lang;
+               $BE_origCharset = $LANG->origCharSet;
+               $BE_charSet = $LANG->charSet;
+               $LANG->lang = $this->contentTypo3Language;
+               $LANG->origCharSet = $this->origContentCharSet;
+               $LANG->charSet = $this->contentCharset;
+               $LLString = $LANG->JScharCode($LANG->sL($string));
+               $LANG->lang = $BE_lang;
+               $LANG->origCharSet = $BE_origCharset;
+               $LANG->charSet = $BE_charSet;
+               return $LLString;
+       }
+       
+       function feJScharCode($str) {
+               global $TSFE;
+                       // Convert string to UTF-8:
+               if ($this->OutputCharset != 'utf-8') $str = $TSFE->csConvObj->utf8_encode($str,$this->OutputCharset);
+                       // Convert the UTF-8 string into a array of char numbers:
+               $nArr = $TSFE->csConvObj->utf8_to_numberarray($str);
+               return 'String.fromCharCode('.implode(',',$nArr).')';
+       }
+       
+       function getFullFileName($filename) {
+               if (substr($filename,0,4)=='EXT:')      {       // extension
+                       list($extKey,$local) = explode('/',substr($filename,4),2);
+                       $newFilename = '';
+                       if (strcmp($extKey,'') &&  t3lib_extMgm::isLoaded($extKey) && strcmp($local,'')) {
+                               $newFilename = $this->siteURL . t3lib_extMgm::siteRelPath($extKey) . $local;
+                       }
+               } elseif (substr($filename,0,1) != '/') {
+                       $newFilename = $this->siteURL . $filename;
+               } else {
+                       $newFilename = $this->siteURL . substr($filename,1);
+               }
+               return $newFilename;
+       }
+
+       /**
+        * Return the JS-Code to copy the HTML-Code from the editor in the hidden input field.
+        * This is for submit function from the form.
+        *
+        * @return string               the JS-Code
+        */
+
+       function setSaveRTE($number, $form, $textarea) {
+               return '
+               editornumber = '.$number.';
+               if (RTEarea[editornumber]) {
+                       document.'.$form.'["'.$textarea.'"].value = RTEarea[editornumber]["editor"].getHTML();
+               }
+               else {
+                       OK=0;
+               }
+               ';
+       }
+
+       /**
+        * Client Browser Information
+        *
+        * Usage: 4
+        *
+        * @param       string          Alternative User Agent string (if empty, t3lib_div::getIndpEnv('HTTP_USER_AGENT') is used)
+        * @return      array           Parsed information about the HTTP_USER_AGENT in categories BROWSER, VERSION, SYSTEM and FORMSTYLE
+        */
+
+       function clientInfo($useragent='')      {
+               
+               if (!$useragent) $useragent=t3lib_div::getIndpEnv('HTTP_USER_AGENT');
+               
+               $bInfo=array();
+                       // Which browser?
+               if (strstr($useragent,'Konqueror'))     {
+                       $bInfo['BROWSER']= 'konqu';
+               } elseif (strstr($useragent,'Opera') &&  $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['opera_test'] == 1)      {
+                       $bInfo['BROWSER']= 'opera';
+               } elseif (strstr($useragent,'MSIE 4') || strstr($useragent,'MSIE 5') || strstr($useragent,'MSIE 6'))    {
+                       $bInfo['BROWSER']= 'msie';
+               } elseif (strstr($useragent,'Gecko/'))  {
+                       $bInfo['BROWSER']='gecko';
+               } elseif (strstr($useragent,'Safari/') &&  $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['safari_test'] == 1) {
+                       $bInfo['BROWSER']='safari';
+               } elseif (strstr($useragent,'Mozilla/4')) {
+                       $bInfo['BROWSER']='net';
+               }
+
+               if ($bInfo['BROWSER'])  {
+                               // Browser version
+                       switch($bInfo['BROWSER'])       {
+                               case 'net':
+                                       $bInfo['VERSION']= doubleval(substr($useragent,8));
+                                       if (strstr($useragent,'Netscape6/')) {$bInfo['VERSION']=doubleval(substr(strstr($useragent,'Netscape6/'),10));}
+                                       if (strstr($useragent,'Netscape/7')) {$bInfo['VERSION']=doubleval(substr(strstr($useragent,'Netscape/7'),9));}
+                               break;
+                               case 'gecko':
+                                       $tmp = strstr($useragent,'rv:');
+                                       $bInfo['VERSION'] = doubleval(ereg_replace('^[^0-9]*','',substr($tmp,3)));
+                               break;
+                               case 'msie':
+                                       $tmp = strstr($useragent,'MSIE');
+                                       $bInfo['VERSION'] = doubleval(ereg_replace('^[^0-9]*','',substr($tmp,4)));
+                               break;
+                               case 'safari':
+                                       $tmp = strstr($useragent,'Safari/');
+                                       $bInfo['VERSION'] = doubleval(ereg_replace('^[^0-9]*','',substr($tmp,3)));
+                               break;
+                               case 'opera':
+                                       $tmp = strstr($useragent,'Opera');
+                                       $bInfo['VERSION'] = doubleval(ereg_replace('^[^0-9]*','',substr($tmp,5)));
+                               break;
+                               case 'konqu':
+                                       $tmp = strstr($useragent,'Konqueror/');
+                                       $bInfo['VERSION'] = doubleval(substr($tmp,10));
+                               break;
+                       }
+
+                               // Client system
+                       if (strstr($useragent,'Win'))   {
+                               $bInfo['SYSTEM'] = 'win';
+                       } elseif (strstr($useragent,'Mac'))     {
+                               $bInfo['SYSTEM'] = 'mac';
+                       } elseif (strstr($useragent,'Linux') || strstr($useragent,'X11') || strstr($useragent,'SGI') || strstr($useragent,' SunOS ') || strstr($useragent,' HP-UX '))   {
+                               $bInfo['SYSTEM'] = 'unix';
+                       }
+               }
+
+                       // Is true if the browser supports css to format forms, especially the width
+               $bInfo['FORMSTYLE']=($bInfo['BROWSER']=='msie' || ($bInfo['BROWSER']=='net'&&$bInfo['VERSION']>=5) || $bInfo['BROWSER']=='opera' || $bInfo['BROWSER']=='konqu');
+               return $bInfo;
+       }
+
+       /***************************
+        *
+        * OTHER FUNCTIONS:     (from Classic RTE)
+        *
+        ***************************/
+       /**
+        * @return      [type]          ...
+        * @desc 
+        */
+
+       function RTEtsConfigParams()    {
+               global $TSFE;
+               if(is_object($TSFE)) {
+                       return '';
+               } else {
+                       $p = t3lib_BEfunc::getSpecConfParametersFromArray($this->specConf['rte_transform']['parameters']);
+                       return $this->elementParts[0].':'.$this->elementParts[1].':'.$this->elementParts[2].':'.$this->thePid.':'.$this->typeVal.':'.$this->tscPID.':'.$p['imgpath'];
+               }
+       }
+
+       function cleanList($str)        {
+               if (strstr($str,'*'))   {
+                       $str = '*';
+               } else {
+                       $str = implode(',',array_unique(t3lib_div::trimExplode(',',$str,1)));
+               }
+               return $str;
+       }
+       
+       function filterStyleEl($elValue,$matchList)     {
+               $matchParts = t3lib_div::trimExplode(',',$matchList,1);
+               $styleParts = explode(';',$elValue);
+               $nStyle=array();
+               while(list($k,$p)=each($styleParts))    {
+                       $pp = t3lib_div::trimExplode(':',$p);
+                       if ($pp[0]&&$pp[1])     {
+                               reset($matchParts);
+                               while(list(,$el)=each($matchParts))     {
+                                       $star=substr($el,-1)=='*';
+                                       if (!strcmp($pp[0],$el) || ($star && t3lib_div::isFirstPartOfStr($pp[0],substr($el,0,-1)) ))    {
+                                               $nStyle[]=$pp[0].':'.$pp[1];
+                                       } else  unset($styleParts[$k]);
+                               }
+                       } else {
+                               unset($styleParts[$k]);
+                       }
+               }
+               return implode('; ',$nStyle);
+       }
+       
+       function convArray(&$array,$fromCS,$toCS,$useEntityForNoChar=0) {
+               global $TSFE, $LANG;
+               foreach($array as $key => $value)       {
+                       if (is_array($array[$key]))     {
+                               $this->convArray($array[$key],$fromCS,$toCS,$useEntityForNoChar);
+                       } else {
+                               if(is_object($TSFE)) {
+                                       $array[$key] = $TSFE->csConvObj->conv($array[$key],$fromCS,$toCS,$useEntityForNoChar);
+                               } else {
+                                       $array[$key] = $LANG->csConvObj->conv($array[$key],$fromCS,$toCS,$useEntityForNoChar);
+                               }
+                       }
+               }
+       }
+       
+               // Hook on lorem_ipsum extension to insert text into the RTE in wysiwyg mode
+       function loremIpsumInsert($params) {
+               return "
+                               if (typeof(lorem_ipsum) == 'function' && " . $params['element'] . ".tagName.toLowerCase() == 'textarea' ) lorem_ipsum(" . $params['element'] . ", lipsum_temp_strings[lipsum_temp_pointer]);
+                               ";
+       }
+}
+
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/class.tx_rtehtmlarea_base.php'])  {
+       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/class.tx_rtehtmlarea_base.php']);
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_loremipsum_wiz.php b/typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_loremipsum_wiz.php
new file mode 100644 (file)
index 0000000..0be8a69
--- /dev/null
@@ -0,0 +1,123 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 1999-2004 Kasper Skaarhoj (kasper@typo3.com)
+*  (c) 2005 Stanislas Rolland (stanislas.rolland@fructifor.ca)
+*  All rights reserved
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*  A copy is found in the textfile GPL.txt and important notices to the license
+*  from the author is found in LICENSE.txt distributed with these scripts.
+*
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+/**
+ * Lorem Ipsum dummy text wizard
+ *
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
+ * @coauthor   Stanislas Rolland <stanislas.rolland@fructifor.ca>
+ */
+
+if(false && t3lib_extMgm::isLoaded('lorem_ipsum')) {
+
+require_once(t3lib_extMgm::extPath('lorem_ipsum').'class.tx_loremipsum_wiz.php');
+
+/**
+ * Lorem Ipsum dummy text wizard
+ * Extended to enable insertion of dummy text in the htmlArea RTE (rtehtmlarea) in html mode
+ *
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
+ * @package TYPO3
+ * @subpackage tx_loremipsum
+ */
+
+class tx_rtehtmlarea_loremipsum_wiz extends tx_loremipsum_wiz {
+       //var $extKey = 'lorem_ipsum';
+
+       /**
+        * Main function for TCEforms wizard.
+        *
+        * @param       array           Parameter array for "userFunc" wizard type
+        * @param       object          Parent object
+        * @return      string          HTML for the wizard.
+        */
+
+       function main($PA,$pObj)        {
+
+                       // Load Lorem Ipsum sources from text file:
+               $this->loadLoremIpsumArray();
+
+               switch($PA['params']['type'])   {
+                       case 'title':
+                       case 'header':
+                       case 'description':
+                       case 'word':
+                       case 'paragraph':
+                       case 'loremipsum':
+                                       // Add the element name as first parameter
+                               $onclick = $this->getHeaderTitleJS(
+                                                               "document.".$PA['formName']."['".$PA['itemName']."']",
+                                                               "document.".$PA['formName']."['".$PA['itemName']."'].value",
+                                                               $PA['params']['type'],
+                                                               $PA['params']['endSequence'],
+                                                               $PA['params']['add'],
+                                                               t3lib_div::intInRange($PA['params']['count'],2,100,10)
+                                                       ) . ';' .
+                                                       implode('',$PA['fieldChangeFunc']).             // Necessary to tell TCEforms that the value is updated.
+                                                       'return false;';
+
+                               $output.= '<a href="#" onclick="'.htmlspecialchars($onclick).'">'.
+                                                       $this->getIcon($PA['params']['type']).
+                                                       '</a>';
+                       break;
+                       case 'images':
+                               return parent::main($PA,$pObj);
+                       break;
+               }
+
+               return $output;
+       }
+
+       /**
+        * Create rotating Lipsum text for JS variable
+        * Can be used by other non TCEform fields as well.
+        *
+        * @param       string          JavaScript variable name, eg. a form field value property reference.
+        * @param       string          Type = key from $this->lindex array
+        * @param       string          List of character numbers to end sequence with.
+        * @param       integer         Number of options to cycle through.
+        * @param       integer         Number of texts to cycle through
+        * @return      string          JavaScript applying a lipsum string to input javascript variable.
+        */
+               // Add the element name as first parameter
+       function getHeaderTitleJS($varElement, $varName, $type, $endSequence='', $add=FALSE, $count=10) {
+               
+               return parent::getHeaderTitleJS($varName, $type, $endSequence, $add, $count) . "
+                               if (typeof(lorem_ipsum) == 'function' && " . $varElement . ".tagName.toLowerCase() == 'textarea' ) lorem_ipsum(" . $varElement . ", lipsum_temp_strings[lipsum_temp_pointer]);
+                       ";
+       }
+
+} // end of class
+
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/class.tx_rtehtmlarea_loremipsum_wiz.php'])        {
+       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/class.tx_rtehtmlarea_loremipsum_wiz.php']);
+}
+
+} // end of conditional class extension
+
+?>
+
diff --git a/typo3/sysext/rtehtmlarea/class.ux_t3lib_parsehtml_proc.php b/typo3/sysext/rtehtmlarea/class.ux_t3lib_parsehtml_proc.php
new file mode 100644 (file)
index 0000000..7e0350e
--- /dev/null
@@ -0,0 +1,355 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 1999-2004 Kasper Skaarhoj (kasper@typo3.com)
+*  (c) 2004-2005 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+*  All rights reserved
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*  A copy is found in the textfile GPL.txt and important notices to the license
+*  from the author is found in LICENSE.txt distributed with these scripts.
+*
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+/**
+ * Functions for parsing HTML, specially for TYPO3 processing in relation to TCEmain and Rich Text Editor (RTE)
+ *
+ * $Id$
+ * Revised for TYPO3 3.6 December/2003 by Kasper Skaarhoj
+ * XHTML compatible.
+ *
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
+ * @internal
+ */
+if (t3lib_div::int_from_ver(TYPO3_VERSION) < 4000000 ) {
+       
+require_once (PATH_t3lib.'class.t3lib_parsehtml_proc.php');
+
+/**
+ * Class for parsing HTML for the Rich Text Editor. (also called transformations)
+ *
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
+ * @package TYPO3
+ * @subpackage t3lib
+ * Modification by Stanislas Rolland 2004-12-10 to allow style and xml:lang attributes on span tags
+ * Modification by Stanislas Rolland 2005-02-10 to include hr in headListTags
+ * Modification by Stanislas Rolland 2005-04-02 to avoid insertion of superfluous linebreaks by transform_db
+ * Modification by Stanislas Rolland 2005-04-06 to eliminate true linebreaks inside hx tags
+ * Modification by Johannes Bornhold 2005-05-09 to convert linebreaks to spaces instead of deleting them
+ * Modification by Stanislas Rolland 2005-07-28 to include address and dl in headListTags
+ * Modification by Dimitrij Denissenko 2005-11-15 to wrap a-tags that contain a style attribute with a span-tag
+ * Modification by Stanislas Rolland 2005-11-18 Honor setting RTE.default.proc.HTMLparser_db.xhtml_cleaning=1
+ */
+class ux_t3lib_parsehtml_proc extends t3lib_parsehtml_proc {
+       
+ // <Stanislas Rolland 2005-02-10 and 2005-07-28 to include hr, address and dl in headListTags>
+       var $headListTags = 'PRE,UL,OL,H1,H2,H3,H4,H5,H6,HR,ADDRESS,DL';
+ // </Stanislas Rolland 2005-02-10 and 2005-07-28 to include hr, address and dl in headListTags>
+
+       /**
+        * Creates an array of configuration for the HTMLcleaner function based on whether content go TO or FROM the Rich Text Editor ($direction)
+        * Unless "tagList" is given, the function will cache the configuration for next time processing goes on. (In this class that is the case only if we are processing a bulletlist)
+        *
+        * @param       string          The direction of the content being processed by the output configuration; "db" (content going into the database FROM the rte) or "rte" (content going into the form)
+        * @param       string          Comma list of tags to keep (overriding default which is to keep all + take notice of internal configuration)
+        * @return      array           Configuration array
+        * @see HTMLcleaner_db()
+        */
+       function getKeepTags($direction='rte',$tagList='')      {
+               if (!is_array($this->getKeepTags_cache[$direction]) || $tagList)        {
+                               // Setting up allowed tags:
+                       if (strcmp($tagList,''))        {       // If the $tagList input var is set, this will take precedence
+                               $keepTags = array_flip(t3lib_div::trimExplode(',',$tagList,1));
+                       } else {        // Default is to get allowed/denied tags from internal array of processing options:
+                                       // Construct default list of tags to keep:
+                               $typoScript_list = 'b,i,u,a,img,br,div,center,pre,font,hr,sub,sup,p,strong,em,li,ul,ol,blockquote,strike,span';
+                               $keepTags = array_flip(t3lib_div::trimExplode(',',$typoScript_list.','.strtolower($this->procOptions['allowTags']),1));
+                                       // For tags to deny, remove them from $keepTags array:
+                               $denyTags = t3lib_div::trimExplode(',',$this->procOptions['denyTags'],1);
+                               foreach($denyTags as $dKe)      {
+                                       unset($keepTags[$dKe]);
+                               }
+                       }
+
+                               // Based on the direction of content, set further options:
+                       switch ($direction)     {
+                                       // GOING from database to Rich Text Editor:
+                               case 'rte':
+                                               // Transform bold/italics tags to strong/em
+                                       if (isset($keepTags['b']))      {$keepTags['b']=array('remap'=>'STRONG');}
+                                       if (isset($keepTags['i']))      {$keepTags['i']=array('remap'=>'EM');}
+                                               // Transforming keepTags array so it can be understood by the HTMLcleaner function. This basically converts the format of the array from TypoScript (having .'s) to plain multi-dimensional array.
+                                       list($keepTags) = $this->HTMLparserConfig($this->procOptions['HTMLparser_rte.'],$keepTags);
+                               break;
+                               
+                                       // GOING from RTE to database:
+                               case 'db':
+                                               // Transform strong/em back to bold/italics:
+                                       if (isset($keepTags['strong'])) { $keepTags['strong']=array('remap'=>'b'); }
+                                       if (isset($keepTags['em']))             { $keepTags['em']=array('remap'=>'i'); }
+                                               // Setting up span tags if they are allowed:
+                                       if (isset($keepTags['span']))           {
+                                               $classes=array_merge(array(''),$this->allowedClasses);
+// <Stanislas Rolland 2004-12-10 to allow style and xml:lang attribute on span tags>
+                                               $keepTags['span']=array(
+                                                       'allowedAttribs'=> 'class,style,xml:lang',
+                                                       'fixAttrib' => Array(
+                                                               'class' => Array (
+                                                                       'list' => $classes,
+                                                                       'removeIfFalse' => 1
+                                                               )
+                                                       ),
+                                                       'rmTagIfNoAttrib' => 1
+                                               );
+// </Stanislas Rolland 2004-12-10 to allow style and xml:lang attribute on span tags>
+                                               if (!$this->procOptions['allowedClasses'])      unset($keepTags['span']['fixAttrib']['class']['list']);
+                                       }
+                                               // Setting up font tags if they are allowed:
+                                       if (isset($keepTags['font']))           {
+                                               $colors=array_merge(array(''),t3lib_div::trimExplode(',',$this->procOptions['allowedFontColors'],1));
+                                               $keepTags['font']=array(
+                                                       'allowedAttribs'=>'face,color,size,style',
+                                                       'fixAttrib' => Array(
+                                                               'face' => Array (
+                                                                       'removeIfFalse' => 1
+                                                               ),
+                                                               'color' => Array (
+                                                                       'removeIfFalse' => 1,
+                                                                       'list'=>$colors
+                                                               ),
+                                                               'size' => Array (
+                                                                       'removeIfFalse' => 1,
+                                                               )
+                                                       ),
+                                                       'rmTagIfNoAttrib' => 1
+                                               );
+                                               if (!$this->procOptions['allowedFontColors'])   unset($keepTags['font']['fixAttrib']['color']['list']);
+                                       }
+
+                                               // Setting further options, getting them from the processiong options:
+                                       $TSc = $this->procOptions['HTMLparser_db.'];
+                                       if (!$TSc['globalNesting'])     $TSc['globalNesting']='b,i,u,a,center,font,sub,sup,strong,em,strike,span';
+                                       if (!$TSc['noAttrib'])  $TSc['noAttrib']='b,i,u,br,center,hr,sub,sup,strong,em,li,ul,ol,blockquote,strike';
+
+                                               // Transforming the array from TypoScript to regular array:
+                                       list($keepTags) = $this->HTMLparserConfig($TSc,$keepTags);
+                               break;
+                               
+                       }
+                               // Caching (internally, in object memory) the result unless tagList is set:
+                       if (!$tagList)  {
+                               $this->getKeepTags_cache[$direction] = $keepTags;
+                       } else {
+                               return $keepTags;
+                       }
+               }
+                       // Return result:
+               return $this->getKeepTags_cache[$direction];
+       }
+
+       /**
+        * Transformation handler: 'ts_transform' + 'css_transform' / direction: "db"
+        * Cleaning (->db) for standard content elements (ts)
+        *
+        * @param       string          Content input
+        * @param       boolean         If true, the transformation was "css_transform", otherwise "ts_transform"
+        * @return      string          Content output
+        * @see TS_transform_rte()
+        */
+       function TS_transform_db($value,$css=FALSE)     {
+                       // safety... so forever loops are avoided (they should not occur, but an error would potentially do this...)
+               $this->TS_transform_db_safecounter--;
+               if ($this->TS_transform_db_safecounter<0)       return $value;
+                       // Split the content from RTE by the occurence of these blocks:
+               $blockSplit = $this->splitIntoBlock('TABLE,BLOCKQUOTE,'.$this->headListTags,$value);
+               $cc=0;
+               $aC = count($blockSplit);
+// <Stanislas Rolland 2005-04-02 to avoid superfluous linebreak after ending headListTag>
+               while($aC && !strcmp(trim($blockSplit[$aC-1]),'')) {
+                       unset($blockSplit[$aC-1]);
+                       $aC = count($blockSplit);
+               }
+// </Stanislas Rolland 2005-04-02 to avoid superfluous linebreak after ending headListTag>
+
+                       // Traverse the blocks
+               foreach($blockSplit as $k => $v)        {
+                       $cc++;
+                       $lastBR = $cc==$aC ? '' : chr(10);
+                       if ($k%2)       {       // Inside block:
+                                       // Init:
+                               $tag=$this->getFirstTag($v);
+                               $tagName=strtolower($this->getFirstTagName($v));
+
+                                       // Process based on the tag:
+                               switch($tagName)        {
+                                       case 'blockquote':      // Keep blockquotes, but clean the inside recursively in the same manner as the main code
+                                               $blockSplit[$k]='<'.$tagName.'>'.$this->TS_transform_db($this->removeFirstAndLastTag($blockSplit[$k]),$css).'</'.$tagName.'>'.$lastBR;
+                                       break;
+                                       
+                                       case 'ol':
+                                       case 'ul':      // Transform lists into <typolist>-tags:
+                                               if (!$css)      {
+                                                       if (!isset($this->procOptions['typolist']) || $this->procOptions['typolist'])   {
+                                                               $parts = $this->getAllParts($this->splitIntoBlock('LI',$this->removeFirstAndLastTag($blockSplit[$k])),1,0);
+                                                               while(list($k2)=each($parts))   {
+                                                                       $parts[$k2]=ereg_replace(chr(10).'|'.chr(13),'',$parts[$k2]);   // remove all linesbreaks!
+                                                                       $parts[$k2]=$this->defaultTStagMapping($parts[$k2],'db');
+                                                                       $parts[$k2]=$this->cleanFontTags($parts[$k2],0,0,0);
+                                                                       $parts[$k2] = $this->HTMLcleaner_db($parts[$k2],strtolower($this->procOptions['allowTagsInTypolists']?$this->procOptions['allowTagsInTypolists']:'br,font,b,i,u,a,img,span,strong,em'));
+                                                               }
+                                                               if ($tagName=='ol')     { $params=' type="1"'; } else { $params=''; }
+                                                               $blockSplit[$k]='<typolist'.$params.'>'.chr(10).implode(chr(10),$parts).chr(10).'</typolist>'.$lastBR;
+                                                       }
+                                               } else {
+// <Dimitrij Denissenko 2005-11-15 wrap a-tags that contain a style attribute with a span-tag>
+                                                       //$blockSplit[$k].=$lastBR;
+                                                       $blockSplit[$k]=$this->transformStyledATags($blockSplit[$k]).$lastBR;
+// <Dimitrij Denissenko 2005-11-15 wrap a-tags that contain a style attribute with a span-tag>
+                                               }
+                                       break;
+                                       
+                                       case 'table':   // Tables are NOT allowed in any form (unless preserveTables is set or CSS is the mode)
+                                               if (!$this->procOptions['preserveTables'] && !$css)     {
+                                                       $blockSplit[$k]=$this->TS_transform_db($this->removeTables($blockSplit[$k]));
+                                               } else {
+// <Johannes Bornhold 2005-05-09 linebreaks are spaces>
+// <Dimitrij Denissenko 2005-11-15 wrap a-tags that contain a style attribute with a span-tag>
+                                                       $blockSplit[$k]=str_replace(chr(10),chr(32),$this->transformStyledATags($blockSplit[$k])).$lastBR;
+                                                       //$blockSplit[$k]=str_replace(chr(10),'',$blockSplit[$k]).$lastBR;
+// </Dimitrij Denissenko 2005-11-15 wrap a-tags that contain a style attribute with a span-tag>
+// </Johannes Bornhold 2005-05-09 linebreaks are spaces>
+                                               }
+                                       break;
+                                       
+                                       case 'h1':
+                                       case 'h2':
+                                       case 'h3':
+                                       case 'h4':
+                                       case 'h5':
+                                       case 'h6':
+                                               if (!$css)      {
+                                                       $attribArray=$this->get_tag_attributes_classic($tag);
+                                                               // Processing inner content here:
+                                                       $innerContent = $this->HTMLcleaner_db($this->removeFirstAndLastTag($blockSplit[$k]));
+                                                       if (!isset($this->procOptions['typohead']) || $this->procOptions['typohead'])   {
+                                                               $type = intval(substr($tagName,1));
+                                                               $blockSplit[$k]='<typohead'.
+                                                                                               ($type!=6?' type="'.$type.'"':'').
+                                                                                               ($attribArray['align']?' align="'.$attribArray['align'].'"':'').
+                                                                                               ($attribArray['class']?' class="'.$attribArray['class'].'"':'').
+                                                                                               '>'.
+                                                                                               $innerContent.
+                                                                                               '</typohead>'.
+                                                                                               $lastBR;
+                                                       } else {
+                                                               $blockSplit[$k]='<'.$tagName.
+                                                                                               ($attribArray['align']?' align="'.htmlspecialchars($attribArray['align']).'"':'').
+                                                                                               ($attribArray['class']?' class="'.htmlspecialchars($attribArray['class']).'"':'').
+                                                                                               '>'.
+                                                                                               $innerContent.
+                                                                                               '</'.$tagName.'>'.
+                                                                                               $lastBR;
+                                                       }
+                                               } else {
+// <Stanislas Rolland 2005-04-06 to eliminate true linebreaks inside hx tags>
+// <Johannes Bornhold 2005-05-09 linebreaks are spaces>
+// <Dimitrij Denissenko 2005-11-15 wrap a-tags that contain a style attribute with a span-tag>
+                                                       $blockSplit[$k]=str_replace(chr(10),chr(32),$this->transformStyledATags($blockSplit[$k])).$lastBR;
+                                                       //$blockSplit[$k].=$lastBR;
+// </Dimitrij Denissenko 2005-11-15 wrap a-tags that contain a style attribute with a span-tag>
+// </Johannes Bornhold 2005-05-09 linebreaks are spaces>
+// </Stanislas Rolland 2005-04-06 to eliminate true linebreaks inside hx tags>
+                                               }
+                                       break;
+                                       
+                                       default:
+// <Dimitrij Denissenko 2005-11-15 wrap a-tags that contain a style attribute with a span-tag>
+                                               //$blockSplit[$k].=$lastBR;
+                                               $blockSplit[$k]=$this->transformStyledATags($blockSplit[$k]).$lastBR;
+// </Dimitrij Denissenko 2005-11-15 wrap a-tags that contain a style attribute with a span-tag>
+                                       break;
+                                       
+                               }
+                       } else {        // NON-block:
+                               if (strcmp(trim($blockSplit[$k]),''))   {
+// <Johannes Bornhold 2005-05-09 linebreaks are spaces>
+                                       $blockSplit[$k]=$this->divideIntoLines(str_replace(chr(10),chr(32), $blockSplit[$k])).$lastBR;
+                                       //$blockSplit[$k]=$this->divideIntoLines($blockSplit[$k]).$lastBR;
+// </Johannes Bornhold 2005-05-09 linebreaks are spaces>
+// <Dimitrij Denissenko 2005-11-15 wrap a-tags that contain a style attribute with a span-tag>
+                                       $blockSplit[$k]=$this->transformStyledATags($blockSplit[$k]);
+// </Dimitrij Denissenko 2005-11-15>
+                               } else unset($blockSplit[$k]);
+                       }
+               }
+               $this->TS_transform_db_safecounter++;
+
+               return implode('',$blockSplit);
+       }
+       
+// <Dimitrij Denissenko 2005-11-15 wraps a-tags that contain a style attribute with a span-tag>
+       function transformStyledATags($value) {
+               $blockSplit = $this->splitIntoBlock('A',$value);
+               foreach($blockSplit as $k => $v)        {
+                       if ($k%2)       {       // If an A-tag was found:
+                               $attribArray = $this->get_tag_attributes_classic($this->getFirstTag($v),1);
+                               if ($attribArray['style'])      {       // If "style" attribute is set!
+                                       $attribArray_copy['style'] = $attribArray['style'];
+                                       unset($attribArray['style']);
+                                       $bTag='<span '.t3lib_div::implodeAttributes($attribArray_copy,1).'><a '.t3lib_div::implodeAttributes($attribArray,1).'>';
+                                       $eTag='</a></span>';
+                                       $blockSplit[$k] = $bTag.$this->removeFirstAndLastTag($blockSplit[$k]).$eTag;
+                               }
+                       }
+               }
+               return implode('',$blockSplit);
+       }
+// </Dimitrij Denissenko 2005-11-15>
+
+       /**
+        * Function for cleaning content going into the database.
+        * Content is cleaned eg. by removing unallowed HTML and ds-HSC content
+        * It is basically calling HTMLcleaner from the parent class with some preset configuration specifically set up for cleaning content going from the RTE into the db
+        *
+        * @param       string          Content to clean up
+        * @param       string          Comma list of tags to specifically allow. Default comes from getKeepTags and is ""
+        * @return      string          Clean content
+        * @see getKeepTags()
+        */
+        function HTMLcleaner_db($content,$tagList='')  {
+               if (!$tagList)  {
+                       $keepTags = $this->getKeepTags('db');
+               } else {
+                       $keepTags = $this->getKeepTags('db',$tagList);
+               }
+               $kUknown = $this->procOptions['dontRemoveUnknownTags_db'] ? 1 : 0;              // Default: remove unknown tags.
+               $hSC = $this->procOptions['dontUndoHSC_db'] ? 0 : -1;                           // Default: re-convert literals to characters (that is &lt; to <)
+               
+// <Stanislas Rolland 2005-11-18 Honor setting RTE.default.proc.HTMLparser_db.xhtml_cleaning=1>
+                       // Create additional configuration:
+               $addConfig=array();
+               if ((is_array($this->procOptions['HTMLparser_db.']) && $this->procOptions['HTMLparser_db.']['xhtml_cleaning']) || (is_array($this->procOptions['entryHTMLparser_db.']) && $this->procOptions['entryHTMLparser_db.']['xhtml_cleaning']) || (is_array($this->procOptions['exitHTMLparser_db.']) && $this->procOptions['exitHTMLparser_db.']['xhtml_cleaning']))   {
+                       $addConfig['xhtml']=1;
+               }
+
+               return $this->HTMLcleaner($content,$keepTags,$kUknown,$hSC,$addConfig);
+// </Stanislas Rolland 2005-11-18 Honor setting RTE.default.proc.HTMLparser_db.xhtml_cleaning=1>
+        }
+
+}
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/rtehtmlarea/conf.php b/typo3/sysext/rtehtmlarea/conf.php
new file mode 100644 (file)
index 0000000..ab4c182
--- /dev/null
@@ -0,0 +1,9 @@
+<?php
+
+
+
+//define('TYPO3_MOD_PATH', 'ext/rte/app/');
+//$BACK_PATH='../../../';
+
+$MCONF['name']='xMOD_txrte';   // xMOD_[modulename][optional: '_something']
+?>
diff --git a/typo3/sysext/rtehtmlarea/doc/manual.sxw b/typo3/sysext/rtehtmlarea/doc/manual.sxw
new file mode 100644 (file)
index 0000000..4ef24df
Binary files /dev/null and b/typo3/sysext/rtehtmlarea/doc/manual.sxw differ
diff --git a/typo3/sysext/rtehtmlarea/ext_conf_template.txt b/typo3/sysext/rtehtmlarea/ext_conf_template.txt
new file mode 100644 (file)
index 0000000..c71f18c
--- /dev/null
@@ -0,0 +1,47 @@
+# ***************************************************************************************
+# Extension configuration variables for htmlArea RTE
+#
+# TYPO3 CVS ID: $Id$
+# ***************************************************************************************
+
+  # cat=basic; type=string; label=No spell checking languages: The list of languages for which Aspell does not provide spell checking (see http://aspell.net/man-html/Unsupported.html#Unsupported) and for which the htmlArea SpellChecker plugin will therefore be disabled.
+noSpellCheckLanguages = ja,km,ko,lo,th,zh,b5,gb
+
+  # cat=basic; type=string; label=Aspell directory: The server directory in which Aspell is installed.
+AspellDirectory = /usr/bin/aspell
+
+  # cat=basic; type=string; label=Default Aspell dictionary: The default dictionary to be used by the htmlArea SpellChecker plugin. This should be set to the default language of the site.
+defaultDictionary = en
+
+  # cat=basic; type=string; label=List of Aspell dictionaries: The list of dictionaries available to the htmlArea SpellChecker plugin. This list is used only if safe_mode is enabled. If safe_mode is not enabled, the list is automatically obtained from Aspell.
+dictionaryList  = en
+
+  # cat=basic; type=string; label=List of htmlArea RTE plugins: The list of htmlArea RTE plugins that may be enabled.
+HTMLAreaPluginList = TableOperations, SpellChecker, ContextMenu, SelectColor, TYPO3Browsers, InsertSmiley, FindReplace, RemoveFormat, CharacterMap, QuickTag, InlineCSS, DynamicCSS, UserElements, Acronym, TYPO3HtmlParser
+
+  # cat=basic/enable; type=options[Typical,Advanced,Demo]; label=Default configuration settings: Select Typical for the most common situation. Select Advanced for minimal settings. Select Demo to enable all available features.
+defaultConfiguration = Typical
+
+  # cat=basic/enable; type=boolean; label=Enable images in the RTE: If set, the use of images in the "Typical" default configuration of the RTE will be enabled. WARNING: this option will not work for Classic RTE (ext: rte).
+enableImages = 0
+
+  # cat=basic/enable; type=boolean; label=Enable Mozilla/Firefox extension: If set, enables the triggering of installation of a Mozilla/Firefox extension to allow the RTE to access the clipboard.
+enableMozillaExtension = 0
+
+  # cat=basic/enable; type=boolean; label=Force Aspell command mode: If set, the spellchecker will use the Aspell command interface. Presumably. PHP is compiled with pspell, but with an old version of Aspell. If set, PHP safe mode should NOT be enabled.
+forceCommandMode = 0
+
+  # cat=basic/enable; type=boolean; label=Enable troubleshooting mode: If set, a troubleshooting log will be displayed below the editing area.
+enableDebugMode = 0
+
+  # cat=basic/enable; type=boolean; label=Enable compressed scripts: If set, the compressed version of the editor scripts will be used.
+enableCompressedScripts = 1
+
+  # cat=basic; type=string; label=Url of AllowClipboard Helper: Full absolute Url of the AllowClipboard Helper extension for Mozilla and Firefox.
+mozAllowClipboardUrl = http://releases.mozilla.org/pub/mozilla.org/extensions/allowclipboard_helper/allowclipboard_helper-0.5.3-fx+mz.xpi
+
+  # cat=basic; type=int+; label=Maximum width of plain images: Maximum width in pixels of plain images inserted with the TYPO3 image browser
+plainImageMaxWidth = 640
+
+  # cat=basic; type=int+; label=Maximum height of plain images: Maximum height in pixels of plain images inserted with the TYPO3 image browser
+plainImageMaxHeight = 680
\ No newline at end of file
diff --git a/typo3/sysext/rtehtmlarea/ext_emconf.php b/typo3/sysext/rtehtmlarea/ext_emconf.php
new file mode 100644 (file)
index 0000000..f1b64ee
--- /dev/null
@@ -0,0 +1,42 @@
+<?php
+
+########################################################################
+# Extension Manager/Repository config file for ext: "rtehtmlarea"
+# 
+# Auto generated 10-11-2005 23:14
+# 
+# Manual updates:
+# Only the data in the array - anything else is removed by next write
+########################################################################
+
+$EM_CONF[$_EXTKEY] = Array (
+       'title' => 'htmlArea RTE',
+       'description' => 'Rich Text Editor based on the open source htmlArea editor.',
+       'category' => 'be',
+       'shy' => 0,
+       'dependencies' => 'cms',
+       'conflicts' => 'rte_pb_htmlarea,sr_spellcheck,rte_chooser,sr_htmlarea',
+       'priority' => '',
+       'loadOrder' => '',
+       'TYPO3_version' => '3.6.3-0.0.3',
+       'PHP_version' => '0.0.19-0.0.19',
+       'module' => '',
+       'state' => 'beta',
+       'internal' => 0,
+       'uploadfolder' => 1,
+       'createDirs' => '',
+       'modify_tables' => '',
+       'clearCacheOnLoad' => 1,
+       'lockType' => '',
+       'author' => 'Stanislas Rolland',
+       'author_email' => 'stanislas.rolland@fructifor.ca',
+       'author_company' => 'Fructifor Inc.',
+       'CGLcompliance' => '',
+       'CGLcompliance_note' => '',
+       'private' => 0,
+       'download_password' => '',
+       'version' => '0.7.6',   // Don't modify this! Managed automatically during upload to repository.
+       '_md5_values_when_last_written' => 'a:201:{s:9:"ChangeLog";s:4:"e7d1";s:29:"class.tx_rtehtmlarea_base.php";s:4:"85c4";s:39:"class.tx_rtehtmlarea_loremipsum_wiz.php";s:4:"7fea";s:33:"class.ux_t3lib_parsehtml_proc.php";s:4:"d1bb";s:8:"conf.php";s:4:"016f";s:21:"ext_conf_template.txt";s:4:"6de0";s:12:"ext_icon.gif";s:4:"2f41";s:17:"ext_localconf.php";s:4:"12ad";s:14:"ext_tables.php";s:4:"b932";s:14:"ext_tables.sql";s:4:"e5b1";s:13:"locallang.php";s:4:"30f1";s:16:"locallang_db.php";s:4:"3238";s:33:"locallang_rtehtmlarea_acronym.php";s:4:"0d26";s:38:"locallang_rtehtmlarea_browse_links.php";s:4:"77f9";s:38:"locallang_rtehtmlarea_select_image.php";s:4:"f356";s:30:"locallang_rtehtmlarea_user.php";s:4:"173c";s:20:"pageTSConfigFull.txt";s:4:"8904";s:23:"pageTSConfigMinimal.txt";s:4:"e07a";s:23:"rtehtmlarea_acronym.php";s:4:"e604";s:28:"rtehtmlarea_browse_links.php";s:4:"1f50";s:28:"rtehtmlarea_select_image.php";s:4:"a35c";s:20:"rtehtmlarea_user.php";s:4:"0f7c";s:12:"t3_popup.php";s:4:"c81a";s:7:"tca.php";s:4:"536c";s:31:"htmlarea/htmlarea-compressed.js";s:4:"abb5";s:37:"htmlarea/htmlarea-gecko-compressed.js";s:4:"9d75";s:26:"htmlarea/htmlarea-gecko.js";s:4:"7931";s:34:"htmlarea/htmlarea-ie-compressed.js";s:4:"4990";s:23:"htmlarea/htmlarea-ie.js";s:4:"57ae";s:20:"htmlarea/htmlarea.js";s:4:"bc56";s:20:"htmlarea/license.txt";s:4:"a10f";s:30:"htmlarea/locallang_dialogs.php";s:4:"0d14";s:26:"htmlarea/locallang_msg.php";s:4:"655e";s:31:"htmlarea/locallang_tooltips.php";s:4:"c0db";s:31:"htmlarea/popupwin-compressed.js";s:4:"66da";s:20:"htmlarea/popupwin.js";s:4:"e00b";s:43:"htmlarea/plugins/SpellChecker/locallang.php";s:4:"3a7a";s:51:"htmlarea/plugins/SpellChecker/spell-check-logic.php";s:4:"d41e";s:51:"htmlarea/plugins/SpellChecker/spell-check-style.css";s:4:"d526";s:47:"htmlarea/plugins/SpellChecker/spell-check-ui.js";s:4:"69d2";s:57:"htmlarea/plugins/SpellChecker/spell-checker-compressed.js";s:4:"cf81";s:46:"htmlarea/plugins/SpellChecker/spell-checker.js";s:4:"9082";s:67:"htmlarea/plugins/SpellChecker/popups/spell-check-ui-iso-8859-1.html";s:4:"62b8";s:56:"htmlarea/plugins/SpellChecker/popups/spell-check-ui.html";s:4:"7561";s:46:"htmlarea/plugins/TableOperations/locallang.php";s:4:"1e76";s:63:"htmlarea/plugins/TableOperations/table-operations-compressed.js";s:4:"9950";s:52:"htmlarea/plugins/TableOperations/table-operations.js";s:4:"c39e";s:55:"htmlarea/plugins/ContextMenu/context-menu-compressed.js";s:4:"ed75";s:44:"htmlarea/plugins/ContextMenu/context-menu.js";s:4:"3933";s:42:"htmlarea/plugins/ContextMenu/locallang.php";s:4:"8e25";s:52:"htmlarea/plugins/DynamicCSS/dynamiccss-compressed.js";s:4:"0e6d";s:42:"htmlarea/plugins/DynamicCSS/dynamiccss.css";s:4:"a152";s:41:"htmlarea/plugins/DynamicCSS/dynamiccss.js";s:4:"351b";s:41:"htmlarea/plugins/DynamicCSS/locallang.php";s:4:"359d";s:42:"htmlarea/plugins/SelectColor/locallang.php";s:4:"7dcd";s:55:"htmlarea/plugins/SelectColor/select-color-compressed.js";s:4:"f265";s:44:"htmlarea/plugins/SelectColor/select-color.js";s:4:"5e48";s:44:"htmlarea/plugins/TYPO3Browsers/locallang.php";s:4:"02bb";s:58:"htmlarea/plugins/TYPO3Browsers/typo3browsers-compressed.js";s:4:"8e83";s:47:"htmlarea/plugins/TYPO3Browsers/typo3browsers.js";s:4:"310a";s:47:"htmlarea/plugins/TYPO3Browsers/img/download.gif";s:4:"f6d9";s:52:"htmlarea/plugins/TYPO3Browsers/img/external_link.gif";s:4:"9e48";s:63:"htmlarea/plugins/TYPO3Browsers/img/external_link_new_window.gif";s:4:"6e8d";s:52:"htmlarea/plugins/TYPO3Browsers/img/internal_link.gif";s:4:"12b9";s:63:"htmlarea/plugins/TYPO3Browsers/img/internal_link_new_window.gif";s:4:"402a";s:43:"htmlarea/plugins/TYPO3Browsers/img/mail.gif";s:4:"d5a2";s:57:"htmlarea/plugins/InsertSmiley/insert-smiley-compressed.js";s:4:"f737";s:46:"htmlarea/plugins/InsertSmiley/insert-smiley.js";s:4:"3629";s:43:"htmlarea/plugins/InsertSmiley/locallang.php";s:4:"0f9e";s:54:"htmlarea/plugins/InsertSmiley/popups/insertsmiley.html";s:4:"f6d9";s:46:"htmlarea/plugins/InsertSmiley/smileys/0001.gif";s:4:"4aff";s:46:"htmlarea/plugins/InsertSmiley/smileys/0002.gif";s:4:"02c4";s:46:"htmlarea/plugins/InsertSmiley/smileys/0003.gif";s:4:"834f";s:46:"htmlarea/plugins/InsertSmiley/smileys/0004.gif";s:4:"fb6a";s:46:"htmlarea/plugins/InsertSmiley/smileys/0005.gif";s:4:"2a48";s:46:"htmlarea/plugins/InsertSmiley/smileys/0006.gif";s:4:"f970";s:46:"htmlarea/plugins/InsertSmiley/smileys/0007.gif";s:4:"97ee";s:46:"htmlarea/plugins/InsertSmiley/smileys/0008.gif";s:4:"10a6";s:46:"htmlarea/plugins/InsertSmiley/smileys/0009.gif";s:4:"1907";s:46:"htmlarea/plugins/InsertSmiley/smileys/0010.gif";s:4:"9ee6";s:46:"htmlarea/plugins/InsertSmiley/smileys/0011.gif";s:4:"ae73";s:46:"htmlarea/plugins/InsertSmiley/smileys/0012.gif";s:4:"f058";s:46:"htmlarea/plugins/InsertSmiley/smileys/0013.gif";s:4:"3ed8";s:46:"htmlarea/plugins/InsertSmiley/smileys/0014.gif";s:4:"a948";s:46:"htmlarea/plugins/InsertSmiley/smileys/0015.gif";s:4:"218d";s:46:"htmlarea/plugins/InsertSmiley/smileys/0016.gif";s:4:"3539";s:46:"htmlarea/plugins/InsertSmiley/smileys/0017.gif";s:4:"ee2e";s:46:"htmlarea/plugins/InsertSmiley/smileys/0018.gif";s:4:"8c66";s:46:"htmlarea/plugins/InsertSmiley/smileys/0019.gif";s:4:"ac36";s:46:"htmlarea/plugins/InsertSmiley/smileys/0020.gif";s:4:"71ef";s:43:"htmlarea/plugins/RemoveFormat/locallang.php";s:4:"8b6a";s:57:"htmlarea/plugins/RemoveFormat/remove-format-compressed.js";s:4:"040c";s:46:"htmlarea/plugins/RemoveFormat/remove-format.js";s:4:"3a56";s:54:"htmlarea/plugins/RemoveFormat/popups/removeformat.html";s:4:"55c3";s:55:"htmlarea/plugins/FindReplace/find-replace-compressed.js";s:4:"b0b5";s:44:"htmlarea/plugins/FindReplace/find-replace.js";s:4:"3174";s:46:"htmlarea/plugins/FindReplace/find_replace.html";s:4:"d718";s:41:"htmlarea/plugins/FindReplace/fr_engine.js";s:4:"3482";s:42:"htmlarea/plugins/FindReplace/locallang.php";s:4:"cf9b";s:53:"htmlarea/plugins/FindReplace/popups/find_replace.html";s:4:"3220";s:39:"htmlarea/plugins/QuickTag/locallang.php";s:4:"44ad";s:49:"htmlarea/plugins/QuickTag/quick-tag-compressed.js";s:4:"32f4";s:38:"htmlarea/plugins/QuickTag/quick-tag.js";s:4:"19a8";s:36:"htmlarea/plugins/QuickTag/tag-lib.js";s:4:"4b7d";s:45:"htmlarea/plugins/QuickTag/img/ed_quicktag.gif";s:4:"b783";s:46:"htmlarea/plugins/QuickTag/popups/quicktag.html";s:4:"7115";s:57:"htmlarea/plugins/CharacterMap/character-map-compressed.js";s:4:"3137";s:46:"htmlarea/plugins/CharacterMap/character-map.js";s:4:"2882";s:43:"htmlarea/plugins/CharacterMap/locallang.php";s:4:"4142";s:58:"htmlarea/plugins/CharacterMap/popups/select_character.html";s:4:"d31a";s:50:"htmlarea/plugins/InlineCSS/inlinecss-compressed.js";s:4:"0498";s:39:"htmlarea/plugins/InlineCSS/inlinecss.js";s:4:"a030";s:40:"htmlarea/plugins/InlineCSS/locallang.php";s:4:"c2c6";s:43:"htmlarea/plugins/UserElements/locallang.php";s:4:"e6d8";s:57:"htmlarea/plugins/UserElements/user-elements-compressed.js";s:4:"60c2";s:46:"htmlarea/plugins/UserElements/user-elements.js";s:4:"e90a";s:46:"htmlarea/plugins/Acronym/acronym-compressed.js";s:4:"aa5b";s:35:"htmlarea/plugins/Acronym/acronym.js";s:4:"eb91";s:38:"htmlarea/plugins/Acronym/locallang.php";s:4:"1040";s:26:"htmlarea/popups/about.html";s:4:"8abd";s:26:"htmlarea/popups/blank.html";s:4:"e697";s:32:"htmlarea/popups/editor_help.html";s:4:"398a";s:33:"htmlarea/popups/insert_image.html";s:4:"7c95";s:33:"htmlarea/popups/insert_table.html";s:4:"5473";s:25:"htmlarea/popups/link.html";s:4:"109a";s:24:"htmlarea/popups/popup.js";s:4:"8fbb";s:33:"htmlarea/popups/select_color.html";s:4:"2a08";s:50:"htmlarea/skins/default/htmlarea-edited-content.css";s:4:"c436";s:35:"htmlarea/skins/default/htmlarea.css";s:4:"c3af";s:42:"htmlarea/skins/default/images/ed_about.gif";s:4:"2763";s:49:"htmlarea/skins/default/images/ed_align_center.gif";s:4:"419a";s:50:"htmlarea/skins/default/images/ed_align_justify.gif";s:4:"9c31";s:47:"htmlarea/skins/default/images/ed_align_left.gif";s:4:"9c22";s:48:"htmlarea/skins/default/images/ed_align_right.gif";s:4:"9386";s:40:"htmlarea/skins/default/images/ed_all.gif";s:4:"42e8";s:42:"htmlarea/skins/default/images/ed_blank.gif";s:4:"0208";s:44:"htmlarea/skins/default/images/ed_charmap.gif";s:4:"a9ba";s:45:"htmlarea/skins/default/images/ed_color_bg.gif";s:4:"c6e2";s:45:"htmlarea/skins/default/images/ed_color_fg.gif";s:4:"5d7f";s:41:"htmlarea/skins/default/images/ed_copy.gif";s:4:"4f55";s:43:"htmlarea/skins/default/images/ed_custom.gif";s:4:"e7b2";s:40:"htmlarea/skins/default/images/ed_cut.gif";s:4:"1b00";s:43:"htmlarea/skins/default/images/ed_delete.gif";s:4:"926b";s:48:"htmlarea/skins/default/images/ed_format_bold.gif";s:4:"f4f6";s:50:"htmlarea/skins/default/images/ed_format_italic.gif";s:4:"a800";s:50:"htmlarea/skins/default/images/ed_format_strike.gif";s:4:"3aa0";s:47:"htmlarea/skins/default/images/ed_format_sub.gif";s:4:"a840";s:47:"htmlarea/skins/default/images/ed_format_sup.gif";s:4:"cad7";s:53:"htmlarea/skins/default/images/ed_format_underline.gif";s:4:"505a";s:41:"htmlarea/skins/default/images/ed_help.gif";s:4:"e7fc";s:39:"htmlarea/skins/default/images/ed_hr.gif";s:4:"ff70";s:41:"htmlarea/skins/default/images/ed_html.gif";s:4:"fa6e";s:42:"htmlarea/skins/default/images/ed_image.gif";s:4:"4ab7";s:48:"htmlarea/skins/default/images/ed_indent_less.gif";s:4:"8503";s:48:"htmlarea/skins/default/images/ed_indent_more.gif";s:4:"3835";s:50:"htmlarea/skins/default/images/ed_left_to_right.gif";s:4:"a0f9";s:41:"htmlarea/skins/default/images/ed_link.gif";s:4:"44fe";s:48:"htmlarea/skins/default/images/ed_list_bullet.gif";s:4:"236b";s:45:"htmlarea/skins/default/images/ed_list_num.gif";s:4:"48d3";s:42:"htmlarea/skins/default/images/ed_paste.gif";s:4:"fbd2";s:41:"htmlarea/skins/default/images/ed_redo.gif";s:4:"e9e8";s:50:"htmlarea/skins/default/images/ed_right_to_left.gif";s:4:"5149";s:45:"htmlarea/skins/default/images/ed_splitcel.gif";s:4:"2c04";s:41:"htmlarea/skins/default/images/ed_undo.gif";s:4:"b9ba";s:43:"htmlarea/skins/default/images/ed_unlink.gif";s:4:"a416";s:46:"htmlarea/skins/default/images/insert_table.gif";s:4:"bf88";s:57:"htmlarea/skins/default/images/CharacterMap/ed_charmap.gif";s:4:"5aa6";s:54:"htmlarea/skins/default/images/QuickTag/ed_quicktag.gif";s:4:"b783";s:53:"htmlarea/skins/default/images/FindReplace/ed_find.gif";s:4:"d01c";s:56:"htmlarea/skins/default/images/InsertSmiley/ed_smiley.gif";s:4:"810e";s:58:"htmlarea/skins/default/images/SpellChecker/spell-check.gif";s:4:"15cf";s:58:"htmlarea/skins/default/images/SelectColor/CO-forecolor.gif";s:4:"5d7f";s:60:"htmlarea/skins/default/images/SelectColor/CO-hilitecolor.gif";s:4:"c6e2";s:61:"htmlarea/skins/default/images/TableOperations/cell-delete.gif";s:4:"031c";s:67:"htmlarea/skins/default/images/TableOperations/cell-insert-after.gif";s:4:"4d36";s:68:"htmlarea/skins/default/images/TableOperations/cell-insert-before.gif";s:4:"9ead";s:60:"htmlarea/skins/default/images/TableOperations/cell-merge.gif";s:4:"a2d2";s:59:"htmlarea/skins/default/images/TableOperations/cell-prop.gif";s:4:"bf67";s:60:"htmlarea/skins/default/images/TableOperations/cell-split.gif";s:4:"d87c";s:60:"htmlarea/skins/default/images/TableOperations/col-delete.gif";s:4:"b0f6";s:66:"htmlarea/skins/default/images/TableOperations/col-insert-after.gif";s:4:"f5f7";s:67:"htmlarea/skins/default/images/TableOperations/col-insert-before.gif";s:4:"5711";s:59:"htmlarea/skins/default/images/TableOperations/col-split.gif";s:4:"eacc";s:62:"htmlarea/skins/default/images/TableOperations/insert_table.gif";s:4:"c1db";s:60:"htmlarea/skins/default/images/TableOperations/row-delete.gif";s:4:"7cdb";s:66:"htmlarea/skins/default/images/TableOperations/row-insert-above.gif";s:4:"d034";s:66:"htmlarea/skins/default/images/TableOperations/row-insert-under.gif";s:4:"59f9";s:58:"htmlarea/skins/default/images/TableOperations/row-prop.gif";s:4:"b11e";s:59:"htmlarea/skins/default/images/TableOperations/row-split.gif";s:4:"a712";s:60:"htmlarea/skins/default/images/TableOperations/table-prop.gif";s:4:"2a21";s:64:"htmlarea/skins/default/images/TableOperations/toggle-borders.gif";s:4:"ae22";s:56:"htmlarea/skins/default/images/TYPO3Browsers/ed_image.gif";s:4:"f91c";s:55:"htmlarea/skins/default/images/TYPO3Browsers/ed_link.gif";s:4:"9a55";s:57:"htmlarea/skins/default/images/TYPO3Browsers/ed_unlink.gif";s:4:"2ca8";s:55:"htmlarea/skins/default/images/RemoveFormat/ed_clean.gif";s:4:"c936";s:54:"htmlarea/skins/default/images/UserElements/ed_user.gif";s:4:"a294";s:52:"htmlarea/skins/default/images/Acronym/ed_acronym.gif";s:4:"a2c5";s:32:"pi1/class.tx_rtehtmlarea_pi1.php";s:4:"8503";s:17:"pi1/locallang.php";s:4:"f576";s:32:"pi2/class.tx_rtehtmlarea_pi2.php";s:4:"bdc1";s:14:"doc/manual.sxw";s:4:"9ffd";}',
+);
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/rtehtmlarea/ext_icon.gif b/typo3/sysext/rtehtmlarea/ext_icon.gif
new file mode 100644 (file)
index 0000000..554260e
Binary files /dev/null and b/typo3/sysext/rtehtmlarea/ext_icon.gif differ
diff --git a/typo3/sysext/rtehtmlarea/ext_localconf.php b/typo3/sysext/rtehtmlarea/ext_localconf.php
new file mode 100644 (file)
index 0000000..8f0cfe2
--- /dev/null
@@ -0,0 +1,86 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2005 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+*  All rights reserved
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*  A copy is found in the textfile GPL.txt and important notices to the license
+*  from the author is found in LICENSE.txt distributed with these scripts.
+*
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+/**
+ * Configuration of the htmlArea RTE extension
+ *
+ * @author     Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+ *
+ * $Id$  *
+ */
+
+if (!defined ("TYPO3_MODE"))   die ("Access denied.");
+
+// Configuration of class ux_parsehtml_proc extending class t3lib_parsehtml_proc for TYPO3 older than 4.0
+if (t3lib_div::int_from_ver(TYPO3_VERSION) < 4000000 ) {
+       $TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["t3lib/class.t3lib_parsehtml_proc.php"] = t3lib_extMgm::extPath($_EXTKEY)."class.ux_t3lib_parsehtml_proc.php";
+}
+
+if(!$TYPO3_CONF_VARS['BE']['RTEenabled'])  $TYPO3_CONF_VARS['BE']['RTEenabled'] = 1;
+
+// Registering the RTE object
+$TYPO3_CONF_VARS['BE']['RTE_reg'][$_EXTKEY] = array('objRef' => 'EXT:'.$_EXTKEY.'/class.tx_rtehtmlarea_base.php:&tx_rtehtmlarea_base');
+
+$_EXTCONF = unserialize($_EXTCONF);    // unserializing the configuration so we can use it here:
+
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['defaultConfiguration'] = $_EXTCONF['defaultConfiguration'] ? $_EXTCONF['defaultConfiguration'] : 'Typical';
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['enableImages'] = $_EXTCONF['enableImages'] ? $_EXTCONF['enableImages'] : 0;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['enableMozillaExtension'] = $_EXTCONF['enableMozillaExtension'] ? $_EXTCONF['enableMozillaExtension'] : 0;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['mozAllowClipboardUrl'] = $_EXTCONF['mozAllowClipboardUrl'] ? $_EXTCONF['mozAllowClipboardUrl'] : 'http://ftp.mozilla.org/pub/mozilla.org/extensions/allowclipboard_helper/allowclipboard_helper-0.3.4-fx+mz.xpi';
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['forceCommandMode'] = $_EXTCONF["forceCommandMode"] ? $_EXTCONF["forceCommandMode"] : 0;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['enableDebugMode'] = $_EXTCONF['enableDebugMode'] ? $_EXTCONF['enableDebugMode'] : 0;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['enableCompressedScripts'] = $_EXTCONF['enableCompressedScripts'] ? $_EXTCONF['enableCompressedScripts'] : 0;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['dictionaryList'] = $_EXTCONF["dictionaryList"] ? $_EXTCONF["dictionaryList"] : 'en';
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['defaultDictionary'] = $_EXTCONF["defaultDictionary"] ? $_EXTCONF["defaultDictionary"] : 'en';
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['AspellDirectory'] = $_EXTCONF["AspellDirectory"] ? $_EXTCONF["AspellDirectory"] : '/usr/bin/aspell';
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['noSpellCheckLanguages'] = $_EXTCONF["noSpellCheckLanguages"] ? $_EXTCONF["noSpellCheckLanguages"] : 'ja,km,ko,lo,th,zh,b5,gb';
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['HTMLAreaPluginList'] = $_EXTCONF["HTMLAreaPluginList"] ? $_EXTCONF["HTMLAreaPluginList"] : 'TableOperations,SpellChecker,ContextMenu,SelectColor,TYPO3Browsers,InsertSmiley,FindReplace,RemoveFormat,CharacterMap,QuickTag,InlineCSS,DynamicCSS,UserElements,TYPO3HtmlParser';
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plainImageMaxWidth'] = $_EXTCONF['plainImageMaxWidth'] ? $_EXTCONF['plainImageMaxWidth'] : 640;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plainImageMaxHeight'] = $_EXTCONF['plainImageMaxHeight'] ? $_EXTCONF['plainImageMaxHeight'] : 680;
+
+//$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['safari_test'] = 1;
+//$TYPO3_CONF_VARS['EXTCONF']['rtehtmlarea']['opera_test'] = 1;
+
+       // Add default RTE transformation configuration
+t3lib_extMgm::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $_EXTKEY . '/pageTSConfigProc.txt">');
+
+       // Add default Page TSonfig RTE configuration
+t3lib_extMgm::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $_EXTKEY . '/pageTSConfig' .$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['defaultConfiguration'] . '.txt">');
+
+       // Add default Page TSonfig RTE configuration for enabling images with the Typical default configuration
+if (($TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['defaultConfiguration'] == 'Typical') && $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['enableImages']) {
+       t3lib_extMgm::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $_EXTKEY . '/pageTSConfigImage.txt">');
+}
+
+       // Add default User TSonfig RTE configuration
+t3lib_extMgm::addUserTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $_EXTKEY . '/userTSConfig' .$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['defaultConfiguration'] . '.txt">');
+
+       // Configure Lorem Ipsum hook to insert nonsense in wysiwyg mode
+if (t3lib_extMgm::isLoaded('lorem_ipsum') && (TYPO3_MODE == 'BE')) {
+    $TYPO3_CONF_VARS['EXTCONF']['lorem_ipsum']['RTE_insert'][] = 'tx_rtehtmlarea_base->loremIpsumInsert';
+}
+
+?>
diff --git a/typo3/sysext/rtehtmlarea/ext_tables.php b/typo3/sysext/rtehtmlarea/ext_tables.php
new file mode 100644 (file)
index 0000000..05c16ec
--- /dev/null
@@ -0,0 +1,96 @@
+<?php
+if (!defined ('TYPO3_MODE'))   die ('Access denied.');
+
+if (TYPO3_MODE == 'BE' && t3lib_extMgm::isLoaded('lorem_ipsum'))       {
+
+               // Create wizard configuration:
+       $wizConfig = array(
+               'type' => 'userFunc',
+               'userFunc' => 'EXT:' . $_EXTKEY . '/class.tx_rtehtmlarea_loremipsum_wiz.php:tx_rtehtmlarea_loremipsum_wiz->main',
+               'params' => array()
+       );
+
+               // Load affected tables (except "pages"):
+       t3lib_div::loadTCA('tt_content');
+
+               // *********************
+               // Apply wizards to:
+               // *********************
+
+               // Titles:
+       $TCA['pages']['columns']['title']['config']['wizards']['tx_loremipsum'] =
+       $TCA['pages']['columns']['nav_title']['config']['wizards']['tx_loremipsum'] =
+               array_merge($wizConfig,array('params'=>array(
+                       'type' => 'title'
+               )));
+
+               // Subheaders
+       $TCA['pages']['columns']['subtitle']['config']['wizards']['tx_loremipsum'] =
+       $TCA['tt_content']['columns']['header']['config']['wizards']['tx_loremipsum'] =
+       $TCA['tt_content']['columns']['subheader']['config']['wizards']['tx_loremipsum'] =
+               array_merge($wizConfig,array('params'=>array(
+                       'type' => 'header'
+               )));
+
+               // Description / Abstract:
+       $TCA['pages']['columns']['description']['config']['wizards']['tx_loremipsum'] =
+       $TCA['pages']['columns']['abstract']['config']['wizards']['tx_loremipsum'] =
+       $TCA['tt_content']['columns']['imagecaption']['config']['wizards']['tx_loremipsum'] =
+               array_merge($wizConfig,array('params'=>array(
+                       'type' => 'description',
+                       'endSequence' => '46,32',
+                       'add' => TRUE
+               )));
+
+               // Keywords field:
+       $TCA['pages']['columns']['keywords']['config']['wizards']['tx_loremipsum'] =
+               array_merge($wizConfig,array('params'=>array(
+                       'type' => 'word',
+                       'endSequence' => '44,32',
+                       'add' => TRUE,
+                       'count' => 30
+               )));
+
+               // Bodytext field in Content Elements:
+       $TCA['tt_content']['columns']['bodytext']['config']['wizards']['_VERTICAL'] = 1;
+       $TCA['tt_content']['columns']['bodytext']['config']['wizards']['tx_loremipsum_2'] =
+               array_merge($wizConfig,array('params'=>array(
+                       'type' => 'loremipsum',
+                       'endSequence' => '32',
+                       'add'=>TRUE
+               )));
+       $TCA['tt_content']['columns']['bodytext']['config']['wizards']['tx_loremipsum'] =
+               array_merge($wizConfig,array('params'=>array(
+                       'type' => 'paragraph',
+                       'endSequence' => '10',
+                       'add'=>TRUE
+               )));
+
+       $TCA['tt_content']['columns']['image']['config']['wizards']['_POSITION'] = 'bottom';
+       $TCA['tt_content']['columns']['image']['config']['wizards']['tx_loremipsum'] =
+               array_merge($wizConfig,array('params'=>array(
+                       'type' => 'images'
+               )));
+}
+
+       $TCA['tx_rtehtmlarea_acronym'] = Array (
+       'ctrl' => Array (
+               'title' => 'LLL:EXT:rtehtmlarea/locallang_db.php:tx_rtehtmlarea_acronym',
+               'label' => 'term',
+               'default_sortby' => 'ORDER BY term',
+               'sortby' => 'sorting',
+               'rootLevel' => 1,
+               'delete' => 'deleted',
+               'enablecolumns' => Array (
+                       'disabled' => 'hidden',
+                       'starttime' => 'starttime',
+                       'endtime' => 'endtime',
+               ),
+               'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY).'tca.php',
+               'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY).'htmlarea/skins/default/images/Acronym/ed_acronym.gif',
+               )
+       );
+        
+       t3lib_extMgm::allowTableOnStandardPages('tx_rtehtmlarea_acronym');
+       t3lib_extMgm::addToInsertRecords('tx_rtehtmlarea_acronym');
+?>
diff --git a/typo3/sysext/rtehtmlarea/ext_tables.sql b/typo3/sysext/rtehtmlarea/ext_tables.sql
new file mode 100644 (file)
index 0000000..9855654
--- /dev/null
@@ -0,0 +1,21 @@
+#
+# Table structure for extension 'rtehtmlarea'
+#
+
+CREATE TABLE tx_rtehtmlarea_acronym (
+       uid int(11) unsigned NOT NULL auto_increment,
+       pid int(11) unsigned DEFAULT '0' NOT NULL,
+       deleted tinyint(4) unsigned DEFAULT '0' NOT NULL,
+       hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
+       starttime int(11) unsigned DEFAULT '0' NOT NULL,
+       endtime int(11) unsigned DEFAULT '0' NOT NULL,
+       sorting int(11) unsigned DEFAULT '0' NOT NULL,
+       sys_language_uid int(11) DEFAULT '0' NOT NULL,
+       type tinyint(3) unsigned DEFAULT '1' NOT NULL,
+       term tinytext NOT NULL,
+       acronym tinytext NOT NULL,
+       
+       PRIMARY KEY (uid),
+       KEY parent (pid)
+);
+
diff --git a/typo3/sysext/rtehtmlarea/htmlarea/htmlarea-compressed.js b/typo3/sysext/rtehtmlarea/htmlarea/htmlarea-compressed.js
new file mode 100644 (file)
index 0000000..f9ea7d8
--- /dev/null
@@ -0,0 +1,2 @@
+if(typeof(_editor_url)=="string"){_editor_url=_editor_url.replace(/\x2f*$/,'/');}else{alert("WARNING: _editor_url is not set!");var _editor_url='';};if(typeof(_editor_skin)=="string")_editor_skin=_editor_skin.replace(/\x2f*$/,'/');else var _editor_skin=_editor_url+"skins/default/";if(typeof(_editor_CSS)!="string")var _editor_CSS=_editor_url+"skins/default/htmlarea.css";if(typeof(_editor_edited_content_CSS)!="string")var _editor_edited_content_CSS=_editor_skin+"htmlarea-edited-content.css";if(typeof(_editor_lang)=="string")_editor_lang=_editor_lang?_editor_lang.toLowerCase():"en";var HTMLArea=function(textarea,config){if(HTMLArea.checkSupportedBrowser()){if(typeof(config)=="undefined")this.config=new HTMLArea.Config();else this.config=config;this._htmlArea=null;this._textArea=textarea;this._editMode="wysiwyg";this.plugins={};this._timerToolbar=null;this._undoQueue=new Array();this._undoPos=-1;this._customUndo=true;this.doctype='';this.eventHandlers={};}};HTMLArea.agt=navigator.userAgent.toLowerCase();HTMLArea.is_opera=(HTMLArea.agt.indexOf("opera")!=-1);HTMLArea.is_ie=(HTMLArea.agt.indexOf("msie")!=-1)&&!HTMLArea.is_opera;HTMLArea.is_safari=(HTMLArea.agt.indexOf("webkit")!=-1);HTMLArea.is_gecko=(navigator.product=="Gecko")||HTMLArea.is_opera;HTMLArea.is_wamcom=(HTMLArea.agt.indexOf("wamcom")!=-1)||(HTMLArea.is_gecko&&(HTMLArea.agt.indexOf("1.3")!=-1));HTMLArea._debugMode=false;if(typeof(_editor_debug_mode)!="undefined")HTMLArea._debugMode=_editor_debug_mode;HTMLArea._appendToLog=function(str){if(HTMLArea._debugMode){var log=document.getElementById("HTMLAreaLog");if(log){log.appendChild(document.createTextNode(str));log.appendChild(document.createElement("br"));}}};HTMLArea._compressedScripts=false;if(typeof(_editor_compressed_scripts)!="undefined")HTMLArea._compressedScripts=_editor_compressed_scripts;HTMLArea.I18N=HTMLArea_langArray;HTMLArea.is_loaded=false;HTMLArea.onload=function(){HTMLArea.is_loaded=true;HTMLArea._appendToLog("All scripts successfully loaded.");};HTMLArea.loadTimer;HTMLArea._scripts=[];HTMLArea._scriptLoaded=[];HTMLArea._request=[];HTMLArea.loadScript=function(url,plugin){if(plugin)url=_editor_url+"/plugins/"+plugin+'/'+url;if(HTMLArea.is_opera)url=_typo3_host_url+url;if(HTMLArea._compressedScripts)url=url.replace(/\.js$/gi,"-compressed.js");HTMLArea._scripts.push(url);};HTMLArea.loadScript(_editor_url+"popupwin.js");if(HTMLArea.is_gecko)HTMLArea.loadScript(_editor_url+"htmlarea-gecko.js");if(HTMLArea.is_ie)HTMLArea.loadScript(_editor_url+"htmlarea-ie.js");HTMLArea.MSXML_XMLHTTP_PROGIDS=new Array("Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.4.0","Msxml2.XMLHTTP.3.0","Msxml2.XMLHTTP","Microsoft.XMLHTTP");HTMLArea.XMLHTTPResponseHandler=function(i){return(function(){var url=HTMLArea._scripts[i];if(HTMLArea._request[i].readyState!=4)return;if(HTMLArea._request[i].status==200){try{eval(HTMLArea._request[i].responseText);HTMLArea._scriptLoaded[i]=true;i=null;}catch(e){HTMLArea._appendToLog("ERROR [HTMLArea::getScript]: Unable to get script "+url+": "+e);}}else{HTMLArea._appendToLog("ERROR [HTMLArea::getScript]: Unable to get "+url+" . Server reported "+HTMLArea._request[i].status);}});};HTMLArea._getScript=function(i,asynchronous,url){if(typeof(url)=="undefined")var url=HTMLArea._scripts[i];if(typeof(asynchronous)=="undefined")var asynchronous=true;if(window.XMLHttpRequest)HTMLArea._request[i]=new XMLHttpRequest();else if(window.ActiveXObject){var success=false;for(var k=0;k<HTMLArea.MSXML_XMLHTTP_PROGIDS.length&&!success;k++){try{HTMLArea._request[i]=new ActiveXObject(HTMLArea.MSXML_XMLHTTP_PROGIDS[k]);success=true;}catch(e){}};if(!success)return false;};var request=HTMLArea._request[i];if(request){request.open("GET",url,asynchronous);if(asynchronous)request.onreadystatechange=HTMLArea.XMLHTTPResponseHandler(i);if(window.XMLHttpRequest)request.send(null);else if(window.ActiveXObject)request.send();if(!asynchronous){if(request.status==200)return request.responseText;else return '';};return true;}else{return false;}};HTMLArea.checkInitialLoad=function(){var scriptsLoaded=true;for(var i=HTMLArea._scripts.length;--i>=0;){scriptsLoaded=scriptsLoaded&&HTMLArea._scriptLoaded[i];};if(HTMLArea.loadTimer)window.clearTimeout(HTMLArea.loadTimer);if(scriptsLoaded){HTMLArea.is_loaded=true;HTMLArea._appendToLog("[HTMLArea::init]: All scripts successfully loaded.");HTMLArea._appendToLog("[HTMLArea::init]: Editor url set to: "+_editor_url);HTMLArea._appendToLog("[HTMLArea::init]: Editor skin CSS set to: "+_editor_CSS);HTMLArea._appendToLog("[HTMLArea::init]: Editor content skin CSS set to: "+_editor_edited_content_CSS);if(window.ActiveXObject){for(var i=HTMLArea._scripts.length;--i>=0;){HTMLArea._request[i].onreadystatechange=new Function();HTMLArea._request[i]=null;}}}else{HTMLArea.loadTimer=window.setTimeout("HTMLArea.checkInitialLoad();",200);return false;}};HTMLArea.init=function(){HTMLArea._eventCache=HTMLArea._eventCacheConstructor();if(window.XMLHttpRequest||window.ActiveXObject){try{var success=true;for(var i=HTMLArea._scripts.length;--i>=0&&success;)success=success&&HTMLArea._getScript(i);}catch(e){HTMLArea._appendToLog("ERROR [HTMLArea::init]: Unable to use XMLHttpRequest: "+e);};if(success){HTMLArea.checkInitialLoad();}else{if(HTMLArea.is_ie)window.setTimeout('if (window.document.getElementById("pleasewait1")) { window.document.getElementById("pleasewait1").innerHTML = HTMLArea.I18N.msg["ActiveX-required"]; } else { alert(HTMLArea.I18N.msg["ActiveX-required"]); };',200);}}else{if(HTMLArea.is_ie)alert(HTMLArea.I18N.msg["ActiveX-required"]);}};HTMLArea.RE_tagName=/(<\/|<)\s*([^\t\n>]+)/ig;HTMLArea.RE_doctype=/(<!doctype((.|\n)*?)>)\n?/i;HTMLArea.RE_head=/<head>((.|\n)*?)<\/head>/i;HTMLArea.RE_body=/<body>((.|\n)*?)<\/body>/i;HTMLArea.Reg_body=new RegExp("<\/?(body)[^>]*>","gi");HTMLArea.Reg_entities=new RegExp("&amp;([0-9]+);","gi");HTMLArea.reservedClassNames=/htmlarea/;HTMLArea.RE_email=/([0-9a-z]+([a-z0-9_-]*[0-9a-z])*){1}(\.[0-9a-z]+([a-z0-9_-]*[0-9a-z])*)*@([0-9a-z]+([a-z0-9_-]*[0-9a-z])*\.)+[a-z]{2,9}/i;HTMLArea.RE_url=/(https?:\/\/)?(([a-z0-9_]+:[a-z0-9_]+@)?[a-z0-9_-]{2,}(\.[a-z0-9_-]{2,}){2,}(:[0-9]+)?(\/\S+)*)/i;HTMLArea.Config=function(){this.version="3.0";this.width="auto";this.height="auto";this.statusBar=true;this.undoSteps=20;this.undoTimeout=500;this.sizeIncludesToolbar=true;this.fullPage=false;this.useHTTPS=false;this.useCSS=false;this.styleWithCSS=false;if(HTMLArea.is_gecko&&!HTMLArea.is_safari&&!HTMLArea.is_opera&&navigator.productSub>=20051107)this.styleWithCSS=true;this.enableMozillaExtension=true;this.disableEnterParagraphs=false;this.removeTrailingBR=false;this.editedContentStyle=_editor_edited_content_CSS;this.pageStyle="";this.cleanWordOnPaste=true;this.makeLinkShowsTarget=true;this.htmlRemoveTags=null;this.htmlRemoveTagsAndContents=null;this.htmlRemoveComments=false;this.customTags=/rougegras/ig;this.baseURL=document.baseURI||document.URL;if(this.baseURL&&this.baseURL.match(/(.*)\/([^\/]+)/))this.baseURL=RegExp.$1+"/";this.imgURL="images/";this.popupURL="popups/";this.btnList={Bold:["Bold","ed_format_bold",false,function(editor){editor.execCommand("Bold");}],Italic:["Italic","ed_format_italic",false,function(editor){editor.execCommand("Italic");}],Underline:["Underline","ed_format_underline",false,function(editor){editor.execCommand("Underline");}],StrikeThrough:["Strikethrough","ed_format_strike",false,function(editor){editor.execCommand("StrikeThrough");}],Subscript:["Subscript","ed_format_sub",false,function(editor){editor.execCommand("Subscript");}],Superscript:["Superscript","ed_format_sup",false,function(editor){editor.execCommand("Superscript");}],JustifyLeft:["Justify Left","ed_align_left.gif",false,function(editor){editor.execCommand("JustifyLeft");}],JustifyCenter:["Justify Center","ed_align_center.gif",false,function(editor){editor.execCommand("JustifyCenter");}],JustifyRight:["Justify Right","ed_align_right.gif",false,function(editor){editor.execCommand("JustifyRight");}],JustifyFull:["Justify Full","ed_align_justify.gif",false,function(editor){editor.execCommand("JustifyFull");}],InsertOrderedList:["Ordered List","ed_list_num.gif",false,function(editor){editor.execCommand("InsertOrderedList");}],InsertUnorderedList:["Bulleted List","ed_list_bullet",false,function(editor){editor.execCommand("InsertUnorderedList");}],Outdent:["Decrease Indent","ed_indent_less.gif",false,function(editor){editor.execCommand("Outdent");}],Indent:["Increase Indent","ed_indent_more.gif",false,function(editor){editor.execCommand("Indent");}],ForeColor:["Font Color","ed_color_fg.gif",false,function(editor){editor.execCommand("ForeColor");}],HiliteColor:["Background Color","ed_color_bg.gif",false,function(editor){editor.execCommand("HiliteColor");}],InsertHorizontalRule:["Horizontal Rule","ed_hr.gif",false,function(editor){editor.execCommand("InsertHorizontalRule");}],CreateLink:["Insert Web Link","ed_link.gif",false,function(editor){editor.execCommand("CreateLink",true);},null,false,true],InsertImage:["Insert/Modify Image","ed_image.gif",false,function(editor){editor.execCommand("InsertImage");}],InsertTable:["Insert Table","insert_table.gif",false,function(editor){editor.execCommand("InsertTable");}],HtmlMode:["Toggle HTML Source","ed_html.gif",true,function(editor){editor.execCommand("HtmlMode");}],SelectAll:["SelectAll","",true,function(editor){editor.execCommand("SelectAll");},null,true,false],SplitBlock:["Toggle Container Block","ed_splitblock.gif",false,function(editor){editor.execCommand("SplitBlock");}],About:["About this editor","ed_about.gif",true,function(editor){editor.execCommand("About");}],ShowHelp:["Help using editor","ed_help.gif",true,function(editor){editor.execCommand("ShowHelp");}],Undo:["Undoes your last action","ed_undo.gif",false,function(editor){editor.execCommand("Undo");}],Redo:["Redoes your last action","ed_redo.gif",false,function(editor){editor.execCommand("Redo");}],Cut:["Cut selection","ed_cut.gif",false,function(editor,command,obj){editor.execCommand("Cut");}],Copy:["Copy selection","ed_copy.gif",false,function(editor,command,obj){editor.execCommand("Copy");}],Paste:["Paste from clipboard","ed_paste.gif",false,function(editor,command,obj){editor.execCommand("Paste");}],SelectAll:["SelectAll","",true,function(editor){editor.execCommand("SelectAll");},null,true,false],LeftToRight:["Direction left to right","ed_left_to_right.gif",false,function(editor){editor.execCommand("LeftToRight");}],RightToLeft:["Direction right to left","ed_right_to_left.gif",false,function(editor){editor.execCommand("RightToLeft");}]};this.hotKeyList={a:"SelectAll",b:"Bold",i:"Italic",u:"Underline",s:"StrikeThrough",l:"JustifyLeft",e:"JustifyCenter",r:"JustifyRight",j:"JustifyFull",n:"FormatBlock",v:"Paste",0:"CleanWord",z:"Undo",y:"Redo"};for(var i in this.btnList){var btn=this.btnList[i];if(typeof(HTMLArea.I18N.tooltips[i.toLowerCase()])!="undefined")btn[0]=HTMLArea.I18N.tooltips[i.toLowerCase()];if(typeof(btn[1])=="string")btn[1]=_editor_skin+this.imgURL+btn[1];else btn[1][0]=_editor_skin+this.imgURL+btn[1][0];}this.customSelects={};};HTMLArea.Config.prototype.registerButton=function(id,tooltip,image,textMode,action,context,hide,selection){var the_id;switch(typeof(id)){case "string":the_id=id;break;case "object":the_id=id.id;break;default:HTMLArea._appendToLog("ERROR [HTMLArea.Config::registerButton]: invalid arguments");return false;}if(typeof(this.customSelects[the_id])!="undefined")HTMLArea._appendToLog("WARNING [HTMLArea.Config::registerButton]: A dropdown with the same ID "+id+" already exists.");if(typeof(this.btnList[the_id])!="undefined")HTMLArea._appendToLog("WARNING [HTMLArea.Config::registerButton]: A button with the same ID "+id+" already exists.");switch(typeof(id)){case "string":if(typeof(hide)=="undefined")var hide=false;if(typeof(selection)=="undefined")var selection=false;this.btnList[id]=[tooltip,image,textMode,action,context,hide,selection];break;case "object":if(typeof(id.hide)=="undefined")id.hide=false;if(typeof(id.selection)=="undefined")id.selection=false;this.btnList[id.id]=[id.tooltip,id.image,id.textMode,id.action,id.context,id.hide,id.selection];break;}};HTMLArea.Config.prototype.registerDropdown=function(object){if(typeof(this.customSelects[object.id])!="undefined")HTMLArea._appendToLog("WARNING [HTMLArea.Config::registerDropdown]: A dropdown with the same ID "+object.id+" already exists.");if(typeof(this.btnList[object.id])!="undefined")HTMLArea._appendToLog("WARNING [HTMLArea.Config::registerDropdown]: A button with the same ID "+object.id+" already exists.");this.customSelects[object.id]=object;};HTMLArea.setButtonStatus=function(id,newval){var oldval=this[id];var el=document.getElementById(this.elementId);if(oldval!=newval){switch(id){case "enabled":if(newval){if(!HTMLArea.is_wamcom){HTMLArea._removeClass(el,"buttonDisabled");HTMLArea._removeClass(el.parentNode,"buttonDisabled");}el.disabled=false;}else{if(!HTMLArea.is_wamcom){HTMLArea._addClass(el,"buttonDisabled");HTMLArea._addClass(el.parentNode,"buttonDisabled");}el.disabled=true;}break;case "active":if(newval){HTMLArea._addClass(el,"buttonPressed");HTMLArea._addClass(el.parentNode,"buttonPressed");}else{HTMLArea._removeClass(el,"buttonPressed");HTMLArea._removeClass(el.parentNode,"buttonPressed");}break;}this[id]=newval;}};HTMLArea.newLine=function(toolbar){tb_line=document.createElement("ul");tb_line.className="tb-line";toolbar.appendChild(tb_line);return tb_line;};HTMLArea.addTbElement=function(element,tb_line,first_cell_on_line){var tb_cell=document.createElement("li");if(first_cell_on_line)tb_cell.className="tb-first-cell";else tb_cell.className="tb-cell";HTMLArea._addClass(tb_cell,element.className);tb_line.appendChild(tb_cell);tb_cell.appendChild(element);if(element.style.display=="none"){tb_cell.style.display="none";if(HTMLArea._hasClass(tb_line,"tb-group"))tb_line.style.display="none";if(HTMLArea._hasClass(tb_cell.previousSibling,"separator"))tb_cell.previousSibling.style.display="none";}return false;};HTMLArea.addTbGroup=function(tb_line,first_cell_on_line){var tb_group=document.createElement("ul");tb_group.className="tb-group";HTMLArea.addTbElement(tb_group,tb_line,first_cell_on_line);return tb_group;};HTMLArea.prototype.createSelect=function(txt,tb_line,first_cell_on_line,labelObj){var options=null,cmd=null,context=null,tooltip="",newObj={created:false,el:null,first:first_cell_on_line,labelUsed:false};switch(txt){case "FontSize":case "FontName":case "FormatBlock":options=this.config[txt];tooltip=HTMLArea.I18N.tooltips[txt.toLowerCase()];cmd=txt;break;default:cmd=txt;var dropdown=this.config.customSelects[cmd];if(typeof(dropdown)!="undefined"){options=dropdown.options;context=dropdown.context;if(typeof(dropdown.tooltip)!="undefined")tooltip=dropdown.tooltip;}break;}if(options){newObj["el"]=document.createElement("select");newObj["el"].className="select";newObj["el"].title=tooltip;newObj["el"].id=this._editorNumber+"-"+txt;newObj["first"]=HTMLArea.addTbElement(newObj["el"],tb_line,first_cell_on_line);var obj={name:txt,elementId:newObj["el"].id,enabled:true,text:false,cmd:cmd,state:HTMLArea.setButtonStatus,context:context,editorNumber:this._editorNumber};this._toolbarObjects[txt]=obj;newObj["el"]._obj=obj;if(labelObj["labelRef"]){labelObj["el"].htmlFor=newObj["el"].id;newObj["labelUsed"]=true;}HTMLArea._addEvent(newObj["el"],"change",HTMLArea.toolBarButtonHandler);for(var i in options){var op=document.createElement("option");op.innerHTML=i;op.value=options[i];if(txt=="FontName"&&!this.config.disablePCexamples){if(HTMLArea.is_gecko)op.setAttribute("style","font-family:"+op.value+";");else op.style.cssText="font-family:"+op.value+";";}newObj["el"].appendChild(op);}newObj["created"]=true;}return newObj;};HTMLArea.prototype.createButton=function(txt,tb_line,first_cell_on_line,labelObj){var btn=null,btnImg=null,newObj={created:false,el:null,first:first_cell_on_line,labelUsed:false};switch(txt){case "separator":newObj["el"]=document.createElement("div");newObj["el"].className="separator";newObj["first"]=HTMLArea.addTbElement(newObj["el"],tb_line,first_cell_on_line);newObj["created"]=true;break;case "space":newObj["el"]=document.createElement("div");newObj["el"].className="space";newObj["el"].innerHTML="&nbsp;";newObj["first"]=HTMLArea.addTbElement(newObj["el"],tb_line,first_cell_on_line);newObj["created"]=true;break;case "TextIndicator":newObj["el"]=document.createElement("div");newObj["el"].appendChild(document.createTextNode("A"));newObj["el"].className="indicator";newObj["el"].title=HTMLArea.I18N.tooltips.textindicator;newObj["el"].id=this._editorNumber+"-"+txt;newObj["first"]=HTMLArea.addTbElement(newObj["el"],tb_line,first_cell_on_line);var obj={name:txt,elementId:newObj["el"].id,enabled:true,active:false,text:false,cmd:"TextIndicator",state:HTMLArea.setButtonStatus};this._toolbarObjects[txt]=obj;newObj["created"]=true;break;default:btn=this.config.btnList[txt];}if(!newObj["created"]&&btn){newObj["el"]=document.createElement("button");if(HTMLArea.is_opera)newObj["el"].outerHTML='<button type="button"></button>';newObj["el"].title=btn[0];newObj["el"].className="button";newObj["el"].id=this._editorNumber+"-"+txt;if(btn[5])newObj["el"].style.display="none";newObj["first"]=HTMLArea.addTbElement(newObj["el"],tb_line,first_cell_on_line);var obj={name:txt,elementId:newObj["el"].id,enabled:true,active:false,text:btn[2],cmd:btn[3],state:HTMLArea.setButtonStatus,context:btn[4]||null,selection:btn[6],editorNumber:this._editorNumber};this._toolbarObjects[txt]=obj;newObj["el"]._obj=obj;if(labelObj["labelRef"]){labelObj["el"].htmlFor=newObj["el"].id;newObj["labelUsed"]=true;}HTMLArea._addEvents(newObj["el"],["mouseover","mouseout","mousedown","click"],HTMLArea.toolBarButtonHandler);if(typeof(btn[1])!="string"&&HTMLArea.is_ie){var btnImgContainer=document.createElement("div");btnImgContainer.className="buttonImgContainer";btnImgContainer.innerHTML='<img src="'+btn[1][0]+'" style="position: relative; top: -'+(18*(btn[1][1]+1))+'px; left: -'+(18*(btn[1][2]+1))+'px;" alt="'+btn[0]+'" />';newObj["el"].appendChild(btnImgContainer);}else{newObj["el"].className+=" "+txt;if(this.plugins["TYPO3Browsers"]&&(txt=="CreateLink"||txt=="InsertImage"))newObj["el"].className+="-TYPO3Browsers";}newObj["created"]=true;}return newObj;};HTMLArea.createLabel=function(txt,tb_line,first_cell_on_line){var newObj={created:false,el:null,labelRef:false,first:first_cell_on_line};if(/^([IT])\[(.*?)\]/.test(txt)){var l7ed=RegExp.$1=="I";var label=RegExp.$2;if(l7ed)label=HTMLArea.I18N.dialogs[label];newObj["el"]=document.createElement("label");newObj["el"].className="label";newObj["el"].innerHTML=label;newObj["labelRef"]=true;newObj["created"]=true;newObj["first"]=HTMLArea.addTbElement(newObj["el"],tb_line,first_cell_on_line);}return newObj;};HTMLArea.prototype._createToolbar=function(){var j,k,code,n=this.config.toolbar.length,m,tb_line=null,tb_group=null,first_cell_on_line=true,labelObj=new Object(),tbObj=new Object();var toolbar=document.createElement("div");this._toolbar=toolbar;toolbar.className="toolbar";toolbar.unselectable="1";this._toolbarObjects=new Object();for(j=0;j<n;++j){tb_line=HTMLArea.newLine(toolbar);if(!this.config.keepButtonGroupTogether)HTMLArea._addClass(tb_line,"free-float");first_cell_on_line=true;tb_group=null;var group=this.config.toolbar[j];m=group.length;for(k=0;k<m;++k){code=group[k];if(code=="linebreak"){tb_line=HTMLArea.newLine(toolbar);if(!this.config.keepButtonGroupTogether)HTMLArea._addClass(tb_line,"free-float");first_cell_on_line=true;tb_group=null;}else{if((code=="separator"||first_cell_on_line)&&this.config.keepButtonGroupTogether){tb_group=HTMLArea.addTbGroup(tb_line,first_cell_on_line);first_cell_on_line=false;}created=false;if(/^([IT])\[(.*?)\]/.test(code)){labelObj=HTMLArea.createLabel(code,(tb_group?tb_group:tb_line),first_cell_on_line);created=labelObj["created"];first_cell_on_line=labelObj["first"];}if(!created){tbObj=this.createButton(code,(tb_group?tb_group:tb_line),first_cell_on_line,labelObj);created=tbObj["created"];first_cell_on_line=tbObj["first"];if(tbObj["labelUsed"])labelObj["labelRef"]=false;}if(!created){tbObj=this.createSelect(code,(tb_group?tb_group:tb_line),first_cell_on_line,labelObj);created=tbObj["created"];first_cell_on_line=tbObj["first"];if(tbObj["labelUsed"])labelObj["labelRef"]=false;}if(!created)HTMLArea._appendToLog("ERROR [HTMLArea::createToolbar]: Unknown toolbar item: "+code);}}}tb_line=HTMLArea.newLine(toolbar);this._htmlArea.appendChild(toolbar);};HTMLArea.toolBarButtonHandler=function(ev){if(!ev)var ev=window.event;var target=(ev.target)?ev.target:ev.srcElement;while(target.tagName.toLowerCase()=="img"||target.tagName.toLowerCase()=="div")target=target.parentNode;var obj=target._obj;var editorNumber=obj["editorNumber"];var editor=RTEarea[editorNumber]["editor"];if(obj.enabled){switch(ev.type){case "mouseover":HTMLArea._addClass(target,"buttonHover");HTMLArea._addClass(target.parentNode,"buttonHover");break;case "mouseout":HTMLArea._removeClass(target,"buttonHover");HTMLArea._removeClass(target.parentNode,"buttonHover");HTMLArea._removeClass(target,"buttonActive");HTMLArea._removeClass(target.parentNode,"buttonActive");if(obj.active){HTMLArea._addClass(target,"buttonPressed");HTMLArea._addClass(target.parentNode,"buttonPressed");}break;case "mousedown":if(!HTMLArea.is_opera){HTMLArea._addClass(target,"buttonActive");HTMLArea._addClass(target.parentNode,"buttonActive");HTMLArea._removeClass(target,"buttonPressed");HTMLArea._removeClass(target.parentNode,"buttonPressed");}HTMLArea._stopEvent(ev);break;case "click":HTMLArea._removeClass(target,"buttonActive");HTMLArea._removeClass(target.parentNode,"buttonActive");HTMLArea._removeClass(target,"buttonHover");HTMLArea._removeClass(target.parentNode,"buttonHover");obj.cmd(editor,obj.name,obj);HTMLArea._stopEvent(ev);break;case "change":editor.focusEditor();var value=target.options[target.selectedIndex].value;switch(obj.name){case "FontName":case "FontSize":editor.execCommand(obj.name,false,value);break;case "FormatBlock":(HTMLArea.is_ie||HTMLArea.is_safari)&&(value="<"+value+">");editor.execCommand(obj.name,false,value);break;default:var dropdown=editor.config.customSelects[obj.name];if(typeof(dropdown)!="undefined")dropdown.action(editor);else HTMLArea._appendToLog("ERROR [HTMLArea::toolBarButtonHandler]: Combo box "+obj.name+" not registered.");}}}};HTMLArea.prototype._createStatusBar=function(){var statusBar=document.createElement("div");this._statusBar=statusBar;statusBar.className="statusBar";if(!this.config.statusBar)statusBar.style.display="none";var statusBarTree=document.createElement("span");this._statusBarTree=statusBarTree;statusBarTree.className="statusBarTree";statusBar.appendChild(statusBarTree);statusBarTree.appendChild(document.createTextNode(HTMLArea.I18N.msg["Path"]+": "));this._htmlArea.appendChild(statusBar);};HTMLArea.prototype.generate=function(){var textarea=this._textArea;if(typeof(textarea)=="string"){textarea=HTMLArea.getElementById("textarea",textarea);this._textArea=textarea;}textarea.style.display="none";var htmlarea=document.createElement("div");htmlarea.className="htmlarea";htmlarea.style.width=textarea.style.width;this._htmlArea=htmlarea;textarea.parentNode.insertBefore(htmlarea,textarea);if(textarea.form){var f=textarea.form;if(typeof(f.onreset)=="function"){var funcref=f.onreset;if(typeof(f.__msh_prevOnReset)=="undefined")f.__msh_prevOnReset=[];f.__msh_prevOnReset.push(funcref);}f._editorNumber=this._editorNumber;HTMLArea._addEvent(f,"reset",HTMLArea.resetHandler);}this._createToolbar();HTMLArea._appendToLog("[HTMLArea::generate]: Toolbar successfully created.");var iframe=document.createElement("iframe");if(HTMLArea.is_ie||HTMLArea.is_safari||HTMLArea.is_wamcom){iframe.setAttribute("src",_editor_url+"popups/blank.html");}else if(HTMLArea.is_opera){iframe.setAttribute("src",_typo3_host_url+_editor_url+"popups/blank.html");}else{iframe.setAttribute("src","javascript:void(0);");}iframe.className="editorIframe";if(!this.config.statusBar)iframe.className+=" noStatusBar";htmlarea.appendChild(iframe);this._iframe=iframe;this._createStatusBar();this.sizeIframe(2);HTMLArea._appendToLog("[HTMLArea::generate]: Editor iframe successfully created.");this.initIframe();return this;};HTMLArea.prototype.sizeIframe=function(diff){var height=(this.config.height=="auto"?(this._textArea.style.height):this.config.height);var textareaHeight=height;if(height.indexOf("%")==-1){height=parseInt(height)-diff;if(this.config.sizeIncludesToolbar){this._initialToolbarOffsetHeight=this._toolbar.offsetHeight;height-=this._toolbar.offsetHeight;height-=this._statusBar.offsetHeight;}if(height<0)height=0;textareaHeight=(height-4);if(textareaHeight<0)textareaHeight=0;height+="px";textareaHeight+="px";}this._iframe.style.height=height;this._textArea.style.height=textareaHeight;var textareaWidth=(this.config.width=="auto"?(this._textArea.style.width):this.config.width);if(textareaWidth.indexOf("%")==-1){textareaWidth=parseInt(textareaWidth)-diff;if(textareaWidth<0)textareaWidth=0;textareaWidth+="px";}this._iframe.style.width="100%";this._textArea.style.width=textareaWidth;};HTMLArea.initIframe=function(editorNumber){var editor=RTEarea[editorNumber]["editor"];editor.initIframe();};HTMLArea.prototype.initIframe=function(){if(this._initIframeTimer)window.clearTimeout(this._initIframeTimer);if(!this._iframe||(!this._iframe.contentWindow&&!this._iframe.contentDocument)){this._initIframeTimer=window.setTimeout("HTMLArea.initIframe("+this._editorNumber+");",50);return false;}else if(this._iframe.contentWindow){if(!this._iframe.contentWindow.document||!this._iframe.contentWindow.document.documentElement){this._initIframeTimer=window.setTimeout("HTMLArea.initIframe("+this._editorNumber+");",50);return false;}}else if(!this._iframe.contentDocument.documentElement){this._initIframeTimer=window.setTimeout("HTMLArea.initIframe("+this._editorNumber+");",50);return false;}var doc=this._iframe.contentWindow?this._iframe.contentWindow.document:this._iframe.contentDocument;this._doc=doc;if(!this.config.fullPage){var head=doc.getElementsByTagName("head")[0];if(!head){head=doc.createElement("head");doc.documentElement.appendChild(head);}if(this.config.baseURL&&!HTMLArea.is_opera){var base=doc.getElementsByTagName("base")[0];if(!base){base=doc.createElement("base");base.href=this.config.baseURL;head.appendChild(base);}HTMLArea._appendToLog("[HTMLArea::initIframe]: Iframe baseURL set to: "+this.config.baseURL);}var link0=doc.getElementsByTagName("link")[0];if(!link0){link0=doc.createElement("link");link0.rel="stylesheet";link0.href=this.config.editedContentStyle;head.appendChild(link0);HTMLArea._appendToLog("[HTMLArea::initIframe]: Skin CSS set to: "+this.config.editedContentStyle);}if(this.config.defaultPageStyle){var link=doc.getElementsByTagName("link")[1];if(!link){link=doc.createElement("link");link.rel="stylesheet";link.href=this.config.defaultPageStyle;head.appendChild(link);}HTMLArea._appendToLog("[HTMLArea::initIframe]: Override CSS set to: "+this.config.defaultPageStyle);}if(this.config.pageStyle){var link=doc.getElementsByTagName("link")[2];if(!link){link=doc.createElement("link");link.rel="stylesheet";link.href=this.config.pageStyle;head.appendChild(link);}HTMLArea._appendToLog("[HTMLArea::initIframe]: Content CSS set to: "+this.config.pageStyle);}}else{var html=this._textArea.value;this.setFullHTML(html);}HTMLArea._appendToLog("[HTMLArea::initIframe]: Editor iframe head successfully initialized.");this.stylesLoaded();};HTMLArea.stylesLoaded=function(editorNumber){var editor=RTEarea[editorNumber]["editor"];editor.stylesLoaded();};HTMLArea.prototype.stylesLoaded=function(){var doc=this._doc;var docWellFormed=true;if(!HTMLArea.is_opera){if(this._stylesLoadedTimer)window.clearTimeout(this._stylesLoadedTimer);var stylesAreLoaded=true;var rules;for(var rule=0;rule<doc.styleSheets.length;rule++){if(HTMLArea.is_gecko)try{rules=doc.styleSheets[rule].cssRules;}catch(e){stylesAreLoaded=false;}if(HTMLArea.is_ie)try{rules=doc.styleSheets[rule].rules;}catch(e){stylesAreLoaded=false;}if(HTMLArea.is_ie)try{rules=doc.styleSheets[rule].imports;}catch(e){stylesAreLoaded=false;}}if(!stylesAreLoaded&&!HTMLArea.is_wamcom){this._stylesLoadedTimer=window.setTimeout("HTMLArea.stylesLoaded("+this._editorNumber+");",100);return false;}HTMLArea._appendToLog("[HTMLArea::initIframe]: Stylesheets successfully loaded.");}if(!this.config.fullPage){doc.body.style.borderWidth="0px";doc.body.className="htmlarea-content-body";try{doc.body.innerHTML=this._textArea.value;}catch(e){HTMLArea._appendToLog("[HTMLArea::initIframe]: The HTML document is not well-formed.");alert(HTMLArea.I18N.msg["HTML-document-not-well-formed"]);docWellFormed=false;}}if(this._customUndo)this._timerUndo=window.setInterval("HTMLArea.undoTakeSnapshot("+this._editorNumber+");",this.config.undoTimeout);if(docWellFormed){if(HTMLArea.is_gecko&&!HTMLArea.is_safari&&!HTMLArea.is_opera&&!this._initEditMode())return false;if(HTMLArea.is_opera)doc.designMode="on";if(HTMLArea.is_ie||HTMLArea.is_safari)doc.body.contentEditable=true;this._editMode="wysiwyg";if(doc.body.contentEditable||doc.designMode=="on")HTMLArea._appendToLog("[HTMLArea::initIframe]: Design mode successfully set.");}else{this._editMode="textmode";this.setMode("docnotwellformedmode");HTMLArea._appendToLog("[HTMLArea::initIframe]: Design mode could not be set.");}doc._editorNo=this._editorNumber;if(HTMLArea.is_ie)doc.documentElement._editorNo=this._editorNumber;HTMLArea._addEvents((HTMLArea.is_ie?doc.body:doc),["keydown","keypress","mousedown","mouseup","drag"],HTMLArea._editorEvent,true);HTMLArea._addEvent((this._iframe.contentWindow?this._iframe.contentWi