From 00d46f6148fcb5d7bff229f0d927bc2982985739 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Sat, 15 Apr 2006 20:03:31 +0000 Subject: [PATCH] upgrading tinymce to 2.0.5.1 --- www/extras/tinymce2/changelog | 153 + www/extras/tinymce2/docs/about.html | 4 +- .../tinymce2/docs/compatiblity_chart.html | 2 +- www/extras/tinymce2/docs/credits.html | 3 +- www/extras/tinymce2/docs/css/screen.css | 47 +- .../docs/customization_language_packs.html | 10 +- .../tinymce2/docs/customization_plugins.html | 409 +- .../tinymce2/docs/customization_themes.html | 561 +- www/extras/tinymce2/docs/faq.html | 112 +- www/extras/tinymce2/docs/index.html | 2 +- .../docs/installation_example_00.html | 2 +- .../docs/installation_example_01.html | 2 +- .../docs/installation_example_02.html | 2 +- .../docs/installation_example_03.html | 2 +- www/extras/tinymce2/docs/installing.html | 2 +- www/extras/tinymce2/docs/license.html | 2 +- .../docs/option_accessibility_warnings.html | 2 +- .../docs/option_add_form_submit_trigger.html | 2 +- .../docs/option_add_unload_trigger.html | 2 +- .../docs/option_apply_source_formatting.html | 2 +- www/extras/tinymce2/docs/option_ask.html | 2 +- .../tinymce2/docs/option_auto_focus.html | 2 +- .../docs/option_auto_reset_designmode.html | 2 +- .../tinymce2/docs/option_auto_resize.html | 2 +- www/extras/tinymce2/docs/option_browsers.html | 2 +- .../tinymce2/docs/option_button_tile_map.html | 2 +- www/extras/tinymce2/docs/option_cleanup.html | 4 +- .../docs/option_cleanup_callback.html | 2 +- .../docs/option_cleanup_on_startup.html | 2 +- .../tinymce2/docs/option_content_css.html | 4 +- .../docs/option_convert_fonts_to_spans.html | 2 +- .../docs/option_convert_newlines_to_brs.html | 2 +- .../tinymce2/docs/option_convert_urls.html | 4 +- .../docs/option_custom_undo_redo.html | 2 +- ...n_custom_undo_redo_keyboard_shortcuts.html | 2 +- .../docs/option_custom_undo_redo_levels.html | 2 +- www/extras/tinymce2/docs/option_debug.html | 2 +- .../tinymce2/docs/option_dialog_type.html | 2 +- .../tinymce2/docs/option_directionality.html | 2 +- .../tinymce2/docs/option_docs_language.html | 2 +- www/extras/tinymce2/docs/option_doctype.html | 2 +- .../docs/option_document_base_url.html | 2 +- .../tinymce2/docs/option_editor_css.html | 2 +- .../docs/option_editor_deselector.html | 2 +- .../tinymce2/docs/option_editor_selector.html | 2 +- www/extras/tinymce2/docs/option_elements.html | 2 +- www/extras/tinymce2/docs/option_encoding.html | 2 +- www/extras/tinymce2/docs/option_entities.html | 2 +- .../tinymce2/docs/option_entity_encoding.html | 2 +- .../tinymce2/docs/option_event_elements.html | 2 +- .../docs/option_extended_valid_elements.html | 2 +- .../docs/option_external_image_list_url.html | 2 +- .../docs/option_external_link_list_url.html | 2 +- .../docs/option_file_browser_callback.html | 2 +- .../docs/option_fix_content_duplication.html | 2 +- .../tinymce2/docs/option_focus_alert.html | 2 +- .../docs/option_font_size_classes.html | 2 +- .../docs/option_font_size_style_values.html | 2 +- .../docs/option_force_br_newlines.html | 4 +- .../docs/option_force_hex_style_colors.html | 2 +- .../docs/option_force_p_newlines.html | 2 +- www/extras/tinymce2/docs/option_height.html | 2 +- .../docs/option_init_instance_callback.html | 2 +- .../tinymce2/docs/option_inline_styles.html | 2 +- .../docs/option_insertimage_callback.html | 9 +- .../docs/option_insertlink_callback.html | 9 +- .../docs/option_invalid_elements.html | 2 +- www/extras/tinymce2/docs/option_language.html | 2 +- .../option_merge_styles_invalid_parents.html | 2 +- www/extras/tinymce2/docs/option_mode.html | 2 +- www/extras/tinymce2/docs/option_nowrap.html | 2 +- .../tinymce2/docs/option_object_resizing.html | 2 +- .../docs/option_onchange_callback.html | 2 +- www/extras/tinymce2/docs/option_oninit.html | 2 +- www/extras/tinymce2/docs/option_plugins.html | 7 +- .../tinymce2/docs/option_popups_css.html | 2 +- .../tinymce2/docs/option_preformatted.html | 2 +- .../tinymce2/docs/option_relative_urls.html | 2 +- .../docs/option_remove_linebreaks.html | 2 +- .../docs/option_remove_script_host.html | 2 +- .../tinymce2/docs/option_save_callback.html | 4 +- .../docs/option_setupcontent_callback.html | 2 +- .../tinymce2/docs/option_submit_patch.html | 2 +- .../docs/option_table_inline_editing.html | 2 +- .../docs/option_textarea_trigger.html | 2 +- www/extras/tinymce2/docs/option_theme.html | 4 +- .../option_theme_advanced_blockformats.html | 6 +- .../docs/option_theme_advanced_buttons_n.html | 4 +- .../option_theme_advanced_buttons_n_add.html | 4 +- ...n_theme_advanced_buttons_n_add_before.html | 4 +- .../docs/option_theme_advanced_container.html | 2 +- ...option_theme_advanced_container_align.html | 2 +- ...option_theme_advanced_container_class.html | 2 +- .../option_theme_advanced_containers.html | 2 +- ...eme_advanced_containers_default_align.html | 2 +- ...eme_advanced_containers_default_class.html | 2 +- .../option_theme_advanced_custom_layout.html | 2 +- .../docs/option_theme_advanced_disable.html | 2 +- .../docs/option_theme_advanced_fonts.html | 2 +- .../option_theme_advanced_layout_manager.html | 2 +- .../option_theme_advanced_link_targets.html | 2 +- .../docs/option_theme_advanced_path.html | 2 +- .../option_theme_advanced_path_location.html | 2 +- ...tion_theme_advanced_resize_horizontal.html | 2 +- .../docs/option_theme_advanced_resizing.html | 2 +- ...on_theme_advanced_resizing_use_cookie.html | 2 +- ...n_theme_advanced_source_editor_height.html | 2 +- ...on_theme_advanced_source_editor_width.html | 2 +- ...ion_theme_advanced_statusbar_location.html | 2 +- .../docs/option_theme_advanced_styles.html | 2 +- .../option_theme_advanced_toolbar_align.html | 2 +- ...ption_theme_advanced_toolbar_location.html | 2 +- .../docs/option_trim_span_elements.html | 2 +- .../docs/option_urlconverter_callback.html | 4 +- .../tinymce2/docs/option_valid_elements.html | 9 +- .../docs/option_verify_css_classes.html | 4 +- .../tinymce2/docs/option_verify_html.html | 2 +- www/extras/tinymce2/docs/option_visual.html | 2 +- .../docs/option_visual_table_class.html | 2 +- www/extras/tinymce2/docs/option_width.html | 2 +- www/extras/tinymce2/docs/plugin_advhr.html | 2 +- www/extras/tinymce2/docs/plugin_advimage.html | 5 +- www/extras/tinymce2/docs/plugin_advlink.html | 5 +- www/extras/tinymce2/docs/plugin_autosave.html | 2 +- .../tinymce2/docs/plugin_contextmenu.html | 2 +- .../tinymce2/docs/plugin_directionality.html | 2 +- www/extras/tinymce2/docs/plugin_emotions.html | 2 +- www/extras/tinymce2/docs/plugin_flash.html | 2 +- .../tinymce2/docs/plugin_fullscreen.html | 2 +- www/extras/tinymce2/docs/plugin_iespell.html | 2 +- .../tinymce2/docs/plugin_inlinepopups.html | 2 +- .../tinymce2/docs/plugin_insertdatetime.html | 2 +- .../tinymce2/docs/plugin_noneditable.html | 2 +- www/extras/tinymce2/docs/plugin_paste.html | 36 +- www/extras/tinymce2/docs/plugin_preview.html | 2 +- www/extras/tinymce2/docs/plugin_print.html | 2 +- www/extras/tinymce2/docs/plugin_save.html | 25 +- .../tinymce2/docs/plugin_searchreplace.html | 2 +- www/extras/tinymce2/docs/plugin_table.html | 10 +- www/extras/tinymce2/docs/plugin_zoom.html | 2 +- .../tinymce2/docs/reference_buttons.html | 19 +- .../docs/reference_configuration.html | 11 +- .../docs/reference_javascript_functions.html | 12 +- .../tinymce2/docs/reference_plugins.html | 5 +- .../tinymce2/examples/example_advanced.htm | 59 +- www/extras/tinymce2/examples/example_full.htm | 14 +- .../tinymce2/examples/example_simple.htm | 5 +- www/extras/tinymce2/examples/example_word.css | 14 +- www/extras/tinymce2/examples/example_word.htm | 5 +- .../tinymce2/jscripts/tiny_mce/langs/da.js | 28 +- .../tinymce2/jscripts/tiny_mce/langs/de.js | 4 +- .../tinymce2/jscripts/tiny_mce/langs/it.js | 2 +- .../jscripts/tiny_mce/langs/readme.txt | 5 + .../tinymce2/jscripts/tiny_mce/langs/zh_cn.js | 3 +- .../plugins/_template/editor_plugin.js | 119 +- .../plugins/_template/editor_plugin_src.js | 338 +- .../tiny_mce/plugins/_template/langs/zh_cn.js | 3 +- .../tiny_mce/plugins/advhr/editor_plugin.js | 2 +- .../plugins/advhr/editor_plugin_src.js | 161 +- .../tiny_mce/plugins/advhr/jscripts/rule.js | 2 +- .../tiny_mce/plugins/advhr/langs/cs.js | 2 +- .../tiny_mce/plugins/advhr/langs/da.js | 6 +- .../tiny_mce/plugins/advhr/langs/en.js | 2 +- .../tiny_mce/plugins/advhr/langs/zh_cn.js | 3 +- .../jscripts/tiny_mce/plugins/advhr/rule.htm | 64 +- .../plugins/advimage/css/advimage.css | 6 +- .../plugins/advimage/editor_plugin.js | 2 +- .../plugins/advimage/editor_plugin_src.js | 257 +- .../plugins/advimage/jscripts/functions.js | 2 +- .../tiny_mce/plugins/advimage/langs/cs.js | 37 +- .../tiny_mce/plugins/advimage/langs/da.js | 9 +- .../tiny_mce/plugins/advimage/langs/fr.js | 68 +- .../tiny_mce/plugins/advimage/langs/zh_cn.js | 5 +- .../tiny_mce/plugins/advlink/editor_plugin.js | 2 +- .../plugins/advlink/editor_plugin_src.js | 153 +- .../plugins/advlink/jscripts/functions.js | 10 +- .../tiny_mce/plugins/advlink/langs/cs.js | 65 +- .../tiny_mce/plugins/advlink/langs/da.js | 32 +- .../tiny_mce/plugins/advlink/langs/nb.js | 3 +- .../tiny_mce/plugins/advlink/langs/nl.js | 2 +- .../tiny_mce/plugins/advlink/langs/zh_cn.js | 5 +- .../tiny_mce/plugins/advlink/link.htm | 2 +- .../plugins/autosave/editor_plugin.js | 2 +- .../plugins/autosave/editor_plugin_src.js | 70 +- .../tiny_mce/plugins/autosave/langs/cs.js | 2 +- .../tiny_mce/plugins/autosave/langs/da.js | 4 +- .../tiny_mce/plugins/autosave/langs/zh_cn.js | 3 +- .../plugins/contextmenu/css/contextmenu.css | 36 +- .../plugins/contextmenu/editor_plugin.js | 2 +- .../plugins/contextmenu/editor_plugin_src.js | 524 +- .../plugins/directionality/editor_plugin.js | 2 +- .../directionality/editor_plugin_src.js | 167 +- .../plugins/directionality/langs/cs.js | 2 +- .../plugins/directionality/langs/da.js | 6 +- .../plugins/directionality/langs/zh_cn.js | 3 +- .../plugins/emotions/editor_plugin.js | 2 +- .../plugins/emotions/editor_plugin_src.js | 110 +- .../plugins/emotions/images/emotions.gif | Bin 357 -> 319 bytes .../plugins/emotions/jscripts/functions.js | 4 +- .../tiny_mce/plugins/emotions/langs/da.js | 14 +- .../tiny_mce/plugins/emotions/langs/zh_cn.js | 31 +- .../tiny_mce/plugins/flash/editor_plugin.js | 2 +- .../plugins/flash/editor_plugin_src.js | 451 +- .../tiny_mce/plugins/flash/langs/cs.js | 16 +- .../tiny_mce/plugins/flash/langs/da.js | 8 +- .../tiny_mce/plugins/flash/langs/zh_cn.js | 3 +- .../plugins/fullscreen/editor_plugin.js | 2 +- .../plugins/fullscreen/editor_plugin_src.js | 102 +- .../plugins/fullscreen/fullscreen.htm | 24 +- .../tiny_mce/plugins/fullscreen/langs/cs.js | 2 +- .../tiny_mce/plugins/fullscreen/langs/da.js | 6 +- .../plugins/fullscreen/langs/zh_cn.js | 3 +- .../tiny_mce/plugins/iespell/editor_plugin.js | 2 +- .../plugins/iespell/editor_plugin_src.js | 91 +- .../tiny_mce/plugins/iespell/langs/cs.js | 2 +- .../tiny_mce/plugins/iespell/langs/da.js | 4 +- .../tiny_mce/plugins/iespell/langs/zh_cn.js | 3 +- .../plugins/inlinepopups/css/inlinepopup.css | 4 +- .../plugins/inlinepopups/editor_plugin.js | 2 +- .../plugins/inlinepopups/editor_plugin_src.js | 95 +- .../plugins/insertdatetime/editor_plugin.js | 2 +- .../insertdatetime/editor_plugin_src.js | 159 +- .../plugins/insertdatetime/langs/cs.js | 6 +- .../plugins/insertdatetime/langs/da.js | 10 +- .../plugins/insertdatetime/langs/zh_cn.js | 3 +- .../plugins/noneditable/css/noneditable.css | 4 +- .../plugins/noneditable/editor_plugin.js | 2 +- .../plugins/noneditable/editor_plugin_src.js | 277 +- .../tiny_mce/plugins/paste/editor_plugin.js | 2 +- .../plugins/paste/editor_plugin_src.js | 649 +- .../tiny_mce/plugins/paste/langs/cs.js | 2 +- .../tiny_mce/plugins/paste/langs/da.js | 12 +- .../tiny_mce/plugins/paste/langs/zh_cn.js | 3 +- .../tiny_mce/plugins/preview/editor_plugin.js | 2 +- .../plugins/preview/editor_plugin_src.js | 158 +- .../tiny_mce/plugins/preview/langs/cs.js | 2 +- .../tiny_mce/plugins/preview/langs/zh_cn.js | 3 +- .../tiny_mce/plugins/print/editor_plugin.js | 2 +- .../plugins/print/editor_plugin_src.js | 80 +- .../tiny_mce/plugins/print/langs/zh_cn.js | 4 +- .../tiny_mce/plugins/save/editor_plugin.js | 2 +- .../plugins/save/editor_plugin_src.js | 169 +- .../tiny_mce/plugins/save/langs/cs.js | 2 +- .../tiny_mce/plugins/save/langs/zh_cn.js | 4 +- .../plugins/searchreplace/editor_plugin.js | 2 +- .../searchreplace/editor_plugin_src.js | 330 +- .../plugins/searchreplace/jscripts/replace.js | 6 +- .../plugins/searchreplace/langs/cs.js | 2 +- .../plugins/searchreplace/langs/da.js | 22 +- .../plugins/searchreplace/langs/en.js | 4 +- .../plugins/searchreplace/langs/zh_cn.js | 3 +- .../plugins/searchreplace/replace.htm | 4 +- .../jscripts/tiny_mce/plugins/table/cell.htm | 2 +- .../tiny_mce/plugins/table/editor_plugin.js | 2 +- .../plugins/table/editor_plugin_src.js | 1865 +-- .../tiny_mce/plugins/table/jscripts/cell.js | 5 + .../tiny_mce/plugins/table/jscripts/row.js | 5 + .../tiny_mce/plugins/table/jscripts/table.js | 28 +- .../tiny_mce/plugins/table/langs/cs.js | 119 +- .../tiny_mce/plugins/table/langs/da.js | 51 +- .../tiny_mce/plugins/table/langs/de.js | 2 +- .../tiny_mce/plugins/table/langs/en.js | 3 + .../tiny_mce/plugins/table/langs/it.js | 10 +- .../tiny_mce/plugins/table/langs/readme.txt | 8 +- .../tiny_mce/plugins/table/langs/sv.js | 3 + .../tiny_mce/plugins/table/langs/zh_cn.js | 3 +- .../jscripts/tiny_mce/plugins/table/row.htm | 2 +- .../jscripts/tiny_mce/plugins/table/table.htm | 2 +- .../tiny_mce/plugins/zoom/editor_plugin.js | 12 +- .../plugins/zoom/editor_plugin_src.js | 99 +- .../tiny_mce/themes/advanced/about.htm | 3 +- .../tiny_mce/themes/advanced/color_picker.htm | 2 +- .../themes/advanced/css/editor_content.css | 38 +- .../themes/advanced/css/editor_popup.css | 40 +- .../themes/advanced/css/editor_ui.css | 301 +- .../advanced/docs/cs/common_buttons.htm | 14 +- .../themes/advanced/docs/cs/style.css | 4 +- .../themes/advanced/docs/da/about.htm | 40 +- .../advanced/docs/da/common_buttons.htm | 110 +- .../docs/da/create_accessible_content.htm | 90 +- .../themes/advanced/docs/da/index.htm | 30 +- .../advanced/docs/da/insert_anchor_button.htm | 44 +- .../advanced/docs/da/insert_image_button.htm | 52 +- .../advanced/docs/da/insert_link_button.htm | 46 +- .../advanced/docs/da/insert_table_button.htm | 46 +- .../themes/advanced/docs/da/style.css | 6 +- .../themes/advanced/docs/de/style.css | 4 +- .../advanced/docs/en/common_buttons.htm | 14 +- .../themes/advanced/docs/en/style.css | 4 +- .../advanced/docs/es/common_buttons.htm | 14 +- .../themes/advanced/docs/es/style.css | 4 +- .../advanced/docs/fi/common_buttons.htm | 14 +- .../themes/advanced/docs/fi/style.css | 4 +- .../advanced/docs/fr/common_buttons.htm | 14 +- .../themes/advanced/docs/fr/style.css | 4 +- .../advanced/docs/fr_ca/common_buttons.htm | 14 +- .../themes/advanced/docs/fr_ca/style.css | 4 +- .../themes/advanced/docs/hu/style.css | 4 +- .../advanced/docs/it/common_buttons.htm | 14 +- .../themes/advanced/docs/it/style.css | 4 +- .../advanced/docs/nb/common_buttons.htm | 14 +- .../themes/advanced/docs/nb/style.css | 4 +- .../advanced/docs/nl/common_buttons.htm | 14 +- .../themes/advanced/docs/nl/style.css | 4 +- .../advanced/docs/nn/common_buttons.htm | 14 +- .../themes/advanced/docs/nn/style.css | 4 +- .../advanced/docs/pl/common_buttons.htm | 14 +- .../themes/advanced/docs/pl/style.css | 4 +- .../advanced/docs/sk/common_buttons.htm | 14 +- .../themes/advanced/docs/sk/style.css | 4 +- .../advanced/docs/sv/common_buttons.htm | 14 +- .../themes/advanced/docs/sv/style.css | 4 +- .../advanced/docs/zh_cn/common_buttons.htm | 14 +- .../themes/advanced/docs/zh_cn/style.css | 4 +- .../themes/advanced/editor_template.js | 24 +- .../themes/advanced/editor_template_src.js | 2387 ++-- .../tiny_mce/themes/advanced/image.htm | 75 +- .../themes/advanced/images/buttons.gif | Bin 3286 -> 8399 bytes .../themes/advanced/jscripts/about.js | 13 +- .../themes/advanced/jscripts/anchor.js | 21 +- .../themes/advanced/jscripts/charmap.js | 10 +- .../themes/advanced/jscripts/color_picker.js | 3 +- .../themes/advanced/jscripts/image.js | 2 +- .../tiny_mce/themes/advanced/jscripts/link.js | 17 +- .../themes/advanced/jscripts/source_editor.js | 20 +- .../tiny_mce/themes/advanced/langs/da.js | 57 +- .../tiny_mce/themes/advanced/langs/de.js | 3 +- .../tiny_mce/themes/advanced/langs/readme.txt | 8 +- .../tiny_mce/themes/advanced/langs/zh_cn.js | 3 +- .../tiny_mce/themes/advanced/link.htm | 72 +- .../themes/advanced/source_editor.htm | 2 +- .../themes/simple/css/editor_content.css | 32 +- .../themes/simple/css/editor_popup.css | 2 +- .../tiny_mce/themes/simple/css/editor_ui.css | 137 +- .../tiny_mce/themes/simple/editor_template.js | 24 +- .../themes/simple/editor_template_src.js | 138 +- .../tinymce2/jscripts/tiny_mce/tiny_mce.js | 4 +- .../jscripts/tiny_mce/tiny_mce_popup.js | 77 +- .../jscripts/tiny_mce/tiny_mce_src.js | 11054 ++++++++-------- .../jscripts/tiny_mce/utils/form_utils.js | 32 +- .../jscripts/tiny_mce/utils/mctabs.js | 6 +- .../jscripts/tiny_mce/utils/validate.js | 6 +- 342 files changed, 13043 insertions(+), 11487 deletions(-) diff --git a/www/extras/tinymce2/changelog b/www/extras/tinymce2/changelog index a168739e1..693f78fe0 100644 --- a/www/extras/tinymce2/changelog +++ b/www/extras/tinymce2/changelog @@ -1,3 +1,156 @@ +Version 2.0.5.1 (2005-03-22) + Fixed bug where emtpy paragraphs sometimes got removed in MSIE. + Fixed bug where autosave plugin was running even in fullscreen mode. + Fixed bug where browse and color image button urls in form_utils.js where hardcoded. +Version 2.0.5 (2005-03-21) + Added API docs for the TinyMCE_Popup class that is used by all dialogs in TinyMCE. + Added new TinyMCE_Layer class to the core of TinyMCE plugins will be using this later on. + Added new loadPlugin function, use this to load external plugins. + Added instructions on how to contribute language packs. + Added new support for multiple content_css files, based on contribution by Man-Chicken. + Added new table_cell_limit, table_row_limit, table_col_limit options, based on contribution by Man-Chicken. + Added new fix_list_elements option, if this is set to true UL/OL lists will be forced XHTML valid on cleanup. + Added new fix_table_elements, if this is set to true tables will be moved outside paragraphs. + Fixed so input and button as closed elements in the cleanup logic. + Fixed so the mceButtonSelected is more visible with darker background in the editor_ui.css. + Fixed issue where charmap.js was calling switchClass that's reserved for buttons. + Fixed issue where the directionality option wasn't used in the preview plugin. + Fixed issues with nestled bullet lists pasted from Word 2003. + Fixed bug where button wasn't selected correctly in MSIE due to a CSS issue. + Fixed bug where ask mode wasn't working on DIV elements in Firefox and Opera. + Fixed bug where the mceAddFrameControl command wasn't working correctly. + Fixed bug where language packs wasn't imported correctly in plugins loaded externaly. + Fixed bug where focusing external input elements was visible in element path under MSIE. + Fixed bug where fullscreen plugin wasn't opening the window fullscreen in Firefox. + Fixed bug where style select dropdown wasn't working in Firefox when used in fullscreen mode. + Fixed bug where the fix_content_duplication wasn't working anymore. + Fixed bug where MSIE sometimes generated empty paragraphs. + Fixed bug where MSIE sometimes generated tags like . + Fixed bug where the directionality option produced a error for the color picker dialog. + Fixed bug where configured callback options wasn't executed correctly in fullscreen mode. + Fixed bug where tags got generated as <*> some times in Gecko. + Fixed bug where the cursor was placed within a the anchor when inserting a new one in Gecko. + Fixed bug where convert_fonts_to_span option wasn't working correctly with new cleanup engine. + Fixed various language pack issues such as invalid characters. + Fixed naming conflict with zoom plugin and the format select box. + Fixed so that the initialization of the editor is slightly faster. + Removed all language packs except the english one from the core package. [BREAKS COMPATIBLITY] +Version 2.0.4 (2006-02-24) + Fixed bug where fullscreen plugin was using the tinymce_dev.js script. + Fixed bug where events where having a return true; statement infront of them. + Fixed bug where theme_advanced_toolbar_location option wasn't working. + Fixed bug where select lists wasn't working if you touched them with the tab key. + Fixed bug where auto reset design mode wasn't working correctly. + Fixed bug where null was inserted in paste button action in MSIE. + Fixed bug where _template plugin had a , instead of . character on e.type. + Fixed bug where src, href where replaced to xsrc and xhref in comments. + Fixed bug where paste_cleanup_on_paste option wasn't working correctly with the paste plugin. + Fixed bug where MSIE was reporting an error when TinyMCE was placed in a frame and not focused. + Fixed bug where clipboard_msg wasn't entity decoded corectly before displaying it in confirm box. + Fixed bug where mceRemoveControl wasn't working correctly on DIV elements. + Fixed bug where mceInsertContent/mceReplaceContent produced error when a empty string was inserted. + Fixed so the default valid_elements option is more XHTML valid. + Fixed issue where style formatting wasn't handled when pasting content from Word. + Fixed issue where ' characters wasn't entity encoded, they are now encoded into ' and not '. + Fixed issue with empty paragraphs, these are now filled with &nsbp; if they are empty. + Added documentation on how the # prefix can be used in the valid_elements option. + Added new options paste_remove_styles and paste_remove_spans to paste plugin. + Added possibility to have empty default attributes values. +Version 2.0.3 (2006-02-13) + Added missing buttons to button reference page in documentation. + Added dt,dl,dd elements to default_valid elements config value. + Added new support for self registrering plugins. + Added new callback for themes and plugins handleEvent and the handle_event_callback option. + Added new execcommand_callback option, this enables you to add custom execcommand logic on page level. + Added new custom_shortcuts option, this enables you to disable plugin/theme specific keyboard shortcuts. + Added new addShortcut to TinyMCE_Control, this enables plugin to register custom keyboard shortcuts. + Added new getButtonHTML function to TinyMCE core, this function makes it easier for plugins/themes to make buttons. + Added more documentation on how to write plugins and updated the _template plugin. + Added more documentation on how to write custom themes. + Fixed so the default window size of the source editor is larger in the advanced theme. + Fixed so all internal plugins use the new auto registration and separation logic. + Fixed so all internal themes use the new auto registration and separation logic. + Fixed so the Safari warning is switched off by default. + Fixed so cursor position isn't moved when performing a cleanup. + Fixed so cursor position is correct when performing undo/redo actions. + Fixed so all themes/plugins now use a:hover to produce the mouse over button effect. + Fixed so it uses the DOMContentLoaded and onreadystatechange instead of onload. + Fixed so the simple theme also supports the button_tile_map option. + Fixed so the selection/cursor is moved to the beginning of area on search/replace. + Fixed callback handling to reduce logic, improve performance and flexibility. + Fixed documentarion error for the paste plugin, contributed by Jochen Metzger. + Fixed bug that made the cleanup process to hang MSIE on specific content. + Fixed bug with absolute to relative URL convertion logic if the absolute URL didn't have a path. + Fixed bug where about.htm in advanced theme refered to a non existing css file. + Fixed bug with defParam and the event_elements option. + Fixed bug where fullscreen plugin wasn't correctly setup with editor contents. + Fixed bug where paste/drop converted relative URLs incorrectly in MSIE. + Fixed bug with inlinepopups not restoring selection on close window in MSIE. + Fixed bug where selection was lost when a new column/row was inserted in a table running in Gecko. + Fixed bug where save plugin wasn't working in fullscreen mode. + Fixed bug where fullscreen plugin wasn't working in Opera. + Fixed bug where editor resizing in advanced theme wasn't working in Opera. + Fixed bug where cursor position was placed at the end of instance on word paste. + Fixed bug where a tinyMCE is undefined error was reported in Firefox. + Fixed compatiblity issues with new cleanup plugin and the prototype.js library. + Renamed the mceItemEditable/mceItemNonEditable to mceEditable/mceNonEditable. + Renamed the TinyMCEControl class to TinyMCE_Control, TinyMCE_ is the valid class prefix. + Removed the getInsertLinkTemplate and getInsertImageTemplate functions from themes and from API. + Removed insertImage and insertLink from TinyMCE core, they are moved to the advanced theme. + Removed opacity workaround made for Opera Preview 1, download Opera Preview 2 instead. + Removed search backward function from replace dialog since it could result in a infinite loop. + Marked insertlink_callback, insertimage_callback options as deprecated these can be replaced with execcommand_callback. + Moved selection specific methods to a new class. For example inst.selectNode is now inst.selection.selectNode. + Updated German language pack, contributed by Ace Man. +Version 2.0.2 (2006-01-24) + Added updated Danish language pack contributed by Jan Moelgaard, John Dalsgaard and Bo Frederiksen. + Added updated Czech language pack contributed by michi aka mishal. + Added new Slovenian language pack contributed by Domen Kosir. + Added new Turkish language pack contributed by Engin Dumlu. + Added new save_onsavecallback option to the save plugin, this function is called on save. + Added new save_enablewhendirty option to the save plugin, this will disable the button until changes are made. + Added new onpageload callback event, this event is called when the page is loaded but before instances are made. + Added new accessibility_focus option, this enables you to control if buttons should be tab focusable or not. + Added new greek alpha character to charmap dialog. + Added new Scaron,scaron,Alpha entities to the default value of the entities option thanks to Kevin Rodgers. + Added new contextmenu items link.unlink,advhr contributed by Speednet. + Added new paste_insert_word_content_callback option for the paste plugin. + Added new cleanup plugin, this will replace the one inside the core ones it's considered stable. + Added cancel button to color picker contributed by Speednet. + Fixed various documentation errors and typos, modified the FAQ. + Fixed issue where the first handleNodeChange call was done to early in initialization. + Fixed issue with Dutch language pack for advlink plugin. + Fixed issue where dialogs was to short when dialog_type option was set to modal in MSIE. + Fixed bug where insert image under Gecko resulted in a broken image if it was inserted a the beginning of a element. + Fixed bug where mceVisualAid class wasn't removed from TH elements on save. + Fixed bug where the href attribute area elements gets converted to xhref. + Fixed bug with document relative anchors being forced absolute even when the convert_urls was set to false. + Fixed bug where some plugins produced &gr; intead of > entities on string encoding. + Fixed bug where some characters in charmap dialog was double encoded in Firefox/Gecko. + Fixed bug with XML core entities wasn't encoded when using raw or numeric value in entity_encoding option. + Fixed bug where classes was removed from table,td,th elements when the verify_css_classes option was enabled. + Fixed bug where elements was getting a visual aid class if a default or force class attribute value rule was used. + Fixed bug where strong/em rules didn't handle the -/+ prefixes correctly under Firefox/Mozilla. + Fixed bug where non textarea elements didn't work when submiting content. + Fixed bug where a access denied error was produced when using contextmenu together with modal dialogs under MSIE. + Fixed bug where fullscreen plugin didn't call custom cleanup functions when passing content back and forth. + Fixed issue where default rule for font tags didn't have a + prefix in valid_elements. + Fixed issue with CSS where "arrow" was used instead of "default" for cursor replacement. + Fixed issue where the replace button replaced the current selection first time it was used. + Fixed issue with missing title for the advhr dialog. + Fixed issue with div not beeing usable in the theme_advanced_blockformats option. + Fixed issue in with translation in the German language pack. + Fixed so the word wrap toggle for source view functions in Firefox/Mozilla. + Fixed so title attribute of emotion images gets inserted aswell as alt. + Fixed so the insert return on popups is checked by default in advlink. + Fixed so url gets filled when empty if a user selects a popup url. + Fixed so some init settings gets trimmed from whitespace. + Fixed so charmap closes when a char is selected since most of the time users only need one char. + Fixed so the link and image dialogs of advanced theme are styled with the new 2.x layout. + Fixed accessibility issuew with the link, image and advhr dialogs. + Fixed so the advhr dialog uses the new 2.x layout. + Fixed XHTML compliance for Preview plugin contributed by Bo Frederiksen. + Fixed entity decoding problem with insert button of the advhr plugin contributed by Bo Frederiksen. Version 2.0.1 (2005-12-02) Fixed critical bug in some MSIE versions when submiting content. Version 2.0 (2005-12-01) diff --git a/www/extras/tinymce2/docs/about.html b/www/extras/tinymce2/docs/about.html index e11f5b01c..723967d89 100644 --- a/www/extras/tinymce2/docs/about.html +++ b/www/extras/tinymce2/docs/about.html @@ -13,7 +13,7 @@

General information

-

TinyMCE is a powerful WYSIWYG editor control for web browsers such as MSIE or Mozilla that enables the user to edit HTML contents in a more user friendly way. The editor control is very flexible and it's build for integration purposes for example usage within systems like Intranets, CMS, LMS and so forth.

+

TinyMCE is a powerful WYSIWYG editor control for web browsers such as MSIE or Mozilla that enables the user to edit HTML contents in a more user friendly way. The editor control is very flexible and it's built for integration purposes for example usage within systems like Intranets, CMS, LMS and so forth.

TinyMCE is developed by Moxiecode Systems AB and is currently released under the "LGPL" license, read the license agreement for details.

@@ -33,7 +33,7 @@ diff --git a/www/extras/tinymce2/docs/compatiblity_chart.html b/www/extras/tinymce2/docs/compatiblity_chart.html index cce4cf3d0..acf65bfce 100644 --- a/www/extras/tinymce2/docs/compatiblity_chart.html +++ b/www/extras/tinymce2/docs/compatiblity_chart.html @@ -76,7 +76,7 @@ diff --git a/www/extras/tinymce2/docs/credits.html b/www/extras/tinymce2/docs/credits.html index ed79639c1..578c49a8e 100644 --- a/www/extras/tinymce2/docs/credits.html +++ b/www/extras/tinymce2/docs/credits.html @@ -24,6 +24,7 @@
  • Code / Solutions / Features
    • +
    • donadoni
    • Michael Keck
    • Victor Nilsson
    • Jürgen Baute
    • @@ -73,7 +74,7 @@ diff --git a/www/extras/tinymce2/docs/css/screen.css b/www/extras/tinymce2/docs/css/screen.css index 6bad721e2..280684b1c 100644 --- a/www/extras/tinymce2/docs/css/screen.css +++ b/www/extras/tinymce2/docs/css/screen.css @@ -16,15 +16,15 @@ body { h1 { font-size: 18px; font-weight: bold; - padding: 0px; + padding: 0; margin: 4px; } h2 { font-size: 14px; font-weight: bold; - padding: 0px; - margin: 0px; + padding: 0; + margin: 0; margin-top: 4px; margin-bottom: 4px; } @@ -32,8 +32,8 @@ h2 { h3 { font-size: 11px; font-weight: bold; - padding: 0px; - margin: 0px; + padding: 0; + margin: 0; margin-bottom: 3px; } @@ -57,19 +57,19 @@ p { .helpindex { margin-left: 20px; - padding-left: 0px; + padding-left: 0; } .optionlist { - margin: 0px; - padding: 0px; + margin: 0; + padding: 0; margin-bottom: 10px; } .optionlist li { - padding: 0px; - margin: 0px; + padding: 0; + margin: 0; margin-top: 3px; margin-bottom: 3px; margin-left: 10px; @@ -90,8 +90,8 @@ p { } code, pre { - margin: 0px; - padding: 0px; + margin: 0; + padding: 0; background-color: #E6EBF1; } @@ -142,4 +142,27 @@ a { thead { background-color: #E6EBF1; +} + +.btable { +} + +.btable th { + border: 1px solid gray; + vertical-align: top; +} + +.btable td { + border: 1px solid gray; + vertical-align: top; +} + +.plist { + list-style-type: none; + margin: 0; + padding: 0; +} + +.plist li { + padding-bottom: 3px; } \ No newline at end of file diff --git a/www/extras/tinymce2/docs/customization_language_packs.html b/www/extras/tinymce2/docs/customization_language_packs.html index 38923cb74..be3e28c3b 100644 --- a/www/extras/tinymce2/docs/customization_language_packs.html +++ b/www/extras/tinymce2/docs/customization_language_packs.html @@ -28,7 +28,8 @@ paste_desc : 'Paste (Ctrl+P)'

      Remember the last translation line should not have a , character at the end. The first parameter to the addToLang is the prefix to add before each variable, this was added to reduce the overall size of the language packs to reduce the overall download time.

      -

      Files to edit

      +

      Files to edit

      +

      When translating TinyMCE, these are the files that currently needs to be translated:

      @@ -39,11 +40,16 @@ paste_desc : 'Paste (Ctrl+P)'

      Notice some language variables may include a name/url of a gif image or simmilar, for example the button for bold has a "F" character in the Swedish language pack. There are also relative window sizes located in the language packs, for example is the link dialog needs to be bigger inorder to fit a specific translation you can alter the width of the window by modifying these variables.

      +

      Contributing your language pack

      +

      + Go to the sourceforge patch page and upload a zip containing all the language files in the correct directory structure.

      + Please translate all the plugins, even if you aren't using them.
      +

diff --git a/www/extras/tinymce2/docs/customization_plugins.html b/www/extras/tinymce2/docs/customization_plugins.html index 2caad0a37..1ac520edf 100644 --- a/www/extras/tinymce2/docs/customization_plugins.html +++ b/www/extras/tinymce2/docs/customization_plugins.html @@ -14,239 +14,212 @@

Creating your own plugins

-Creating you own plugins for the TinyMCE application is fairly easy if you know the basics of HTML, CSS and Javascript. The most easy way is to copy the "_template" directory or one of the other core plugins and work from there. The "_template" directory is a tutorial plugin that shows how to create a plugin. After you copy the template you need to change the red sections marked below to the name of your plugin this is needed so that plugins don't overlap in other words it gives the plugin a unique name. Then just alter the source code as you see fit remember that your custom plugins needs to be located in tiny_mce's "plugins" directory. If you want you may add plugin specific options/settings but remember to namespace them in the following format "<your plugin>_<option>" for example "yourplugin_someoption". +Creating you own plugins for the TinyMCE application is fairly easy if you know the basics of HTML, CSS and Javascript. The most easy way is to copy the "_template" directory or one of the other core plugins and work from there. The "_template" directory is a tutorial plugin that shows how to create a plugin. After you copy the template you need to change the red sections marked below to the name of your plugin this is needed so that plugins don't overlap in other words it gives the plugin a unique name.

+

If you want you may add plugin specific options/settings but remember to namespace them in the following format "<your plugin>_<option>" for example "yourplugin_someoption".

+

Specific callback functions that you don't need or doesn't do anything can be removed.

+ +
+

Plugin directory structure

-The example below has three functions, these are explained in greater detail below. + + + + + + + + + + + + +
File/Directory + Description +
cssPlugin specific CSS files
docsPlugin specific documentation
imagesPlugin specific images
jscriptsPlugin specific jscripts for HTML dialogs
langsPlugin specific language files
editor_plugin.jsEditor plugin file (compressed).
editor_plugin_src.jsEditor plugin file (source).
somedialog.htmPlugin specific dialog HTML file.
+

+
+

Plugin example source

+

+The example below shows a simple empty plugin and all possible callbacks.

-function TinyMCE_yourplugin_getInfo() {
-	// Should return info about the plugin to be presented in about dialog
-	return {
-		longname : 'Some plugin name',
-		author : 'Your name',
-		authorurl : 'http://www.yoursite.com',
-		infourl : 'http://www.yoursite.com/docs/..',
-		version : '1.0'
-	};
+var TinyMCE_SomeNamePlugin = {
+	/**
+	 * Returns information about the plugin as a name/value array.
+	 * The current keys are longname, author, authorurl, infourl and version.
+	 *
+	 * @returns Name/value array containing information about the plugin.
+	 * @type Array 
+	 */
+	getInfo : function() {
+		return {
+			longname : 'Your plugin',
+			author : 'Your name',
+			authorurl : 'http://www.yoursite.com',
+			infourl : 'http://www.yoursite.com/docs/template.html',
+			version : "1.0"
+		};
+	},
+
+	/**
+	 * Gets executed when a TinyMCE editor instance is initialized.
+	 *
+	 * @param {TinyMCE_Control} Initialized TinyMCE editor control instance. 
+	 */
+	initInstance : function(inst) {
+		// You can take out plugin specific parameters
+		alert("Initialization parameter:" + tinyMCE.getParam("somename_someparam", false));
+
+		// Register custom keyboard shortcut
+		inst.addShortcut('ctrl', 't', 'lang_somename_desc', 'mceSomeCommand');
+	},
+
+	/**
+	 * Returns the HTML code for a specific control or empty string if this plugin doesn't have that control.
+	 * A control can be a button, select list or any other HTML item to present in the TinyMCE user interface.
+	 * The variable {$editor_id} will be replaced with the current editor instance id and {$pluginurl} will be replaced
+	 * with the URL of the plugin. Language variables such as {$lang_somekey} will also be replaced with contents from
+	 * the language packs.
+	 *
+	 * @param {string} cn Editor control/button name to get HTML for.
+	 * @return HTML code for a specific control or empty string.
+	 * @type string
+	 */
+	getControlHTML : function(cn) {
+		switch (cn) {
+			case "SomeControl":
+				return tinyMCE.getButtonHTML(cn, 'lang_someplugin_button_desc', '{$pluginurl}/images/someimage.gif', 'mceSomeCommand');
+		}
+
+		return "";
+	},
+
+	getControlHTML : function(cn) {
+		switch (cn) {
+			case "advhr":
+				return tinyMCE.getButtonHTML(cn, 'lang_insert_advhr_desc', '{$pluginurl}/images/advhr.gif', 'mceAdvancedHr');
+		}
+
+		return "";
+	},
+
+
+	/**
+	 * Executes a specific command, this function handles plugin commands.
+	 *
+	 * @param {string} editor_id TinyMCE editor instance id that issued the command.
+	 * @param {HTMLElement} element Body or root element for the editor instance.
+	 * @param {string} command Command name to be executed.
+	 * @param {string} user_interface True/false if a user interface should be presented.
+	 * @param {mixed} value Custom value argument, can be anything.
+	 * @return true/false if the command was executed by this plugin or not.
+	 * @type
+	 */
+	execCommand : function(editor_id, element, command, user_interface, value) {
+		// Handle commands
+		switch (command) {
+			// Remember to have the "mce" prefix for commands so they don't intersect with built in ones in the browser.
+			case "mceSomeCommand":
+				// Do your custom command logic here.
+
+				return true;
+		}
+
+		// Pass to next handler in chain
+		return false;
+	},
+
+	/**
+	 * Gets called ones the cursor/selection in a TinyMCE instance changes. This is useful to enable/disable
+	 * button controls depending on where the user are and what they have selected. This method gets executed
+	 * alot and should be as performance tuned as possible.
+	 *
+	 * @param {string} editor_id TinyMCE editor instance id that was changed.
+	 * @param {HTMLNode} node Current node location, where the cursor is in the DOM tree.
+	 * @param {int} undo_index The current undo index, if this is -1 custom undo/redo is disabled.
+	 * @param {int} undo_levels The current undo levels, if this is -1 custom undo/redo is disabled.
+	 * @param {boolean} visual_aid Is visual aids enabled/disabled ex: dotted lines on tables.
+	 * @param {boolean} any_selection Is there any selection at all or is there only a cursor.
+	 */
+	handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
+	},
+
+	/**
+	 * Gets called when a TinyMCE editor instance gets filled with content on startup.
+	 *
+	 * @param {string} editor_id TinyMCE editor instance id that was filled with content.
+	 * @param {HTMLElement} body HTML body element of editor instance.
+	 * @param {HTMLDocument} doc HTML document instance.
+	 */
+	setupContent : function(editor_id, body, doc) {
+	},
+
+	/**
+	 * Gets called when the contents of a TinyMCE area is modified, in other words when a undo level is
+	 * added.
+	 *
+	 * @param {TinyMCE_Control} inst TinyMCE editor area control instance that got modified.
+	 */
+	onChange : function(inst) {
+	},
+
+	/**
+	 * Gets called when TinyMCE handles events such as keydown, mousedown etc. TinyMCE
+	 * doesn't listen on all types of events so custom event handling may be required for
+	 * some purposes.
+	 *
+	 * @param {Event} e HTML editor event reference.
+	 * @return true - pass to next handler in chain, false - stop chain execution
+	 * @type boolean
+	 */
+	handleEvent : function(e) {
+		return true;
+	},
+
+	/**
+	 * Gets called when HTML contents is inserted or retrived from a TinyMCE editor instance.
+	 * The type parameter contains what type of event that was performed and what format the content is in.
+	 * Possible valuses for type is get_from_editor, insert_to_editor, get_from_editor_dom, insert_to_editor_dom.
+	 *
+	 * @param {string} type Cleanup event type.
+	 * @param {mixed} content Editor contents that gets inserted/extracted can be a string or DOM element.
+	 * @param {TinyMCE_Control} inst TinyMCE editor instance control that performes the cleanup.
+	 * @return New content or the input content depending on action.
+	 * @type string
+	 */
+	cleanup : function(type, content, inst) {
+		return content;
+	},
+
+	// Private plugin internal methods
+
+	/**
+	 * This is just a internal plugin method, prefix all internal methods with a _ character.
+	 * The prefix is needed so they doesn't collide with future TinyMCE callback functions.
+	 *
+	 * @param {string} a Some arg1.
+	 * @param {string} b Some arg2.
+	 * @return Some return.
+	 * @type string
+	 */
+	_someInternalFunction : function(a, b) {
+		return 1;
+	}
 };
 
-function TinyMCE_yourplugin_initInstance(inst) {
-	// Gets executed when a editor instance is initialized
-}
-
-function TinyMCE_yourplugin_getControlHTML(control_name) {
-	// Gets executed when a button is to be generated
-}
-
-function TinyMCE_yourplugin_handleNodeChange(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
-   // Gets executed when the selection changes
-}
-
-function TinyMCE_yourplugin_execCommand(editor_id, element, command, user_interface, value) {
-   // Add your own custom commands here
-
-   return false;
-}
-
-function TinyMCE_yourplugin_cleanup(type, content) {
-	// Add your own custom cleanup here
-
-	return content;
-}
+// Adds the plugin class to the list of available TinyMCE plugins
+tinyMCE.addPlugin("someplugin", TinyMCE_SomePluginPlugin);
 

- -
- -

Creating popup HTML files

-

-When creating a popup you need to include the "tiny_mce_popup.js" this enables you to retrive the tinyMCE global instance in all popup windows. All variables and language definitions gets replaced in the page when it loads. So language variables such as {$lang_something} can be places in the HTML code, if you need to get a language string in JavaScript simply use the tinyMCE.getLang function. -

-

Example of simple popup file:

-
-
-<html>
-<head>
-<title>{$lang_plugin_sample_title}</title>
-<script language="javascript" src="../../tiny_mce_popup.js"></script>
-<script language="javascript">
-     // getWindowArg returns any arguments passed to the window
-     alert(tinyMCE.getWindowArg('some_arg'));
-</script>
-<body>
-     <strong>{$lang_plugin_sample_desc}</strong>
-</body>
-
-
- -
- -

The TinyMCE_<plugin>_initInstance function (Optional)

-

- This function is called when a editor instance gets initialized. -

-

- - - - - - - - - - - - -
Parameters
instReference to editor instance that was initialized.
-

- - -
- -

The TinyMCE_<plugin>_handleNodeChange function (Optional)

-

-This function is called when the cursor/selection of a editor instance changes. Then the currenly selected/focused node is passed to this function. This can be useful when you want to change the UI depending on what the user has selected. -

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Parameters
editor_idUnique editor id, this is the same as the $editor_id variable in getEditorTemplate.
nodeReference to the Node element where the cursor is currenly located.
undo_indexCurrent undo index, this value is -1 if the custom undo/redo support is disabled.
undo_levelsCurrent number of undo levels, this value is -1 if the custom undo/redo support is disabled.
visual_aidTrue/false state of visual aid/guidelines mode.
any_selectionIs any text or image selected.
-

- -
- -

The TinyMCE_<plugin>_execCommand function (Optional)

-

-This function is called when a command is executed for example "bold" or "createlink" this callback/plugin function may then intercept plugin specific commands and do custom logic. If this command returns true the command handling is terminated and the default tinyMCE command handeling never gets executed. -

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Parameters
editor_idUnique editor id, this is the same as the $editor_id variable in getEditorTemplate.
elementReference to the document DOM root element of the editor instance.
commandCommand that is to be executed for example "myCommand".
user_interfacetrue/false option if a user insterace is to be used or not.
valueCustom data value passed with command, may be any data type.
-

-

-Returns:
-true - Command intercepted and handled do not continue with command handling.
-false - Continue with execCommand handling, bubble.
-

- -
- -

The TinyMCE_<plugin>_getControlHTML(control_name) function (Optional)

-

-This function is called when a editor needs to render a specific control/button. This function should return the HTML template of that control or a empty string if the control_name wasn't recognized. Notice the variable {$pluginurl} gets replaced with the URL prefix for the current plugin directory. -

-

- - - - - - - - - - - - -
Parameters
control_nameControl name to match against.
-

-

-Returns: return the HTML template of that control or a empty string if the control_name wasn't recognized. -

-

The TinyMCE_<plugin>_cleanup(type, content) function (Optional)

-

-This function is called when a editor does cleanup of contents. This function has the same format as the one defined in the cleanup_callback option. -

-

- - - - - - - - - - - - - - - - -
Parameters
typeType of cleanup, insert_to_editor or get_from_editor. Insert to editor is passed when new content is placed within the editor and get_from_editor is when content is passed out from the editor. When dealing with the DOM representation of the same content insert_to_editor_dom or get_from_editor_dom gets passed as a type.
contentHTML contents to be cleaned up, this string contains the HTML code or with the _dom types the body DOM object gets passed instead.
-

-

-Returns: return the cleaned up HTML code. -

-
diff --git a/www/extras/tinymce2/docs/customization_themes.html b/www/extras/tinymce2/docs/customization_themes.html index 566923bbf..08c5e8c13 100644 --- a/www/extras/tinymce2/docs/customization_themes.html +++ b/www/extras/tinymce2/docs/customization_themes.html @@ -11,55 +11,221 @@
-

Creating your own Themes

-Creating you own themes for the TinyMCE application is fairly easy if you know the basics of HTML, CSS and Javascript. The most easy way is to copy the "default" or the "advanced" template and rename it as your own name to for example "mytheme". After you copy the template you need to change the red sections marked below to "mytheme" this is needed so that themes don't overlap in other words it gives the theme a unique name. Then just alter the HTML code as you see fit but notice some elements needs to be there so check the docs below on each function also remember that your custom themes needs to be located in tiny_mce's "themes" directory. If you want you may add theme specific options/settings but remember to namespace them in the following format "theme_<your theme>_<option>". +Creating you own themes for the TinyMCE application is fairly easy if you know the basics of HTML, CSS and Javascript. The most easy way is to copy the "simple" or the "advanced" template and rename it as your own name to for example "mytheme". After you copy the template you need to change the red sections marked below to "mytheme" this is needed so that themes don't overlap in other words it gives the theme a unique name. Then just alter the HTML code as you see fit but notice some elements needs to be there so check the docs below on each function also remember that your custom themes needs to be located in tiny_mce's "themes" directory. If you want you may add theme specific options/settings but remember to namespace them in the following format "theme_<your theme>_<option>".

+
+

Theme directory structure

-The example below has three functions, these are explained in greater detail below. + + + + + + + + + + + + +
File/Directory + Description +
cssTheme specific CSS files
docsTheme specific documentation
imagesTheme specific images
jscriptsTheme specific jscripts for HTML dialogs
langsTheme specific language files
editor_template.jsEditor theme template file (compressed).
editor_template_src.jsEditor theme template file (source).
somedialog.htmTheme specific dialog HTML file.
+

+
+

Theme example source

+

+The example below shows a simple empty theme and all possible callbacks.

-function TinyMCE_default_getEditorTemplate(settings) {
-   var template = new Array();
+var TinyMCE_SomeNameTheme = {
+	/**
+	 * Returns information about the theme as a name/value array.
+	 * The current keys are longname, author, authorurl, infourl and version.
+	 *
+	 * @returns Name/value array containing information about the theme.
+	 * @type Array 
+	 */
+	getInfo : function() {
+		return {
+			longname : 'Your Theme',
+			author : 'Your name',
+			authorurl : 'http://www.yoursite.com',
+			infourl : 'http://www.yoursite.com/docs/template.html',
+			version : "1.0"
+		};
+	},
 
-   template['html'] = '<Some HTML>';
-   template['delta_width'] = 0;
-   template['delta_height'] = -40;
+	/**
+	 * Gets executed when a TinyMCE editor instance is initialized.
+	 *
+	 * @param {TinyMCE_Control} Initialized TinyMCE editor control instance. 
+	 */
+	initInstance : function(inst) {
+		// You can take out theme specific parameters
+		alert("Initialization parameter:" + tinyMCE.getParam("somename_someparam", false));
 
-   return template;
-}
+		// Register custom keyboard shortcut
+		inst.addShortcut('ctrl', 't', 'lang_somename_desc', 'mceSomeCommand');
+	},
 
-function TinyMCE_default_getInsertLinkTemplate(settings) {
-   var template = new Array();
+	/**
+	 * Returns the HTML code for a specific control or empty string if this theme doesn't have that control.
+	 * A control can be a button, select list or any other HTML item to present in the TinyMCE user interface.
+	 * The variable {$editor_id} will be replaced with the current editor instance id and {$themeurl} will be replaced
+	 * with the URL of the theme. Language variables such as {$lang_somekey} will also be replaced with contents from
+	 * the language packs.
+	 *
+	 * @param {string} cn Editor control/button name to get HTML for.
+	 * @return HTML code for a specific control or empty string.
+	 * @type string
+	 */
+	getControlHTML : function(cn) {
+		switch (cn) {
+			case "SomeControl":
+				return tinyMCE.getButtonHTML(cn, 'lang_sometheme_button_desc', '{$themeurl}/images/someimage.gif', 'mceSomeCommand');
+		}
 
-   template['file'] = 'link.htm';
-   template['width'] = 320;
-   template['height'] = 130;
+		return "";
+	},
 
-   return template;
-}
+	/**
+	 * Returns the HTML code that should be inserted for a specific editor instance.
+	 * This function should return a name/value array with three items html, delta_width, delta_height.
+	 * The html item should contain the HTML code to insert as a editor instance.
+	 * The variable {$editor_id} will be replaced with the current editor instance id and {$themeurl} will be replaced
+	 * with the URL of the theme. Language variables such as {$lang_somekey} will also be replaced with contents from
+	 * the language packs. Any element with the id {$editor_id} will be replaced with the editor iframe element.
+	 * The {$width} and {$height} variables will be replaced with the editors outside dimension values.
+	 * The delta_width/height is the relative width/height in pixels to add or remove from the iframe dimensions.
+	 *
+	 * @param {Array} settings Name/Value array instance settings.
+	 * @param {string} editor_id TinMYCE editor control instance id.
+	 * @return Name/Value array of editor template data.
+	 * @type Array
+	 */
+	getEditorTemplate : function(settings, editor_id) {
+		var html = "";
 
-function TinyMCE_default_getInsertImageTemplate(settings) {
-   var template = new Array();
+		// Build toolbar and editor instance
+		html += "..";
 
-   template['file'] = 'image.htm';
-   template['width'] = 320;
-   template['height'] = 130;
+		return {
+			html : html,
+			delta_width : 0,
+			delta_height : 0
+		};
+	},
 
-   return template;
-}
+	/**
+	 * Executes a specific command, this function handles theme commands.
+	 *
+	 * @param {string} editor_id TinyMCE editor instance id that issued the command.
+	 * @param {HTMLElement} element Body or root element for the editor instance.
+	 * @param {string} command Command name to be executed.
+	 * @param {string} user_interface True/false if a user interface should be presented.
+	 * @param {mixed} value Custom value argument, can be anything.
+	 * @return true/false if the command was executed by this theme or not.
+	 * @type
+	 */
+	execCommand : function(editor_id, element, command, user_interface, value) {
+		// Handle commands
+		switch (command) {
+			// Remember to have the "mce" prefix for commands so they don't intersect with built in ones in the browser.
+			case "mceSomeCommand":
+				// Do your custom command logic here.
 
-function TinyMCE_default_handleNodeChange(editor_id, node) {
-   // Check what happend
-}
+				return true;
+		}
 
-function TinyMCE_default_execCommand(editor_id, element, command, user_interface, value) {
-   // Your custom command logic
-   return false;
-}
+		// Pass to next handler in chain
+		return false;
+	},
+
+	/**
+	 * Gets called ones the cursor/selection in a TinyMCE instance changes. This is useful to enable/disable
+	 * button controls depending on where the user are and what they have selected. This method gets executed
+	 * alot and should be as performance tuned as possible.
+	 *
+	 * @param {string} editor_id TinyMCE editor instance id that was changed.
+	 * @param {HTMLNode} node Current node location, where the cursor is in the DOM tree.
+	 * @param {int} undo_index The current undo index, if this is -1 custom undo/redo is disabled.
+	 * @param {int} undo_levels The current undo levels, if this is -1 custom undo/redo is disabled.
+	 * @param {boolean} visual_aid Is visual aids enabled/disabled ex: dotted lines on tables.
+	 * @param {boolean} any_selection Is there any selection at all or is there only a cursor.
+	 */
+	handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
+	},
+
+	/**
+	 * Gets called when a TinyMCE editor instance gets filled with content on startup.
+	 *
+	 * @param {string} editor_id TinyMCE editor instance id that was filled with content.
+	 * @param {HTMLElement} body HTML body element of editor instance.
+	 * @param {HTMLDocument} doc HTML document instance.
+	 */
+	setupContent : function(editor_id, body, doc) {
+	},
+
+	/**
+	 * Gets called when the contents of a TinyMCE area is modified, in other words when a undo level is
+	 * added.
+	 *
+	 * @param {TinyMCE_Control} inst TinyMCE editor area control instance that got modified.
+	 */
+	onChange : function(inst) {
+	},
+
+	/**
+	 * Gets called when TinyMCE handles events such as keydown, mousedown etc. TinyMCE
+	 * doesn't listen on all types of events so custom event handling may be required for
+	 * some purposes.
+	 *
+	 * @param {Event} e HTML editor event reference.
+	 * @return true - pass to next handler in chain, false - stop chain execution
+	 * @type boolean
+	 */
+	handleEvent : function(e) {
+		return true;
+	},
+
+	/**
+	 * Gets called when HTML contents is inserted or retrived from a TinyMCE editor instance.
+	 * The type parameter contains what type of event that was performed and what format the content is in.
+	 * Possible valuses for type is get_from_editor, insert_to_editor, get_from_editor_dom, insert_to_editor_dom.
+	 *
+	 * @param {string} type Cleanup event type.
+	 * @param {mixed} content Editor contents that gets inserted/extracted can be a string or DOM element.
+	 * @param {TinyMCE_Control} inst TinyMCE editor instance control that performes the cleanup.
+	 * @return New content or the input content depending on action.
+	 * @type string
+	 */
+	cleanup : function(type, content, inst) {
+		return content;
+	},
+
+	// Private theme internal methods
+
+	/**
+	 * This is just a internal theme method, prefix all internal methods with a _ character.
+	 * The prefix is needed so they doesn't collide with future TinyMCE callback functions.
+	 *
+	 * @param {string} a Some arg1.
+	 * @param {string} b Some arg2.
+	 * @return Some return.
+	 * @type string
+	 */
+	_someInternalFunction : function(a, b) {
+		return 1;
+	}
+};
+
+// Adds the theme class to the list of available TinyMCE themes
+tinyMCE.addTheme("sometheme", TinyMCE_SomeThemeTheme);
 

@@ -74,348 +240,21 @@ When creating a popup you need to include the "tiny_mce_popup.js" this
 <html>
 <head>
-<title>{$lang_plugin_sample_title}</title>
+<title>{$lang_theme_sample_title}</title>
 <script language="javascript" src="../../tiny_mce_popup.js"></script>
 <script language="javascript">
      // getWindowArg returns any arguments passed to the window
      alert(tinyMCE.getWindowArg('some_arg'));
 </script>
 <body>
-     <strong>{$lang_plugin_sample_desc}</strong>
+     <strong>{$lang_theme_sample_desc}</strong>
 </body>
 
-
-

The TinyMCE_<theme>_getEditorTemplate(settings) function

-

-This function is responsible for the layout of the editor instance within the page it should return a name/value based array with some specific names. These are explained below, notice names included in [] characters are optional. The settings parameter to this function is a name/value array containing tinyMCE:s settings/options. -

-

- - - - - - - - - - - - - - - - - - - - -
Template data
htmlHTML template data, this value should contain all the HTML code needed to render the editor. Notice: {$<variable>} are replaces with values when used. More about these specific values later on.
[delta_width]Delta width, this value should contain the relative width needed by the UI. For example if a toolbar takes 20 pixels this value should be -20. This is so the editor gets the same size as the element that are replaced.
[delta_height]Delta height, this value should contain the relative width needed by the UI. For example if a toolbar takes 40 pixels this value should be -40. This is so the editor gets the same size as the element that are replaced.
-

-

-Variables within the "html" value above are replaced with internal TinyMCE values. There are two types of variables one is the ones starting with the "lang_" prefix, these are replaced with the matching names in the language packs. So for example <b>{$lang_test}</b> gets replaces with the "tinyMCELang['lang_test']" variable and the output is then <b>Test</b>. The other variables are passed expicilty for the template used and these are listed below. Notice: Variables within [] characters are optional. -

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Variables
editor_idThis is the editor instance id and it should be placed in ID attribute of the IFRAME element that must be included in the template.
[default_document]This will be replaced with a blank html page, this is added for MSIE security issues and should be placed in the SRC attribute of the IFRAME within the template.
[area_width]Width of IFRAME area in pixels.
[area_height]Height of IFRAME area in pixels.
[width]Width of the whole editor area in pixels.
[height]Height of the whole editor area in pixels.
[themeurl]URL to theme location.
-

-

-Notice: There are two javascript function that can be called from this template these are tinyMCE.execCommand that executes commans on the currenly selected editor area and the tinyMCE.switchClass that switches the CSS class of the element specified. For more details of commands available by execCommand check the Mozilla midas specification and the TinyMCE specific commands. -

-
-

The TinyMCE_<theme>_getInsertLinkTemplate(settings) function

-

-This function is responsible for the layout of the insert link popup window and it should return a name/value based array with some specific names. These are explained below, notice names included in [] characters are optional. The settings parameter to this function is a name/value array containing tinyMCE:s settings/options. -

-

- - - - - - - - - - - - - - - - - - - - - - - - -
Template data
htmlHTML template data, this value should contain all the HTML code needed to render the link dialog. Notice: {$<variable>} are replaces with values when used. More about these specific values later on. This parameter is not needed if the "file" param is assigned.
fileName of external template file to use, this may even be logic pages like .php,.asp,.jsp etc.
[width]Width of popup window in pixels. Default is 320.
[height]Height of popup window in pixels. Default is 200.
-

-

-Variables within the "html" value above are replaced with internal TinyMCE values. There are two types of variables one is the ones starting with the "lang_" prefix, these are replaced with the matching names in the language packs. So for example <b>{$lang_test}</b> gets replaces with the "tinyMCELang['lang_test']" variable and the output is then <b>Test</b>. The other variables are passed expicilty for the template used and these are listed below. Notice: Variables within [] characters are optional. -

-

- - - - - - - - - - - - - - - - - - - - -
Variables/Window arguments:
[href]This variable gets replaced with the "href" attribute value of the selected link if one is selected.
[target]This variable gets replaced with the "target" attribute value of the selected link if one is selected.
[css]Theme popup css location.
-

-

-Notice: There are a javascript function that can be called from this template "window.opener.tinyMCE.insertLink(href, target)" this inserts the link into the currently selected editor and should be called when for example a insert button is pressed. -

-
-

The TinyMCE_<theme>_getInsertImageTemplate(settings) function

-

-This function is responsible for the layout of the insert image dialog, it should return a name/value based array with some specific names. These are explained below, notice names included in [] characters are optional. The settings parameter to this function is a name/value array containing tinyMCE:s settings/options. -

-

- - - - - - - - - - - - - - - - - - - - -
Template data
htmlHTML template data, this value should contain all the HTML code needed to render the image dialog. Notice: {$<variable>} are replaces with values when used. More about these specific values later on. This parameter is not needed if the "file" param is assigned.
[width]Width of popup window in pixels. Default is 320.
[height]Height of popup window in pixels. Default is 200.
-

-

-Variables within the "html" value above are replaced with internal TinyMCE values. There are two types of variables one is the ones starting with the "lang_" prefix, these are replaced with the matchin names in the language packs. So for example <b>{$lang_test}</b> gets replaces with the "tinyMCELang['lang_test']" variable and the output is then <b>Test</b>. The other variables are passed expicilty for the template used and these are listed below. Notice: Variables within [] characters are optional. -

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Variables/Window arguments
[src]This variable gets replaced with the "src" attribute value of the selected link if one is selected.
[alt]This variable gets replaced with the "alt" attribute value of the selected link if one is selected.
[border]This variable gets replaced with the "border" attribute value of the selected link if one is selected.
[hspace]This variable gets replaced with the "hspace" attribute value of the selected link if one is selected.
[vspace]This variable gets replaced with the "vspace" attribute value of the selected link if one is selected.
[width]This variable gets replaced with the "width" attribute value of the selected link if one is selected.
[height]This variable gets replaced with the "height" attribute value of the selected link if one is selected.
[align]This variable gets replaced with the "align" attribute value of the selected link if one is selected.
[css]Theme popup css location.
-

-

-Notice: There are a javascript function that can be called from this template "window.opener.tinyMCE.insertImage(src, alt, border, hspace, vspace, width, height, align)" this inserts the image into the currently selected editor and should be called when for example a insert button is pressed. -

- -
- -

The TinyMCE_<theme>_handleNodeChange function (Optional)

-

-This function is called when the cursor/selection of a editor instance changes. Then the currenly selected/focused node is passed to this function. This can be useful when you want to change the UI depending on what the user has selected. -

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Parameters
editor_idUnique editor id, this is the same as the $editor_id variable in getEditorTemplate.
nodeReference to the Node element where the cursor is currenly located.
undo_indexCurrent undo index, this value is -1 if the custom undo/redo support is disabled.
undo_levelsCurrent number of undo levels, this value is -1 if the custom undo/redo support is disabled.
visual_aidTrue/false state of visual aid/guidelines mode.
any_selectionIs any text or image selected.
-

- -
- -

The TinyMCE_<theme>_execCommand function (Optional)

-

-This function is called when a command is executed for example "bold" or "createlink" this callback/theme function may then intercept theme specific commands and do custom logic. If this command returns true the command handling is terminated and the default tinyMCE command handeling never gets executed. -

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Parameters
editor_idUnique editor id, this is the same as the $editor_id variable in getEditorTemplate.
elementReference to the document DOM root element of the editor instance.
commandCommand that is to be executed for example "myCommand".
user_interfacetrue/false option if a user insterace is to be used or not.
valueCustom data value passed with command, may be any data type.
-

-

-Returns:
-true - Command intercepted and handled do not continue with command handling.
-false - Continue with execCommand handling, bubble.
-

- -
- -

The TinyMCE_<theme>_getControlHTML(control_name) function (Optional)

-

-This function is called when a editor needs to render a specific control/button. This function should return the HTML template of that control or a empty string if the control_name wasn't recognized. Notice the variable {$pluginurl} gets replaced with the URL prefix for the current plugin directory. -

-

- - - - - - - - - - - - -
Parameters
control_nameControl name to match against.
-

-

-Returns: return the HTML template of that control or a empty string if the control_name wasn't recognized. -

- - diff --git a/www/extras/tinymce2/docs/faq.html b/www/extras/tinymce2/docs/faq.html index 74dfc5227..7fc38afa3 100644 --- a/www/extras/tinymce2/docs/faq.html +++ b/www/extras/tinymce2/docs/faq.html @@ -12,9 +12,27 @@

Here are some common answers to common questions. If you need more help you can always visit the TinyMCE Forum on the TinyMCE web site.

+

+

+

+

TinyMCE is broken, what should I do?

There are a few things you should check before posting questions about your problem at the forum or sourceforge.

@@ -32,6 +50,63 @@
+ +

Why is my paths incorrect, I want absolute/relative URLs?

+
+

+ These are the diffrent configuration scenarios for URLs within TinyMCE: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OutputConfigDescription
http://www.site.com/path1/path2/file.htm will be converted to path2/file.htm +relative_urls : true,
+document_base_url : "http://www.site.com/path1/"
+
This will convert all URLs within the same domain to relative URLs.
The URLs will be relative from the document_base_url.
path2/file.htm will be converted to /path1/path2/file.htm +relative_urls : false,
+remove_script_host : true,
+document_base_url : "http://www.site.com/path1/"
+
This will convert all relative URLs to absolute URLs.
The URLs will be absolute based on the document_base_url.
path2/file.htm will be converted to http://www.site.com/path1/path2/file.htm +relative_urls : false,
+remove_script_host : false,
+document_base_url : "http://www.site.com/path1/"
+
This will convert all relative URLs to absolute URLs.
The URLs will be absolute based on the document_base_url.
path2/file.htm or http://www.site.com/path1/path2/file.htm will not be converted at all. +convert_urls : false
+
This option will preserve the URLs as they are in a separate attribute while editing, since browsers tend to auto convert URLs.
+

+
+ +
+ +

Why does TinyMCE strip aways attributes or tags from my source?

You need to check out the "valid_elements" and "extended_valid_elements" option in the configuration. By default, TinyMCE only allows certain tags and attributes. TinyMCE also tries to follow the XHTML specification as much as possible (and so should you), this can cause some unexpected source changes, there are however configuration options to battle this issue, study the configuration options in details.

@@ -39,6 +114,7 @@
+

How do I change the default font size/face color of the editor?

@@ -48,6 +124,7 @@

+

How do I remove/add buttons/controls to TinyMCE?

@@ -57,15 +134,7 @@

-

TinyMCE changes the path of my images, why?

-
-

- Different browsers handles images differently, TinyMCE tries to compensate for this and has its own convert URL functions. You can control the behavior through the configuration, check out the URL section in the configuration options. -

-
- -
- +

Why does my HTML output include lots of \" like <a href=\"mylink.htm\">link</a>?

This is probably because you are using PHP and it has a feature that's called magic quotes that is enabled by default. You can read more about this at the PHP website or use the stripslashes function.

@@ -73,6 +142,7 @@
+

TinyMCE takes ages to load, is there a way to make it load quicker?

@@ -82,13 +152,7 @@

-

Can I use TinyMCE in my commercial application?

-
-

Yes you can, the LGPL license is a Free Software License. You can read the whole license here or visit Free Software Foundation web site here

-
- -
- +

TinyMCE stops working when placed in tabs or hidden divs?

Since Gecko based browsers Mozilla/Firefox has a bug where it looses designMode on iframes that are hidden a special option is needed that re-enables the design mode when reappearing after being hidden. Enable this option to resolve the issue: "auto_reset_designmode".

@@ -96,18 +160,28 @@
+ +

Can I use TinyMCE in my commercial application?

+
+

Yes you can, the LGPL license is a Free Software License. You can read the whole license here or visit Free Software Foundation web site here

+
+ +
+ +

Are there any restrictions to using TinyMCE in my commercial application?

Yes, all copyright notices must be intact. Moxiecode Systems are still the copyright holders of the source code, so you can not use the code for other applications. Any modifications or add-ons you make to the source has to be contributes back to the TinyMCE community.

- If you start to make a lot of revenue from using TinyMCE, please remember the time and dedication that has been put into this by other developers, respect this and give credit to those who deserve it. We also accept donations. + If you start to make a lot of revenue from using TinyMCE, please remember the time and dedication that has been put into this by other developers, respect this and give credit to those who deserve it.

+

I don't like LGPL, is there a commercial license available for me?

@@ -117,6 +191,7 @@

+

Do you provide support?

@@ -126,6 +201,7 @@

+

Who made this software?

@@ -136,7 +212,7 @@

diff --git a/www/extras/tinymce2/docs/index.html b/www/extras/tinymce2/docs/index.html index cccfb0741..b580c2cee 100644 --- a/www/extras/tinymce2/docs/index.html +++ b/www/extras/tinymce2/docs/index.html @@ -36,7 +36,7 @@ diff --git a/www/extras/tinymce2/docs/installation_example_00.html b/www/extras/tinymce2/docs/installation_example_00.html index 2130f8d74..735f069c7 100644 --- a/www/extras/tinymce2/docs/installation_example_00.html +++ b/www/extras/tinymce2/docs/installation_example_00.html @@ -27,7 +27,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/installation_example_01.html b/www/extras/tinymce2/docs/installation_example_01.html index 98162c255..7053db225 100644 --- a/www/extras/tinymce2/docs/installation_example_01.html +++ b/www/extras/tinymce2/docs/installation_example_01.html @@ -28,7 +28,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/installation_example_02.html b/www/extras/tinymce2/docs/installation_example_02.html index 86f98a300..539210e20 100644 --- a/www/extras/tinymce2/docs/installation_example_02.html +++ b/www/extras/tinymce2/docs/installation_example_02.html @@ -44,7 +44,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/installation_example_03.html b/www/extras/tinymce2/docs/installation_example_03.html index 6848b8c78..e5a084228 100644 --- a/www/extras/tinymce2/docs/installation_example_03.html +++ b/www/extras/tinymce2/docs/installation_example_03.html @@ -35,7 +35,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/installing.html b/www/extras/tinymce2/docs/installing.html index 40749c1bb..bb25514ea 100644 --- a/www/extras/tinymce2/docs/installing.html +++ b/www/extras/tinymce2/docs/installing.html @@ -113,7 +113,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/license.html b/www/extras/tinymce2/docs/license.html index c0c9c9ad5..e94ae2a42 100644 --- a/www/extras/tinymce2/docs/license.html +++ b/www/extras/tinymce2/docs/license.html @@ -457,7 +457,7 @@ DAMAGES. diff --git a/www/extras/tinymce2/docs/option_accessibility_warnings.html b/www/extras/tinymce2/docs/option_accessibility_warnings.html index be4852761..fd897ecdd 100644 --- a/www/extras/tinymce2/docs/option_accessibility_warnings.html +++ b/www/extras/tinymce2/docs/option_accessibility_warnings.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_add_form_submit_trigger.html b/www/extras/tinymce2/docs/option_add_form_submit_trigger.html index d62dc98d1..e29e7025f 100644 --- a/www/extras/tinymce2/docs/option_add_form_submit_trigger.html +++ b/www/extras/tinymce2/docs/option_add_form_submit_trigger.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_add_unload_trigger.html b/www/extras/tinymce2/docs/option_add_unload_trigger.html index e43aacf86..100d901b4 100644 --- a/www/extras/tinymce2/docs/option_add_unload_trigger.html +++ b/www/extras/tinymce2/docs/option_add_unload_trigger.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_apply_source_formatting.html b/www/extras/tinymce2/docs/option_apply_source_formatting.html index 06f3288bc..dfbce21a6 100644 --- a/www/extras/tinymce2/docs/option_apply_source_formatting.html +++ b/www/extras/tinymce2/docs/option_apply_source_formatting.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_ask.html b/www/extras/tinymce2/docs/option_ask.html index 42279e1bd..290a681d5 100644 --- a/www/extras/tinymce2/docs/option_ask.html +++ b/www/extras/tinymce2/docs/option_ask.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_auto_focus.html b/www/extras/tinymce2/docs/option_auto_focus.html index e271d6e66..2150e9187 100644 --- a/www/extras/tinymce2/docs/option_auto_focus.html +++ b/www/extras/tinymce2/docs/option_auto_focus.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_auto_reset_designmode.html b/www/extras/tinymce2/docs/option_auto_reset_designmode.html index 9b00849e7..487d2188b 100644 --- a/www/extras/tinymce2/docs/option_auto_reset_designmode.html +++ b/www/extras/tinymce2/docs/option_auto_reset_designmode.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_auto_resize.html b/www/extras/tinymce2/docs/option_auto_resize.html index f28adbb43..3e3746b25 100644 --- a/www/extras/tinymce2/docs/option_auto_resize.html +++ b/www/extras/tinymce2/docs/option_auto_resize.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_browsers.html b/www/extras/tinymce2/docs/option_browsers.html index a1b378b69..a2a6d81bd 100644 --- a/www/extras/tinymce2/docs/option_browsers.html +++ b/www/extras/tinymce2/docs/option_browsers.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_button_tile_map.html b/www/extras/tinymce2/docs/option_button_tile_map.html index 7c2ba5c1a..abe07539b 100644 --- a/www/extras/tinymce2/docs/option_button_tile_map.html +++ b/www/extras/tinymce2/docs/option_button_tile_map.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_cleanup.html b/www/extras/tinymce2/docs/option_cleanup.html index 7644adaff..bd7882aee 100644 --- a/www/extras/tinymce2/docs/option_cleanup.html +++ b/www/extras/tinymce2/docs/option_cleanup.html @@ -12,7 +12,7 @@

- This option enables you to turn on/off the build in cleanup functionality. TinyMCE is equipped with powerful cleanup functionality that enables you to specify what elements and attributes are allowed and how HTML contents should be generated. This option is set to true by default, but if you want to disable it you may set it to false. Notice: It's not recommended to disable this feature. + This option enables you to turn on/off the built in cleanup functionality. TinyMCE is equipped with powerful cleanup functionality that enables you to specify what elements and attributes are allowed and how HTML contents should be generated. This option is set to true by default, but if you want to disable it you may set it to false. Notice: It's not recommended to disable this feature.

@@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_cleanup_callback.html b/www/extras/tinymce2/docs/option_cleanup_callback.html index 72bd4f66e..a8083f264 100644 --- a/www/extras/tinymce2/docs/option_cleanup_callback.html +++ b/www/extras/tinymce2/docs/option_cleanup_callback.html @@ -64,7 +64,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_cleanup_on_startup.html b/www/extras/tinymce2/docs/option_cleanup_on_startup.html index 0e5369c6b..509f79c1b 100644 --- a/www/extras/tinymce2/docs/option_cleanup_on_startup.html +++ b/www/extras/tinymce2/docs/option_cleanup_on_startup.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_content_css.html b/www/extras/tinymce2/docs/option_content_css.html index 39f407f59..f278538da 100644 --- a/www/extras/tinymce2/docs/option_content_css.html +++ b/www/extras/tinymce2/docs/option_content_css.html @@ -12,7 +12,7 @@

- This option enables you to specify a custom CSS file that extends the theme content CSS. This CSS file is the one used within the editor (the editable area). The default location of this CSS file is within the current theme. + This option enables you to specify a custom CSS file that extends the theme content CSS. This CSS file is the one used within the editor (the editable area). The default location of this CSS file is within the current theme. This option can also be a comma separated list of URLs.

@@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_convert_fonts_to_spans.html b/www/extras/tinymce2/docs/option_convert_fonts_to_spans.html index c87436fe8..7f127c9f6 100644 --- a/www/extras/tinymce2/docs/option_convert_fonts_to_spans.html +++ b/www/extras/tinymce2/docs/option_convert_fonts_to_spans.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_convert_newlines_to_brs.html b/www/extras/tinymce2/docs/option_convert_newlines_to_brs.html index 211636474..c1f10507f 100644 --- a/www/extras/tinymce2/docs/option_convert_newlines_to_brs.html +++ b/www/extras/tinymce2/docs/option_convert_newlines_to_brs.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_convert_urls.html b/www/extras/tinymce2/docs/option_convert_urls.html index 71585aad9..7c2d25dea 100644 --- a/www/extras/tinymce2/docs/option_convert_urls.html +++ b/www/extras/tinymce2/docs/option_convert_urls.html @@ -11,7 +11,7 @@
-

This option enables you to control if TinyMCE is to be clever and restore urls to their original values. URLs are auto converted/messed up by default since the build in browser logic works this way, there is no way to get the real URL unless you store it away. If you set this option to false it will try to keep these URLs intact. This option is set to true by default that means URLs will be forced absolute or relative depending on the state of relative_urls.

+

This option enables you to control if TinyMCE is to be clever and restore urls to their original values. URLs are auto converted/messed up by default since the built in browser logic works this way, there is no way to get the real URL unless you store it away. If you set this option to false it will try to keep these URLs intact. This option is set to true by default that means URLs will be forced absolute or relative depending on the state of relative_urls.

@@ -28,7 +28,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_custom_undo_redo.html b/www/extras/tinymce2/docs/option_custom_undo_redo.html index fb6cc106b..3b19c73e4 100644 --- a/www/extras/tinymce2/docs/option_custom_undo_redo.html +++ b/www/extras/tinymce2/docs/option_custom_undo_redo.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_custom_undo_redo_keyboard_shortcuts.html b/www/extras/tinymce2/docs/option_custom_undo_redo_keyboard_shortcuts.html index 9f2046ce3..6e3f549df 100644 --- a/www/extras/tinymce2/docs/option_custom_undo_redo_keyboard_shortcuts.html +++ b/www/extras/tinymce2/docs/option_custom_undo_redo_keyboard_shortcuts.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_custom_undo_redo_levels.html b/www/extras/tinymce2/docs/option_custom_undo_redo_levels.html index 1cc2a4fe8..8df786073 100644 --- a/www/extras/tinymce2/docs/option_custom_undo_redo_levels.html +++ b/www/extras/tinymce2/docs/option_custom_undo_redo_levels.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_debug.html b/www/extras/tinymce2/docs/option_debug.html index 03ae1ea76..8c329d2b9 100644 --- a/www/extras/tinymce2/docs/option_debug.html +++ b/www/extras/tinymce2/docs/option_debug.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_dialog_type.html b/www/extras/tinymce2/docs/option_dialog_type.html index 94f6acc1f..096c00757 100644 --- a/www/extras/tinymce2/docs/option_dialog_type.html +++ b/www/extras/tinymce2/docs/option_dialog_type.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_directionality.html b/www/extras/tinymce2/docs/option_directionality.html index 285e1d32a..3518ecbd5 100644 --- a/www/extras/tinymce2/docs/option_directionality.html +++ b/www/extras/tinymce2/docs/option_directionality.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_docs_language.html b/www/extras/tinymce2/docs/option_docs_language.html index 68fd83d0f..d4d26c95d 100644 --- a/www/extras/tinymce2/docs/option_docs_language.html +++ b/www/extras/tinymce2/docs/option_docs_language.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_doctype.html b/www/extras/tinymce2/docs/option_doctype.html index ae2b82dab..74f09d974 100644 --- a/www/extras/tinymce2/docs/option_doctype.html +++ b/www/extras/tinymce2/docs/option_doctype.html @@ -27,7 +27,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_document_base_url.html b/www/extras/tinymce2/docs/option_document_base_url.html index c108a3653..c2bcd2b03 100644 --- a/www/extras/tinymce2/docs/option_document_base_url.html +++ b/www/extras/tinymce2/docs/option_document_base_url.html @@ -28,7 +28,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_editor_css.html b/www/extras/tinymce2/docs/option_editor_css.html index 6579f4f3b..67fcb485a 100644 --- a/www/extras/tinymce2/docs/option_editor_css.html +++ b/www/extras/tinymce2/docs/option_editor_css.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_editor_deselector.html b/www/extras/tinymce2/docs/option_editor_deselector.html index 5e4a6e8f6..254657eae 100644 --- a/www/extras/tinymce2/docs/option_editor_deselector.html +++ b/www/extras/tinymce2/docs/option_editor_deselector.html @@ -41,7 +41,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_editor_selector.html b/www/extras/tinymce2/docs/option_editor_selector.html index f1db1228a..5b430148b 100644 --- a/www/extras/tinymce2/docs/option_editor_selector.html +++ b/www/extras/tinymce2/docs/option_editor_selector.html @@ -41,7 +41,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_elements.html b/www/extras/tinymce2/docs/option_elements.html index 3126cedae..088673f31 100644 --- a/www/extras/tinymce2/docs/option_elements.html +++ b/www/extras/tinymce2/docs/option_elements.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_encoding.html b/www/extras/tinymce2/docs/option_encoding.html index 0755b176c..82d33fde1 100644 --- a/www/extras/tinymce2/docs/option_encoding.html +++ b/www/extras/tinymce2/docs/option_encoding.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_entities.html b/www/extras/tinymce2/docs/option_entities.html index a0a075020..bdcdbb8a0 100644 --- a/www/extras/tinymce2/docs/option_entities.html +++ b/www/extras/tinymce2/docs/option_entities.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_entity_encoding.html b/www/extras/tinymce2/docs/option_entity_encoding.html index 9a267239d..a28dc774c 100644 --- a/www/extras/tinymce2/docs/option_entity_encoding.html +++ b/www/extras/tinymce2/docs/option_entity_encoding.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_event_elements.html b/www/extras/tinymce2/docs/option_event_elements.html index 468977bfd..987434b86 100644 --- a/www/extras/tinymce2/docs/option_event_elements.html +++ b/www/extras/tinymce2/docs/option_event_elements.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_extended_valid_elements.html b/www/extras/tinymce2/docs/option_extended_valid_elements.html index 9c7d31df4..93f0561e8 100644 --- a/www/extras/tinymce2/docs/option_extended_valid_elements.html +++ b/www/extras/tinymce2/docs/option_extended_valid_elements.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_external_image_list_url.html b/www/extras/tinymce2/docs/option_external_image_list_url.html index c867d7ab7..52c35a252 100644 --- a/www/extras/tinymce2/docs/option_external_image_list_url.html +++ b/www/extras/tinymce2/docs/option_external_image_list_url.html @@ -43,7 +43,7 @@ var tinyMCEImageList = new Array( diff --git a/www/extras/tinymce2/docs/option_external_link_list_url.html b/www/extras/tinymce2/docs/option_external_link_list_url.html index 8cf80c888..15ee47050 100644 --- a/www/extras/tinymce2/docs/option_external_link_list_url.html +++ b/www/extras/tinymce2/docs/option_external_link_list_url.html @@ -44,7 +44,7 @@ var tinyMCELinkList = new Array( diff --git a/www/extras/tinymce2/docs/option_file_browser_callback.html b/www/extras/tinymce2/docs/option_file_browser_callback.html index 91e4a44cc..65d36c2ca 100644 --- a/www/extras/tinymce2/docs/option_file_browser_callback.html +++ b/www/extras/tinymce2/docs/option_file_browser_callback.html @@ -35,7 +35,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_fix_content_duplication.html b/www/extras/tinymce2/docs/option_fix_content_duplication.html index 6cdee840d..5d70ab175 100644 --- a/www/extras/tinymce2/docs/option_fix_content_duplication.html +++ b/www/extras/tinymce2/docs/option_fix_content_duplication.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_focus_alert.html b/www/extras/tinymce2/docs/option_focus_alert.html index 21e89ff39..d77058f9a 100644 --- a/www/extras/tinymce2/docs/option_focus_alert.html +++ b/www/extras/tinymce2/docs/option_focus_alert.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_font_size_classes.html b/www/extras/tinymce2/docs/option_font_size_classes.html index b2b95c8e9..51131345c 100644 --- a/www/extras/tinymce2/docs/option_font_size_classes.html +++ b/www/extras/tinymce2/docs/option_font_size_classes.html @@ -27,7 +27,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_font_size_style_values.html b/www/extras/tinymce2/docs/option_font_size_style_values.html index 8de865f1c..26a195c11 100644 --- a/www/extras/tinymce2/docs/option_font_size_style_values.html +++ b/www/extras/tinymce2/docs/option_font_size_style_values.html @@ -27,7 +27,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_force_br_newlines.html b/www/extras/tinymce2/docs/option_force_br_newlines.html index dac8a9929..8bc90a9d6 100644 --- a/www/extras/tinymce2/docs/option_force_br_newlines.html +++ b/www/extras/tinymce2/docs/option_force_br_newlines.html @@ -12,7 +12,7 @@

- If you set this option to true, TinyMCE will force BR elements on newlines instead of inserting paragraphs. This option is set to false by default since paragraphs is a much better concept. You can style P elements to be one row by adding p { margin: 0px; padding: 0px; } to your CSS, P tags where invented for a reason and should be used. BR elements should only be used when you really have to (mostly never). + If you set this option to true, TinyMCE will force BR elements on newlines instead of inserting paragraphs. This option is set to false by default since paragraphs is a much better concept. You can style P elements to be one row by adding p { margin: 0; padding: 0; } to your CSS, P tags where invented for a reason and should be used. BR elements should only be used when you really have to (mostly never).

@@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_force_hex_style_colors.html b/www/extras/tinymce2/docs/option_force_hex_style_colors.html index f55ed972d..7d1888927 100644 --- a/www/extras/tinymce2/docs/option_force_hex_style_colors.html +++ b/www/extras/tinymce2/docs/option_force_hex_style_colors.html @@ -27,7 +27,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_force_p_newlines.html b/www/extras/tinymce2/docs/option_force_p_newlines.html index 347b144d0..16f108d15 100644 --- a/www/extras/tinymce2/docs/option_force_p_newlines.html +++ b/www/extras/tinymce2/docs/option_force_p_newlines.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_height.html b/www/extras/tinymce2/docs/option_height.html index 7daf75db4..1f0819be9 100644 --- a/www/extras/tinymce2/docs/option_height.html +++ b/www/extras/tinymce2/docs/option_height.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_init_instance_callback.html b/www/extras/tinymce2/docs/option_init_instance_callback.html index 0c6ee2342..739e94634 100644 --- a/www/extras/tinymce2/docs/option_init_instance_callback.html +++ b/www/extras/tinymce2/docs/option_init_instance_callback.html @@ -34,7 +34,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_inline_styles.html b/www/extras/tinymce2/docs/option_inline_styles.html index 1dcc1b200..8e89164a9 100644 --- a/www/extras/tinymce2/docs/option_inline_styles.html +++ b/www/extras/tinymce2/docs/option_inline_styles.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_insertimage_callback.html b/www/extras/tinymce2/docs/option_insertimage_callback.html index cb55d9997..f27a2fd03 100644 --- a/www/extras/tinymce2/docs/option_insertimage_callback.html +++ b/www/extras/tinymce2/docs/option_insertimage_callback.html @@ -7,12 +7,15 @@
-

Option: insertimage_callback

+

(deprecated) Option: insertimage_callback

- This option enables you to override the build in functionality for inserting images. This option should contain a function name to be executed when a new image is inserted into TinyMCE. The format of this callback function is: insertImage(src, alt, border, hspace, vspace, width, height, align, title, onmouseover, onmouseout, action). Where most of these options are self explained the action can be "update" or "insert" depending on what operation type. This function should return an array with the same values as the incomming parameters, the example below describes how this is done. This option is set to a internal TinyMCE function by default. + This callback was removed in 2.0.3, use execcommand_callback instead this also enables you to override other things than the image and link dialogs. +

+

+ This option enables you to override the built in functionality for inserting images. This option should contain a function name to be executed when a new image is inserted into TinyMCE. The format of this callback function is: insertImage(src, alt, border, hspace, vspace, width, height, align, title, onmouseover, onmouseout, action). Where most of these options are self explained the action can be "update" or "insert" depending on what operation type. This function should return an array with the same values as the incomming parameters, the example below describes how this is done. This option is set to a internal TinyMCE function by default.

@@ -49,7 +52,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_insertlink_callback.html b/www/extras/tinymce2/docs/option_insertlink_callback.html index 2d67c4923..2aaf77a55 100644 --- a/www/extras/tinymce2/docs/option_insertlink_callback.html +++ b/www/extras/tinymce2/docs/option_insertlink_callback.html @@ -7,12 +7,15 @@
-

Option: insertlink_callback

+

(deprecated) Option: insertlink_callback

- This option enables you to override the build in functionality for inserting links. This option should contain a function name to be executed when a new link is inserted into TinyMCE. The format of this callback function is: insertLink(href, target, title, onclick, action). Where most of these options are self explained the action can be "update" or "insert" depending on what operation type. This function should return an array with the same values as the incomming parameters, the example below describes how this is done. This option is set to a internal TinyMCE function by default. + This callback was removed in 2.0.3, use execcommand_callback instead this also enables you to override other things than the image and link dialogs. +

+

+ This option enables you to override the built in functionality for inserting links. This option should contain a function name to be executed when a new link is inserted into TinyMCE. The format of this callback function is: insertLink(href, target, title, onclick, action). Where most of these options are self explained the action can be "update" or "insert" depending on what operation type. This function should return an array with the same values as the incomming parameters, the example below describes how this is done. This option is set to a internal TinyMCE function by default.

@@ -42,7 +45,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_invalid_elements.html b/www/extras/tinymce2/docs/option_invalid_elements.html index f313e7f47..0d4f38e6c 100644 --- a/www/extras/tinymce2/docs/option_invalid_elements.html +++ b/www/extras/tinymce2/docs/option_invalid_elements.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_language.html b/www/extras/tinymce2/docs/option_language.html index daf35dd4e..c75cf99bb 100644 --- a/www/extras/tinymce2/docs/option_language.html +++ b/www/extras/tinymce2/docs/option_language.html @@ -34,7 +34,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_merge_styles_invalid_parents.html b/www/extras/tinymce2/docs/option_merge_styles_invalid_parents.html index 7deffee43..254366ec1 100644 --- a/www/extras/tinymce2/docs/option_merge_styles_invalid_parents.html +++ b/www/extras/tinymce2/docs/option_merge_styles_invalid_parents.html @@ -29,7 +29,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_mode.html b/www/extras/tinymce2/docs/option_mode.html index c613d9d01..28b89a876 100644 --- a/www/extras/tinymce2/docs/option_mode.html +++ b/www/extras/tinymce2/docs/option_mode.html @@ -46,7 +46,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_nowrap.html b/www/extras/tinymce2/docs/option_nowrap.html index 3d533211e..73705f374 100644 --- a/www/extras/tinymce2/docs/option_nowrap.html +++ b/www/extras/tinymce2/docs/option_nowrap.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_object_resizing.html b/www/extras/tinymce2/docs/option_object_resizing.html index 48d7069c1..90f750e79 100644 --- a/www/extras/tinymce2/docs/option_object_resizing.html +++ b/www/extras/tinymce2/docs/option_object_resizing.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_onchange_callback.html b/www/extras/tinymce2/docs/option_onchange_callback.html index d7d83c655..05cffb149 100644 --- a/www/extras/tinymce2/docs/option_onchange_callback.html +++ b/www/extras/tinymce2/docs/option_onchange_callback.html @@ -35,7 +35,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_oninit.html b/www/extras/tinymce2/docs/option_oninit.html index 755dbd6f7..8a9511a4f 100644 --- a/www/extras/tinymce2/docs/option_oninit.html +++ b/www/extras/tinymce2/docs/option_oninit.html @@ -34,7 +34,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_plugins.html b/www/extras/tinymce2/docs/option_plugins.html index 4169c5fb3..1e3c7e260 100644 --- a/www/extras/tinymce2/docs/option_plugins.html +++ b/www/extras/tinymce2/docs/option_plugins.html @@ -14,6 +14,9 @@

This option should contain a comma separated list of plugins. Plugins are loaded from the "tinymce/jscripts/tiny_mce/plugins" directory and the plugin name matches the name of the directory. TinyMCE is shipped with some core plugins these are described in greater detail in the Plugins reference.

+

+ TinyMCE also supports the ability to have plugins added from a external resource, these plugins needs to be self registrering and loaded after the tinyMCE.init call. You should also prefix these plugins with a "-" character so that TinyMCE doesn't try to load it from the TinyMCE plugins directory. +

There are many third party plugins for TinyMCE some of these may be found under "Plugins" at SourceForge and if you have developed one of your own please contribute it to this project by uploading it to SourceForge. @@ -26,7 +29,7 @@

 tinyMCE.init({
 	...
-	plugins : "table,contextmenu,paste"
+	plugins : "table,contextmenu,paste,-externalplugin"
 });
 
@@ -34,7 +37,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_popups_css.html b/www/extras/tinymce2/docs/option_popups_css.html index 9e3f5789f..ce1df5099 100644 --- a/www/extras/tinymce2/docs/option_popups_css.html +++ b/www/extras/tinymce2/docs/option_popups_css.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_preformatted.html b/www/extras/tinymce2/docs/option_preformatted.html index e0cd3aa72..177901cfa 100644 --- a/www/extras/tinymce2/docs/option_preformatted.html +++ b/www/extras/tinymce2/docs/option_preformatted.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_relative_urls.html b/www/extras/tinymce2/docs/option_relative_urls.html index a4aa7db22..0e127d4fb 100644 --- a/www/extras/tinymce2/docs/option_relative_urls.html +++ b/www/extras/tinymce2/docs/option_relative_urls.html @@ -28,7 +28,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_remove_linebreaks.html b/www/extras/tinymce2/docs/option_remove_linebreaks.html index 065a9e713..cfcda016d 100644 --- a/www/extras/tinymce2/docs/option_remove_linebreaks.html +++ b/www/extras/tinymce2/docs/option_remove_linebreaks.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_remove_script_host.html b/www/extras/tinymce2/docs/option_remove_script_host.html index 3e2201400..880cd607b 100644 --- a/www/extras/tinymce2/docs/option_remove_script_host.html +++ b/www/extras/tinymce2/docs/option_remove_script_host.html @@ -29,7 +29,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_save_callback.html b/www/extras/tinymce2/docs/option_save_callback.html index 391e9731c..12229aaf0 100644 --- a/www/extras/tinymce2/docs/option_save_callback.html +++ b/www/extras/tinymce2/docs/option_save_callback.html @@ -12,7 +12,7 @@

- This option enables you to add custom logic to be executed when the contents is extracted/saved. This custom logic can then modify the contents before it's submited to a serverside page. This can be useful if you want to do your own regexp cleanups and so forth. The format of this function is: saveContent(element_id, html, body). Where element id is the form element/div id of the editor and HTML is the HTML contents after the build in cleanup process has executed. This function should return the new HTML contents. + This option enables you to add custom logic to be executed when the contents is extracted/saved. This custom logic can then modify the contents before it's submited to a serverside page. This can be useful if you want to do your own regexp cleanups and so forth. The format of this function is: saveContent(element_id, html, body). Where element id is the form element/div id of the editor and HTML is the HTML contents after the built in cleanup process has executed. This function should return the new HTML contents.

@@ -37,7 +37,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_setupcontent_callback.html b/www/extras/tinymce2/docs/option_setupcontent_callback.html index d0db1735e..b3526aa97 100644 --- a/www/extras/tinymce2/docs/option_setupcontent_callback.html +++ b/www/extras/tinymce2/docs/option_setupcontent_callback.html @@ -35,7 +35,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_submit_patch.html b/www/extras/tinymce2/docs/option_submit_patch.html index e7709fcfe..a23bf49c0 100644 --- a/www/extras/tinymce2/docs/option_submit_patch.html +++ b/www/extras/tinymce2/docs/option_submit_patch.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_table_inline_editing.html b/www/extras/tinymce2/docs/option_table_inline_editing.html index 8a2c7a5bf..b94b84239 100644 --- a/www/extras/tinymce2/docs/option_table_inline_editing.html +++ b/www/extras/tinymce2/docs/option_table_inline_editing.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_textarea_trigger.html b/www/extras/tinymce2/docs/option_textarea_trigger.html index 570186bf8..70a2a5940 100644 --- a/www/extras/tinymce2/docs/option_textarea_trigger.html +++ b/www/extras/tinymce2/docs/option_textarea_trigger.html @@ -39,7 +39,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_theme.html b/www/extras/tinymce2/docs/option_theme.html index 7abdc1b26..dbbbe215f 100644 --- a/www/extras/tinymce2/docs/option_theme.html +++ b/www/extras/tinymce2/docs/option_theme.html @@ -12,7 +12,7 @@

- This option enables you to specify what theme to use when rendering the TinyMCE WYSIWYG editor instances. This name matches the directories located in "tinymce/jscripts/tiny_mce/themes". The default value of this option is "advanced". TinyMCE has three build in themes and these are described in greater detail below. + This option enables you to specify what theme to use when rendering the TinyMCE WYSIWYG editor instances. This name matches the directories located in "tinymce/jscripts/tiny_mce/themes". The default value of this option is "advanced". TinyMCE has three built in themes and these are described in greater detail below.

@@ -41,7 +41,7 @@ tinyMCE.init({

diff --git a/www/extras/tinymce2/docs/option_theme_advanced_blockformats.html b/www/extras/tinymce2/docs/option_theme_advanced_blockformats.html index bf2ca47f7..b5b9859cf 100644 --- a/www/extras/tinymce2/docs/option_theme_advanced_blockformats.html +++ b/www/extras/tinymce2/docs/option_theme_advanced_blockformats.html @@ -12,7 +12,7 @@

- This option should contain a comma separated list of block formats the default value of this option is "p,address,pre,h1,h2,h3,h4,h5,h6". This option is only available if the advanced theme is used. + This option should contain a comma separated list of block formats the default value of this option is "p,div,address,pre,h1,h2,h3,h4,h5,h6". This option is only available if the advanced theme is used.

@@ -22,7 +22,7 @@
 tinyMCE.init({
 	...
-	theme_advanced_blockformats : "p,h1,h2,h3,h4,h5,h6"
+	theme_advanced_blockformats : "p,div,h1,h2,h3,h4,h5,h6"
 });
 
@@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_theme_advanced_buttons_n.html b/www/extras/tinymce2/docs/option_theme_advanced_buttons_n.html index e0066d750..d6ccdfd8d 100644 --- a/www/extras/tinymce2/docs/option_theme_advanced_buttons_n.html +++ b/www/extras/tinymce2/docs/option_theme_advanced_buttons_n.html @@ -12,7 +12,7 @@

- This option should contain a comma separated list of button/control names to insert into the toolbar. The number 1-n is the row number to insert the buttons/controls to. Below is a list of build in controls, plugins may include other controls names that can be inserted but these are documented in the individual plugins. + This option should contain a comma separated list of button/control names to insert into the toolbar. The number 1-n is the row number to insert the buttons/controls to. Below is a list of built in controls, plugins may include other controls names that can be inserted but these are documented in the individual plugins. This option can only be used when theme is set to advanced and when the theme_advanced_layout_manager option is set to the default value of "SimpleLayout".

@@ -36,7 +36,7 @@ tinyMCE.init({

diff --git a/www/extras/tinymce2/docs/option_theme_advanced_buttons_n_add.html b/www/extras/tinymce2/docs/option_theme_advanced_buttons_n_add.html index d321ee46b..0ada971ee 100644 --- a/www/extras/tinymce2/docs/option_theme_advanced_buttons_n_add.html +++ b/www/extras/tinymce2/docs/option_theme_advanced_buttons_n_add.html @@ -12,7 +12,7 @@

- This option should contain a comma separated list of button/control names to add to the end of the specified toolbar row. The number 1-n is the row number to add the buttons/controls to. Below is a list of build in controls, plugins may include other controls names that can be inserted but these are documented in the individual plugins. + This option should contain a comma separated list of button/control names to add to the end of the specified toolbar row. The number 1-n is the row number to add the buttons/controls to. Below is a list of built in controls, plugins may include other controls names that can be inserted but these are documented in the individual plugins. This option can only be used when theme is set to advanced and when the theme_advanced_layout_manager option is set to the default value of "SimpleLayout".

@@ -36,7 +36,7 @@ tinyMCE.init({

diff --git a/www/extras/tinymce2/docs/option_theme_advanced_buttons_n_add_before.html b/www/extras/tinymce2/docs/option_theme_advanced_buttons_n_add_before.html index 4ba6abf3c..fe27ecd0d 100644 --- a/www/extras/tinymce2/docs/option_theme_advanced_buttons_n_add_before.html +++ b/www/extras/tinymce2/docs/option_theme_advanced_buttons_n_add_before.html @@ -12,7 +12,7 @@

- This option should contain a comma separated list of button/control names to add to the beginning of the specified toolbar row. The number 1-n is the row number to add the buttons/controls to. Below is a list of build in controls, plugins may include other controls names that can be inserted but these are documented in the individual plugins. + This option should contain a comma separated list of button/control names to add to the beginning of the specified toolbar row. The number 1-n is the row number to add the buttons/controls to. Below is a list of built in controls, plugins may include other controls names that can be inserted but these are documented in the individual plugins. This option can only be used when theme is set to advanced and when the theme_advanced_layout_manager option is set to the default value of "SimpleLayout".

@@ -36,7 +36,7 @@ tinyMCE.init({

diff --git a/www/extras/tinymce2/docs/option_theme_advanced_container.html b/www/extras/tinymce2/docs/option_theme_advanced_container.html index 61c800ef2..cc2bddc0e 100644 --- a/www/extras/tinymce2/docs/option_theme_advanced_container.html +++ b/www/extras/tinymce2/docs/option_theme_advanced_container.html @@ -31,7 +31,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_theme_advanced_container_align.html b/www/extras/tinymce2/docs/option_theme_advanced_container_align.html index d944db655..972f69ef1 100644 --- a/www/extras/tinymce2/docs/option_theme_advanced_container_align.html +++ b/www/extras/tinymce2/docs/option_theme_advanced_container_align.html @@ -31,7 +31,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_theme_advanced_container_class.html b/www/extras/tinymce2/docs/option_theme_advanced_container_class.html index 71f9381a7..a663478f9 100644 --- a/www/extras/tinymce2/docs/option_theme_advanced_container_class.html +++ b/www/extras/tinymce2/docs/option_theme_advanced_container_class.html @@ -31,7 +31,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_theme_advanced_containers.html b/www/extras/tinymce2/docs/option_theme_advanced_containers.html index a6ceddfe4..cc4095645 100644 --- a/www/extras/tinymce2/docs/option_theme_advanced_containers.html +++ b/www/extras/tinymce2/docs/option_theme_advanced_containers.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_theme_advanced_containers_default_align.html b/www/extras/tinymce2/docs/option_theme_advanced_containers_default_align.html index 89cf96b2e..41f040e92 100644 --- a/www/extras/tinymce2/docs/option_theme_advanced_containers_default_align.html +++ b/www/extras/tinymce2/docs/option_theme_advanced_containers_default_align.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_theme_advanced_containers_default_class.html b/www/extras/tinymce2/docs/option_theme_advanced_containers_default_class.html index 9aee63474..166b183aa 100644 --- a/www/extras/tinymce2/docs/option_theme_advanced_containers_default_class.html +++ b/www/extras/tinymce2/docs/option_theme_advanced_containers_default_class.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_theme_advanced_custom_layout.html b/www/extras/tinymce2/docs/option_theme_advanced_custom_layout.html index bafc1a4ca..ed523f3a5 100644 --- a/www/extras/tinymce2/docs/option_theme_advanced_custom_layout.html +++ b/www/extras/tinymce2/docs/option_theme_advanced_custom_layout.html @@ -41,7 +41,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_theme_advanced_disable.html b/www/extras/tinymce2/docs/option_theme_advanced_disable.html index e472821d3..6850f55ab 100644 --- a/www/extras/tinymce2/docs/option_theme_advanced_disable.html +++ b/www/extras/tinymce2/docs/option_theme_advanced_disable.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_theme_advanced_fonts.html b/www/extras/tinymce2/docs/option_theme_advanced_fonts.html index 88b8791e8..77a5cecb9 100644 --- a/www/extras/tinymce2/docs/option_theme_advanced_fonts.html +++ b/www/extras/tinymce2/docs/option_theme_advanced_fonts.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_theme_advanced_layout_manager.html b/www/extras/tinymce2/docs/option_theme_advanced_layout_manager.html index af479883f..0eb5c4e81 100644 --- a/www/extras/tinymce2/docs/option_theme_advanced_layout_manager.html +++ b/www/extras/tinymce2/docs/option_theme_advanced_layout_manager.html @@ -31,7 +31,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_theme_advanced_link_targets.html b/www/extras/tinymce2/docs/option_theme_advanced_link_targets.html index d1416a336..92cb33a2f 100644 --- a/www/extras/tinymce2/docs/option_theme_advanced_link_targets.html +++ b/www/extras/tinymce2/docs/option_theme_advanced_link_targets.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_theme_advanced_path.html b/www/extras/tinymce2/docs/option_theme_advanced_path.html index 27874c98d..e76563356 100644 --- a/www/extras/tinymce2/docs/option_theme_advanced_path.html +++ b/www/extras/tinymce2/docs/option_theme_advanced_path.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_theme_advanced_path_location.html b/www/extras/tinymce2/docs/option_theme_advanced_path_location.html index 9bbacd398..ee2c74a21 100644 --- a/www/extras/tinymce2/docs/option_theme_advanced_path_location.html +++ b/www/extras/tinymce2/docs/option_theme_advanced_path_location.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_theme_advanced_resize_horizontal.html b/www/extras/tinymce2/docs/option_theme_advanced_resize_horizontal.html index b83b9cfce..869ada340 100644 --- a/www/extras/tinymce2/docs/option_theme_advanced_resize_horizontal.html +++ b/www/extras/tinymce2/docs/option_theme_advanced_resize_horizontal.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_theme_advanced_resizing.html b/www/extras/tinymce2/docs/option_theme_advanced_resizing.html index 25c6e161f..a47d023a1 100644 --- a/www/extras/tinymce2/docs/option_theme_advanced_resizing.html +++ b/www/extras/tinymce2/docs/option_theme_advanced_resizing.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_theme_advanced_resizing_use_cookie.html b/www/extras/tinymce2/docs/option_theme_advanced_resizing_use_cookie.html index 90df5b599..d9cc6a781 100644 --- a/www/extras/tinymce2/docs/option_theme_advanced_resizing_use_cookie.html +++ b/www/extras/tinymce2/docs/option_theme_advanced_resizing_use_cookie.html @@ -27,7 +27,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_theme_advanced_source_editor_height.html b/www/extras/tinymce2/docs/option_theme_advanced_source_editor_height.html index 6e14af81a..f8aff7da8 100644 --- a/www/extras/tinymce2/docs/option_theme_advanced_source_editor_height.html +++ b/www/extras/tinymce2/docs/option_theme_advanced_source_editor_height.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_theme_advanced_source_editor_width.html b/www/extras/tinymce2/docs/option_theme_advanced_source_editor_width.html index fa11f9f4b..90c45076c 100644 --- a/www/extras/tinymce2/docs/option_theme_advanced_source_editor_width.html +++ b/www/extras/tinymce2/docs/option_theme_advanced_source_editor_width.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_theme_advanced_statusbar_location.html b/www/extras/tinymce2/docs/option_theme_advanced_statusbar_location.html index 687ab6e35..415ed4259 100644 --- a/www/extras/tinymce2/docs/option_theme_advanced_statusbar_location.html +++ b/www/extras/tinymce2/docs/option_theme_advanced_statusbar_location.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_theme_advanced_styles.html b/www/extras/tinymce2/docs/option_theme_advanced_styles.html index fa25eab23..997d3883b 100644 --- a/www/extras/tinymce2/docs/option_theme_advanced_styles.html +++ b/www/extras/tinymce2/docs/option_theme_advanced_styles.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_theme_advanced_toolbar_align.html b/www/extras/tinymce2/docs/option_theme_advanced_toolbar_align.html index 93109355e..fc59eee3d 100644 --- a/www/extras/tinymce2/docs/option_theme_advanced_toolbar_align.html +++ b/www/extras/tinymce2/docs/option_theme_advanced_toolbar_align.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_theme_advanced_toolbar_location.html b/www/extras/tinymce2/docs/option_theme_advanced_toolbar_location.html index c7e9f1fa6..146b05fbb 100644 --- a/www/extras/tinymce2/docs/option_theme_advanced_toolbar_location.html +++ b/www/extras/tinymce2/docs/option_theme_advanced_toolbar_location.html @@ -33,7 +33,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_trim_span_elements.html b/www/extras/tinymce2/docs/option_trim_span_elements.html index 3e07f87ae..e88e70dd9 100644 --- a/www/extras/tinymce2/docs/option_trim_span_elements.html +++ b/www/extras/tinymce2/docs/option_trim_span_elements.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_urlconverter_callback.html b/www/extras/tinymce2/docs/option_urlconverter_callback.html index a328df2d1..ae8ced6c9 100644 --- a/www/extras/tinymce2/docs/option_urlconverter_callback.html +++ b/www/extras/tinymce2/docs/option_urlconverter_callback.html @@ -12,7 +12,7 @@

- This option enable you to add your own URL converter logic. This option should contain a JavaScript function name. The format of this converter function is: URLConverter(url, node, on_save). There URL is the URL string to convert, node is the element that contains the URL that is to be converted this parameter may be set to null if there is no element for the URL and on_save is set to true when contents is to be extracted from the editor for example when the user submits the HTML form. This function should return the converted URL as a string. This option is set to a internal TinyMCE function "TinyMCE.prototype.convertURL" by default. You may call this function from your extention inorder to use the build in convertor options. + This option enable you to add your own URL converter logic. This option should contain a JavaScript function name. The format of this converter function is: URLConverter(url, node, on_save). There URL is the URL string to convert, node is the element that contains the URL that is to be converted this parameter may be set to null if there is no element for the URL and on_save is set to true when contents is to be extracted from the editor for example when the user submits the HTML form. This function should return the converted URL as a string. This option is set to a internal TinyMCE function "TinyMCE.prototype.convertURL" by default. You may call this function from your extention inorder to use the built in convert options.

@@ -38,7 +38,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_valid_elements.html b/www/extras/tinymce2/docs/option_valid_elements.html index e6e1184ac..b332b5e54 100644 --- a/www/extras/tinymce2/docs/option_valid_elements.html +++ b/www/extras/tinymce2/docs/option_valid_elements.html @@ -30,6 +30,7 @@ ?Separates attribute verification values, see above. +Makes the element open if no child nodes exists. Example: +a. -Enables removal of empty elements such as >strong /<. Example: -strong. + #Enables padding of empty elements, this will padd with &nbsp; if they are empty. Example: #p. Wildcards such as *,+,? may be used in element or attribute name matching. @@ -64,7 +65,7 @@ tinyMCE.init({

-+a[id|style|rel|rev|charset|hreflang|dir|lang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],-strong/b[class|style],-em/i[class|style],-strike[class|style],-u[class|style],+p[style|dir|class|align],-ol[class|style],-ul[class|style],-li[class|style],br,img[id|dir|lang|longdesc|usemap|style|class|src|onmouseover|onmouseout|border=0|alt|title|hspace|vspace|width|height|align],-sub[style|class],-sup[style|class],-blockquote[dir|style],-table[border=0|cellspacing|cellpadding|width|height|class|align|summary|style|dir|id|lang|bgcolor|background|bordercolor],-tr[id|lang|dir|class|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor],tbody[id|class],thead[id|class],tfoot[id|class],-td[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor|scope],-th[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|scope],caption[id|lang|dir|class|style],-div[id|dir|class|align|style],-span[style|class|align],-pre[class|align|style],address[class|align|style],-h1[style|dir|class|align],-h2[style|dir|class|align],-h3[style|dir|class|align],-h4[style|dir|class|align],-h5[style|dir|class|align],-h6[style|dir|class|align],hr[class|style],font[face|size|style|id|class|dir|color]
++a[id|style|rel|rev|charset|hreflang|dir|lang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],-strong/-b[class|style],-em/-i[class|style],-strike[class|style],-u[class|style],#p[id|style|dir|class|align],-ol[class|style],-ul[class|style],-li[class|style],br,img[id|dir|lang|longdesc|usemap|style|class|src|onmouseover|onmouseout|border|alt=|title|hspace|vspace|width|height|align],-sub[style|class],-sup[style|class],-blockquote[dir|style],-table[border=0|cellspacing|cellpadding|width|height|class|align|summary|style|dir|id|lang|bgcolor|background|bordercolor],-tr[id|lang|dir|class|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor],tbody[id|class],thead[id|class],tfoot[id|class],-td[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor|scope],-th[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|scope],caption[id|lang|dir|class|style],-div[id|dir|class|align|style],-span[style|class|align],-pre[class|align|style],address[class|align|style],-h1[id|style|dir|class|align],-h2[id|style|dir|class|align],-h3[id|style|dir|class|align],-h4[id|style|dir|class|align],-h5[id|style|dir|class|align],-h6[id|style|dir|class|align],hr[class|style],-font[face|size|style|id|class|dir|color],dd[id|class|title|style|dir|lang],dl[id|class|title|style|dir|lang],dt[id|class|title|style|dir|lang]
 
@@ -72,7 +73,7 @@ tinyMCE.init({

Full XHTML rule set:

- This is the default string used by TinyMCE to cleanup the HTML contents. + The following will validate that the page complies fully with the XHTML specification.

@@ -272,7 +273,7 @@ valid_elements : ""
 +"small[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
   +"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
   +"|title],"
-+"span[align
 	
-	
+	
 	
diff --git a/www/extras/tinymce2/docs/option_verify_css_classes.html b/www/extras/tinymce2/docs/option_verify_css_classes.html index 8c3543a75..1109c208c 100644 --- a/www/extras/tinymce2/docs/option_verify_css_classes.html +++ b/www/extras/tinymce2/docs/option_verify_css_classes.html @@ -7,7 +7,7 @@
-

Option: verify_css_classes

+

(Removed)Option: verify_css_classes

@@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_verify_html.html b/www/extras/tinymce2/docs/option_verify_html.html index 36c52df19..9327a471e 100644 --- a/www/extras/tinymce2/docs/option_verify_html.html +++ b/www/extras/tinymce2/docs/option_verify_html.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_visual.html b/www/extras/tinymce2/docs/option_visual.html index a836f5b78..587e5a4cb 100644 --- a/www/extras/tinymce2/docs/option_visual.html +++ b/www/extras/tinymce2/docs/option_visual.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_visual_table_class.html b/www/extras/tinymce2/docs/option_visual_table_class.html index 22909937d..3f6a188a3 100644 --- a/www/extras/tinymce2/docs/option_visual_table_class.html +++ b/www/extras/tinymce2/docs/option_visual_table_class.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/option_width.html b/www/extras/tinymce2/docs/option_width.html index 01c1db081..b114d342e 100644 --- a/www/extras/tinymce2/docs/option_width.html +++ b/www/extras/tinymce2/docs/option_width.html @@ -30,7 +30,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/plugin_advhr.html b/www/extras/tinymce2/docs/plugin_advhr.html index ee85cf42d..12617a3b5 100644 --- a/www/extras/tinymce2/docs/plugin_advhr.html +++ b/www/extras/tinymce2/docs/plugin_advhr.html @@ -38,7 +38,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/plugin_advimage.html b/www/extras/tinymce2/docs/plugin_advimage.html index abb0fe7fc..f6141e9dd 100644 --- a/www/extras/tinymce2/docs/plugin_advimage.html +++ b/www/extras/tinymce2/docs/plugin_advimage.html @@ -40,8 +40,7 @@ tinyMCE.init({ theme : "advanced", mode : "textareas", - plugins : "preview", - extended_valid_elements : "a[name|href|target|title|onclick]" + plugins : "preview" });
@@ -50,7 +49,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/plugin_advlink.html b/www/extras/tinymce2/docs/plugin_advlink.html index 951963ede..72b94fc05 100644 --- a/www/extras/tinymce2/docs/plugin_advlink.html +++ b/www/extras/tinymce2/docs/plugin_advlink.html @@ -39,8 +39,7 @@ tinyMCE.init({ theme : "advanced", mode : "textareas", - plugins : "advlink", - extended_valid_elements : "a[name|href|target|title|onclick]" + plugins : "advlink" });

@@ -48,7 +47,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/plugin_autosave.html b/www/extras/tinymce2/docs/plugin_autosave.html index 0dc4adc12..7929216bf 100644 --- a/www/extras/tinymce2/docs/plugin_autosave.html +++ b/www/extras/tinymce2/docs/plugin_autosave.html @@ -27,7 +27,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/plugin_contextmenu.html b/www/extras/tinymce2/docs/plugin_contextmenu.html index a5c9ed364..0ce0d101e 100644 --- a/www/extras/tinymce2/docs/plugin_contextmenu.html +++ b/www/extras/tinymce2/docs/plugin_contextmenu.html @@ -35,7 +35,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/plugin_directionality.html b/www/extras/tinymce2/docs/plugin_directionality.html index 2eaca168c..c5c986dcd 100644 --- a/www/extras/tinymce2/docs/plugin_directionality.html +++ b/www/extras/tinymce2/docs/plugin_directionality.html @@ -36,7 +36,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/plugin_emotions.html b/www/extras/tinymce2/docs/plugin_emotions.html index f178f7398..ae2556363 100644 --- a/www/extras/tinymce2/docs/plugin_emotions.html +++ b/www/extras/tinymce2/docs/plugin_emotions.html @@ -45,7 +45,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/plugin_flash.html b/www/extras/tinymce2/docs/plugin_flash.html index f0447d83d..77d6c16a4 100644 --- a/www/extras/tinymce2/docs/plugin_flash.html +++ b/www/extras/tinymce2/docs/plugin_flash.html @@ -71,7 +71,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/plugin_fullscreen.html b/www/extras/tinymce2/docs/plugin_fullscreen.html index b6b1832e0..6acc3329d 100644 --- a/www/extras/tinymce2/docs/plugin_fullscreen.html +++ b/www/extras/tinymce2/docs/plugin_fullscreen.html @@ -50,7 +50,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/plugin_iespell.html b/www/extras/tinymce2/docs/plugin_iespell.html index dfc6f7f88..5137218cf 100644 --- a/www/extras/tinymce2/docs/plugin_iespell.html +++ b/www/extras/tinymce2/docs/plugin_iespell.html @@ -37,7 +37,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/plugin_inlinepopups.html b/www/extras/tinymce2/docs/plugin_inlinepopups.html index 9e6af0473..61a2a2388 100644 --- a/www/extras/tinymce2/docs/plugin_inlinepopups.html +++ b/www/extras/tinymce2/docs/plugin_inlinepopups.html @@ -28,7 +28,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/plugin_insertdatetime.html b/www/extras/tinymce2/docs/plugin_insertdatetime.html index 5a5e95d18..0cd07c362 100644 --- a/www/extras/tinymce2/docs/plugin_insertdatetime.html +++ b/www/extras/tinymce2/docs/plugin_insertdatetime.html @@ -99,7 +99,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/plugin_noneditable.html b/www/extras/tinymce2/docs/plugin_noneditable.html index fb4dbd5ee..3826bc4c4 100644 --- a/www/extras/tinymce2/docs/plugin_noneditable.html +++ b/www/extras/tinymce2/docs/plugin_noneditable.html @@ -46,7 +46,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/plugin_paste.html b/www/extras/tinymce2/docs/plugin_paste.html index d1269dd9e..d42e93c86 100644 --- a/www/extras/tinymce2/docs/plugin_paste.html +++ b/www/extras/tinymce2/docs/plugin_paste.html @@ -39,8 +39,25 @@ tinyMCE.init({ paste_auto_cleanup_on_paste : true, paste_convert_middot_lists : false, paste_unindented_list_class : "unindentedList", - paste_convert_headers_to_strong : true + paste_convert_headers_to_strong : true, + paste_insert_word_content_callback : "convertWord" }); + +function convertWord(type, content) { + switch (type) { + // Gets executed before the built in logic performes it's cleanups + case "before": + content = content.toLowerCase(); // Some dummy logic + break; + + // Gets executed after the built in logic performes it's cleanups + case "after": + content = content.toLowerCase(); // Some dummy logic + break; + } + + return content; +}

@@ -59,7 +76,7 @@ tinyMCE.init({ [paste_use_dialog] - MSIE specific option, if you set this to false both Mozilla and MSIE will present a paste dialog. If you set it to true pasting in MSIE will be done directly. This option is set to false by default. + MSIE specific option, if you set this to true both Mozilla and MSIE will present a paste dialog. If you set it to false pasting in MSIE will be done directly. This option is set to false by default. [paste_auto_cleanup_on_paste] @@ -77,6 +94,14 @@ tinyMCE.init({ [paste_convert_headers_to_strong] This feature converts H1-6 elements to strong elements on paste, this is feature is disabled by default. + + [paste_remove_spans] + This enables you to control if the word parse operation should remove or keep span elements, they will be removed by default. + + + [paste_remove_styles] + This enables you to control if the word parse operation should remove or keep style attributes, they will be removed by default. + [paste_replace_list] Comma separated list of search/replace chunks. Where even items is the regexp that is to be used for the search and odd values are the contents that are to be replaced. @@ -94,6 +119,11 @@ tinyMCE.init({ + + [paste_insert_word_content_callback] + This option enables you to specify a callback function. This callback is executed when the user pastes word content, the return value of this function will be the new content string. Check the example above for more details. + +

@@ -101,7 +131,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/plugin_preview.html b/www/extras/tinymce2/docs/plugin_preview.html index 487bc5eb2..9bba87415 100644 --- a/www/extras/tinymce2/docs/plugin_preview.html +++ b/www/extras/tinymce2/docs/plugin_preview.html @@ -58,7 +58,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/plugin_print.html b/www/extras/tinymce2/docs/plugin_print.html index 797854e15..696f12391 100644 --- a/www/extras/tinymce2/docs/plugin_print.html +++ b/www/extras/tinymce2/docs/plugin_print.html @@ -37,7 +37,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/plugin_save.html b/www/extras/tinymce2/docs/plugin_save.html index 87c1c81f9..c42bde11d 100644 --- a/www/extras/tinymce2/docs/plugin_save.html +++ b/www/extras/tinymce2/docs/plugin_save.html @@ -20,7 +20,26 @@
  • Add the ltr, rtl button names to button list, example: theme_advanced_buttons3_add : "save".
  • + +

    +

    Options

    +

    +

    + + + + + + + + + +
    [save_enablewhendirty]If you set this option to true, the edit button will be disabled/dimmed until modifications are made. This is disabled by default.
    [onchange_callback]This option enables you to add a custom function to be called when the save button/command is invoked. This is not used by default.
    +

    + +

    Initialization Example

    +

    @@ -28,7 +47,9 @@ tinyMCE.init({
     	theme : "advanced",
     	mode : "textareas",
     	plugins : "save",
    -	theme_advanced_buttons3_add : "save"
    +	theme_advanced_buttons3_add : "save",
    +	save_enablewhendirty : true,
    +	onchange_callback : "mysave"
     });

    @@ -36,7 +57,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/plugin_searchreplace.html b/www/extras/tinymce2/docs/plugin_searchreplace.html index 9914dfeb7..0538fde22 100644 --- a/www/extras/tinymce2/docs/plugin_searchreplace.html +++ b/www/extras/tinymce2/docs/plugin_searchreplace.html @@ -36,7 +36,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/plugin_table.html b/www/extras/tinymce2/docs/plugin_table.html index 7e525ca7e..7706f97a9 100644 --- a/www/extras/tinymce2/docs/plugin_table.html +++ b/www/extras/tinymce2/docs/plugin_table.html @@ -59,6 +59,9 @@ table_stylesThis option should contain a semicolon separated list of class titles and class names separated by =. The titles are the ones that get presented to the user in the styles drop down list and and the class names is the classes that gets inserted. table_cell_stylesThis option should contain a semicolon separated list of class titles and class names separated by =. The titles are the ones that get presented to the user in the styles drop down list and and the class names is the classes that gets inserted. table_row_stylesThis option should contain a semicolon separated list of class titles and class names separated by =. The titles are the ones that get presented to the user in the styles drop down list and and the class names is the classes that gets inserted. + table_cell_limitEnables you to specify the max number of cells for a table. + table_row_limitEnables you to specify the max number of rows for a table. + table_col_limitEnables you to specify the max number of columns for a table.
    @@ -82,7 +85,10 @@ tinyMCE.init({ theme_advanced_buttons3_add : "tablecontrols", table_styles : "Header 1=header1;Header 2=header2;Header 3=header3", table_cell_styles : "Header 1=header1;Header 2=header2;Header 3=header3;Table Cell=tableCel1", - table_row_styles : "Header 1=header1;Header 2=header2;Header 3=header3;Table Row=tableRow1" + table_row_styles : "Header 1=header1;Header 2=header2;Header 3=header3;Table Row=tableRow1", + table_cell_limit : 100, + table_row_limit : 5, + table_col_limit : 5 });

    @@ -90,7 +96,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/plugin_zoom.html b/www/extras/tinymce2/docs/plugin_zoom.html index d27844ade..93f7b06b2 100644 --- a/www/extras/tinymce2/docs/plugin_zoom.html +++ b/www/extras/tinymce2/docs/plugin_zoom.html @@ -36,7 +36,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/reference_buttons.html b/www/extras/tinymce2/docs/reference_buttons.html index 1da568a55..6cd62997d 100644 --- a/www/extras/tinymce2/docs/reference_buttons.html +++ b/www/extras/tinymce2/docs/reference_buttons.html @@ -43,6 +43,10 @@ code
    hr
    removeformat
    + formatselect
    + fontselect
    + fontsizeselect
    + styleselect
    sub
    sup
    forecolor
    @@ -61,14 +65,25 @@ iespell
    preview
    print
    - save
    zoom
    fullscreen
    + advhr
    + fullpage
    + spellchecker

    Plugins with custom buttons

    @@ -100,7 +103,10 @@
  • init_instance_callback
  • file_browser_callback
  • cleanup_callback
  • +
  • handle_event_callback
  • +
  • execcommand_callback
  • oninit
  • +
  • onpageload
  • Layout

    @@ -123,6 +129,7 @@
  • custom_undo_redo
  • custom_undo_redo_levels
  • custom_undo_redo_keyboard_shortcuts
  • +
  • custom_undo_redo_restore_selection
  • File lists

    @@ -205,7 +212,7 @@ tinyMCE.init({ diff --git a/www/extras/tinymce2/docs/reference_javascript_functions.html b/www/extras/tinymce2/docs/reference_javascript_functions.html index 3b936b9f3..a0aedc3b6 100644 --- a/www/extras/tinymce2/docs/reference_javascript_functions.html +++ b/www/extras/tinymce2/docs/reference_javascript_functions.html @@ -223,8 +223,9 @@ Example:

    -

    tinyMCE.insertLink(href, target);

    - +

    (Deprecated) tinyMCE.insertLink(href, target);

    +

    This method is deprecated and removed as of 2.0.3. Use tinyMCE.execCommand('mceInsertContent',false,'custom html'); instead and tinyMCE.getInstanceById('<inst>').selection.getFocusElement() to retrive/update the selected element.

    +

    But if you realy need the old function it's marked internal but is available in the advanced theme and you can call it by using tinyMCE.themes['advanced']._insertLink(href, target);. But the recommended way is to modify your code to use the logic above.

    This method inserts a link a the cursor position of the selected editor instance or updates the selected link with new data. This method should be called upon "ok" in the insertLink popup when you create custom themes.

    @@ -248,7 +249,8 @@ Example: Returns: Nothing

    -

    tinyMCE.insertImage(src, alt, border, hspace, vspace, width, height, align, title, onmouseover, onmouseout);

    +

    (Deprecated) tinyMCE.insertImage(src, alt, border, hspace, vspace, width, height, align, title, onmouseover, onmouseout);

    +

    This method is deprecated and removed as of 2.0.3. Use tinyMCE.execCommand('mceInsertContent',false,'custom html'); instead or if you realy need the old function it's marked internal but is available in the advanced theme and you can call it by using tinyMCE.themes['advanced']._insertImage(src, alt, border, hspace, vspace, width, height, align, title, onmouseover, onmouseout);. But the recommended way is to modify your code to use the logic above.

    This method inserts a image a the cursor position of the selected editor instance or updates the selected image with new data. This method should be called upon "ok" in the insertImage popup when you create custom themes.

    @@ -379,7 +381,7 @@ This method returns a editor instance by editor id.

    -Returns: TinyMCE Editor instance (TinyMCEControl). +Returns: TinyMCE Editor instance (TinyMCE_Control).

    tinyMCE.importThemeLanguagePack([theme]);

    @@ -587,7 +589,7 @@ Returns: TinyMCE configuration parameter. diff --git a/www/extras/tinymce2/docs/reference_plugins.html b/www/extras/tinymce2/docs/reference_plugins.html index 4e44d14d7..91521ab88 100644 --- a/www/extras/tinymce2/docs/reference_plugins.html +++ b/www/extras/tinymce2/docs/reference_plugins.html @@ -48,7 +48,10 @@
  • zoom
  • directionality
  • fullscreen
  • +
  • fullpage
  • inlinepopups
  • +
  • fullpage
  • +
  • spellchecker

  • @@ -65,7 +68,7 @@ diff --git a/www/extras/tinymce2/examples/example_advanced.htm b/www/extras/tinymce2/examples/example_advanced.htm index 7dacef689..c22339310 100644 --- a/www/extras/tinymce2/examples/example_advanced.htm +++ b/www/extras/tinymce2/examples/example_advanced.htm @@ -9,8 +9,6 @@ theme : "advanced", mode : "exact", elements : "elm1,elm2", - //insertlink_callback : "customInsertLink", - //insertimage_callback : "customInsertImage", save_callback : "customSave", content_css : "example_advanced.css", extended_valid_elements : "a[href|target|name]", @@ -18,46 +16,39 @@ theme_advanced_buttons3_add_before : "tablecontrols,separator", //invalid_elements : "a", theme_advanced_styles : "Header 1=header1;Header 2=header2;Header 3=header3;Table Row=tableRow1", // Theme specific setting CSS classes + //execcommand_callback : "myCustomExecCommandHandler", debug : false }); - // Custom insert link callback, extends the link function - function customInsertLink(href, target) { - var result = new Array(); + // Custom event handler + function myCustomExecCommandHandler(editor_id, elm, command, user_interface, value) { + var linkElm, imageElm, inst; - alert("customInsertLink called href: " + href + " target: " + target); + switch (command) { + case "mceLink": + inst = tinyMCE.getInstanceById(editor_id); + linkElm = tinyMCE.getParentElement(inst.selection.getFocusElement(), "a"); - result['href'] = "http://www.sourceforge.net"; - result['target'] = '_blank'; + if (linkElm) + alert("Link dialog has been overriden. Found link href: " + tinyMCE.getAttrib(linkElm, "href")); + else + alert("Link dialog has been overriden."); - return result; - } + return true; - // Custom insert image callback, extends the image function - function customInsertImage(src, alt, border, hspace, vspace, width, height, align) { - var result = new Array(); + case "mceImage": + inst = tinyMCE.getInstanceById(editor_id); + imageElm = tinyMCE.getParentElement(inst.selection.getFocusElement(), "img"); - var debug = "CustomInsertImage called:\n" - debug += "src: " + src + "\n"; - debug += "alt: " + alt + "\n"; - debug += "border: " + border + "\n"; - debug += "hspace: " + hspace + "\n"; - debug += "vspace: " + vspace + "\n"; - debug += "width: " + width + "\n"; - debug += "height: " + height + "\n"; - debug += "align: " + align + "\n"; - alert(debug); + if (imageElm) + alert("Image dialog has been overriden. Found image src: " + tinyMCE.getAttrib(imageElm, "src")); + else + alert("Image dialog has been overriden."); - result['src'] = "logo.jpg"; - result['alt'] = "test description"; - result['border'] = "2"; - result['hspace'] = "5"; - result['vspace'] = "5"; - result['width'] = width; - result['height'] = height; - result['align'] = "right"; + return true; + } - return result; + return false; // Pass to next handler in chain } // Custom save callback, gets called when the contents is to be submitted @@ -100,9 +91,9 @@ Some custom actions: [Bold] | [Italic] [Insert some HTML] -[Replace selection] +[Replace selection]
    - \ No newline at end of file + diff --git a/www/extras/tinymce2/examples/example_full.htm b/www/extras/tinymce2/examples/example_full.htm index e6a8cea0a..0024f546e 100644 --- a/www/extras/tinymce2/examples/example_full.htm +++ b/www/extras/tinymce2/examples/example_full.htm @@ -7,28 +7,26 @@ tinyMCE.init({ mode : "textareas", theme : "advanced", - plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print,paste,directionality,fullscreen,noneditable,contextmenu", + plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable", theme_advanced_buttons1_add_before : "save,newdocument,separator", theme_advanced_buttons1_add : "fontselect,fontsizeselect", - theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor,liststyle", + theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,separator,forecolor,backcolor", theme_advanced_buttons2_add_before: "cut,copy,paste,pastetext,pasteword,separator,search,replace,separator", theme_advanced_buttons3_add_before : "tablecontrols,separator", theme_advanced_buttons3_add : "emotions,iespell,flash,advhr,separator,print,separator,ltr,rtl,separator,fullscreen", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", - theme_advanced_statusbar_location : "bottom", + theme_advanced_path_location : "bottom", content_css : "example_full.css", plugin_insertdate_dateFormat : "%Y-%m-%d", plugin_insertdate_timeFormat : "%H:%M:%S", - extended_valid_elements : "hr[class|width|size|noshade]", + extended_valid_elements : "hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]", external_link_list_url : "example_link_list.js", external_image_list_url : "example_image_list.js", flash_external_list_url : "example_flash_list.js", file_browser_callback : "fileBrowserCallBack", - paste_use_dialog : false, - theme_advanced_resizing : true, theme_advanced_resize_horizontal : false, - theme_advanced_link_targets : "_something=My somthing;_something2=My somthing2;_something3=My somthing3;" + theme_advanced_resizing : true }); function fileBrowserCallBack(field_name, url, type, win) { @@ -62,4 +60,4 @@ - \ No newline at end of file + diff --git a/www/extras/tinymce2/examples/example_simple.htm b/www/extras/tinymce2/examples/example_simple.htm index d5305ac39..a7da13626 100644 --- a/www/extras/tinymce2/examples/example_simple.htm +++ b/www/extras/tinymce2/examples/example_simple.htm @@ -29,13 +29,16 @@ element gets converted to a editor instance on page load. Notice how TinyMCE tri <img src="logo.jpg"> -

    +
    +
    + + diff --git a/www/extras/tinymce2/examples/example_word.css b/www/extras/tinymce2/examples/example_word.css index 7296f857b..aafc71f5e 100644 --- a/www/extras/tinymce2/examples/example_word.css +++ b/www/extras/tinymce2/examples/example_word.css @@ -39,23 +39,23 @@ pre { /* Fix for MS Office style paragraphs (MsoNormal) */ p { - margin: 0px; - padding: 0px; + margin: 0; + padding: 0; } /* Fix for MS Office unindeted lists */ .unIndentedList { - margin: 0px; - padding: 0px; + margin: 0; + padding: 0; list-style-position: inside; } .unIndentedList li { - padding: 0px; + padding: 0; } /* Fix for MS Office UL lists */ ul { - margin-top: 0px; - margin-bottom: 0px; + margin-top: 0; + margin-bottom: 0; } diff --git a/www/extras/tinymce2/examples/example_word.htm b/www/extras/tinymce2/examples/example_word.htm index afa7973a6..07e857d4c 100644 --- a/www/extras/tinymce2/examples/example_word.htm +++ b/www/extras/tinymce2/examples/example_word.htm @@ -20,7 +20,6 @@ content_css : "example_word.css", plugi2n_insertdate_dateFormat : "%Y-%m-%d", plugi2n_insertdate_timeFormat : "%H:%M:%S", - extended_valid_elements : "hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]", external_link_list_url : "example_link_list.js", external_image_list_url : "example_image_list.js", flash_external_list_url : "example_flash_list.js", @@ -31,7 +30,9 @@ theme_advanced_link_targets : "_something=My somthing;_something2=My somthing2;_something3=My somthing3;", paste_auto_cleanup_on_paste : true, paste_convert_headers_to_strong : false, - paste_strip_class_attributes : "all" + paste_strip_class_attributes : "all", + paste_remove_spans : false, + paste_remove_styles : false }); function fileBrowserCallBack(field_name, url, type, win) { diff --git a/www/extras/tinymce2/jscripts/tiny_mce/langs/da.js b/www/extras/tinymce2/jscripts/tiny_mce/langs/da.js index c81acc11d..bb8d39fdb 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/langs/da.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/langs/da.js @@ -1,4 +1,4 @@ -// DK lang variables contributed by Jan Moelgaard +// DK lang variables contributed by Jan Moelgaard, John Dalsgaard and Bo Frederiksen. tinyMCE.addToLang('',{ bold_desc : 'Fed', @@ -7,35 +7,35 @@ underline_desc : 'Understreg', striketrough_desc : 'Gennemstreg', justifyleft_desc : 'Venstrestil', justifycenter_desc : 'Centrer', -justifyright_desc : 'Højrestil', +justifyright_desc : 'Højrestil', justifyfull_desc : 'Lige margin', bullist_desc : 'Liste med bullets', numlist_desc : 'Liste med tal', outdent_desc : 'Ryk til venstre', -indent_desc : 'Ryk til højre', +indent_desc : 'Ryk til højre', undo_desc : 'Fortryd', -redo_desc : 'Gør igen', -link_desc : 'Indsæt link', +redo_desc : 'Gør igen', +link_desc : 'Indsæt link', unlink_desc : 'Fjern link', -image_desc : 'Indsæt billede', +image_desc : 'Indsæt billede', cleanup_desc : 'Ryd op i koden', -focus_alert : 'Der skal sættes fokus på sessionen, før man kan bruge denne kommando', -edit_confirm : 'Vil du bruge WYSIWYG mode til dette textområde?', -insert_link_title : 'Indsæt eller rediger link', -insert : 'Indsæt', +focus_alert : 'Der skal sættes fokus på sessionen, før man kan bruge denne kommando', +edit_confirm : 'Vil du bruge WYSIWYG mode til dette textområde?', +insert_link_title : 'Indsæt eller rediger link', +insert : 'Indsæt', update : 'Opdater', cancel : 'Fortryd', insert_link_url : 'Linkadresse', insert_link_target : 'Destination', insert_link_target_same : 'Luk linket op i samme vindue', insert_link_target_blank : 'Luk linket op i et nyt vindue', -insert_image_title : 'Indsæt / rediger billede', +insert_image_title : 'Indsæt / rediger billede', insert_image_src : 'Billedets adresse', insert_image_alt : 'Alternativ tekst', -help_desc : 'Hjælp', +help_desc : 'Hjælp', bold_img : "bold.gif", italic_img : "italic.gif", underline_img : "underline.gif", -clipboard_msg : 'Kopier/Klip/Indsæt virker ikke i Mozilla og Firefox.\nVil du vide mere om dette?', -popup_blocked : 'Beklager, men din browser blokerer for pop-up-vinduer. Skal du bruge denne editor fuldt ud, skal pop-up-vinduer være tilladt.' +clipboard_msg : 'Kopier/Klip/Indsæt virker ikke i Mozilla og Firefox.\nVil du vide mere om dette?', +popup_blocked : 'Beklager, men din browser blokerer for pop-up-vinduer. Skal du bruge denne editor fuldt ud, skal pop-up-vinduer være tilladt.' }); diff --git a/www/extras/tinymce2/jscripts/tiny_mce/langs/de.js b/www/extras/tinymce2/jscripts/tiny_mce/langs/de.js index 62e5a9624..6f67f2af4 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/langs/de.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/langs/de.js @@ -27,8 +27,8 @@ update : 'Aktualisieren', cancel : 'Abbrechen', insert_link_url : 'Link-URL', insert_link_target : 'Ziel', -insert_link_target_same : 'Link in gleichen Fester öffnen', -insert_link_target_blank : 'Link in neuen Fenster öffnen', +insert_link_target_same : 'Link im gleichen Fenster öffnen', +insert_link_target_blank : 'Link in neuem Fenster öffnen', insert_image_title : 'Bild einfügen/bearbeiten', insert_image_src : 'Bild-URL', insert_image_alt : 'Bild-Beschreibung', diff --git a/www/extras/tinymce2/jscripts/tiny_mce/langs/it.js b/www/extras/tinymce2/jscripts/tiny_mce/langs/it.js index ecbc7a6b6..d5fff398c 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/langs/it.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/langs/it.js @@ -37,5 +37,5 @@ bold_img : "bold.gif", italic_img : "italic.gif", underline_img : "underline.gif", clipboard_msg : 'Copia, Taglia e Incolla non sono disponibili in Mozilla e Firefox.\nVuoi maggiori dettegli su questo problema?', -popup_blocked : 'Spiacenti, un sistema di blocco popup ha impedito l\'apertura di una finestra necessaria per il funzionamento dell\'editor. Disabilita il blocco popup per questo sito se vuoi utilizzare tutte le funzionalità.' +popup_blocked : 'Spiacenti, un sistema di blocco popup ha impedito l\'apertura di una finestra necessaria per il funzionamento dell\'editor. Disabilita il blocco popup per questo sito se vuoi utilizzare tutte le funzionalit\u00E0.' }); diff --git a/www/extras/tinymce2/jscripts/tiny_mce/langs/readme.txt b/www/extras/tinymce2/jscripts/tiny_mce/langs/readme.txt index e23001b44..eee314c4a 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/langs/readme.txt +++ b/www/extras/tinymce2/jscripts/tiny_mce/langs/readme.txt @@ -1,2 +1,7 @@ +Language packs are from version 2.0.5 removed from the core but can be downloadable from the TinyMCE website. +http://tinymce.moxiecode.com/download.php + The language pack codes are based on ISO-639-2 http://www.loc.gov/standards/iso639-2/englangn.html + +Try using entires if possible. å etc. diff --git a/www/extras/tinymce2/jscripts/tiny_mce/langs/zh_cn.js b/www/extras/tinymce2/jscripts/tiny_mce/langs/zh_cn.js index 46cd4038f..350dcd034 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/langs/zh_cn.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/langs/zh_cn.js @@ -1,4 +1,5 @@ -// Simplified Chinese lang variables contributed by tom_cat (thomaswangyang@gmail.com) +// Simplified Chinese lang variables contributed by TinyMCE_China_Team ( tinymce_china {AT} yahoogroups {DOT} com ). +// visit our homepage at: http://www.cube316.net/tinymce/ for more information. tinyMCE.addToLang('',{ bold_desc : 'ºÚÌå (Ctrl+B)', diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/_template/editor_plugin.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/_template/editor_plugin.js index 53472c824..59e2ceb27 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/_template/editor_plugin.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/_template/editor_plugin.js @@ -1,118 +1 @@ -/* Import plugin specific language pack */ -tinyMCE.importPluginLanguagePack('template', 'en'); // <- Add a comma separated list of all supported languages - -/**** - * Steps for creating a plugin from this template: - * - * 1. Change all "template" to the name of your plugin. - * 2. Remove all the callbacks in this file that you don't need. - * 3. Remove the popup.htm file if you don't need any popups. - * 4. Add your custom logic to the callbacks you needed. - * 5. Write documentation in a readme.txt file on how to use the plugin. - * 6. Upload it under the "Plugins" section at sourceforge. - * - ****/ - -/** - * Gets executed when a editor instance is initialized - */ -function TinyMCE_template_initInstance(inst) { - // You can take out plugin specific parameters - alert("Initialization parameter:" + tinyMCE.getParam("template_someparam", false)); -} - -/** - * Gets executed when a editor needs to generate a button. - */ -function TinyMCE_template_getControlHTML(control_name) { - switch (control_name) { - case "template": - return ''; - } - - return ""; -} - -/** - * Gets executed when a command is called. - */ -function TinyMCE_template_execCommand(editor_id, element, command, user_interface, value) { - // Handle commands - switch (command) { - // Remember to have the "mce" prefix for commands so they don't intersect with built in ones in the browser. - case "mceTemplate": - // Show UI/Popup - if (user_interface) { - // Open a popup window and send in some custom data in a window argument - var template = new Array(); - - template['file'] = '../../plugins/template/popup.htm'; // Relative to theme - template['width'] = 300; - template['height'] = 200; - - tinyMCE.openWindow(template, {editor_id : editor_id, some_custom_arg : "somecustomdata"}); - - // Let TinyMCE know that something was modified - tinyMCE.triggerNodeChange(false); - } else { - // Do a command this gets called from the template popup - alert("execCommand: mceTemplate gets called from popup."); - } - - return true; - } - - // Pass to next handler in chain - return false; -} - -/** - * Gets executed when the selection/cursor position was changed. - */ -function TinyMCE_template_handleNodeChange(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) { - // Deselect template button - tinyMCE.switchClassSticky(editor_id + '_template', 'mceButtonNormal'); - - // Select template button if parent node is a strong or b - if (node.parentNode.nodeName == "STRONG" || node.parentNode.nodeName == "B") - tinyMCE.switchClassSticky(editor_id + '_template', 'mceButtonSelected'); - - return true; -} - -/** - * Gets executed when contents is inserted / retrived. - */ -function TinyMCE_template_cleanup(type, content) { - switch (type) { - case "get_from_editor": - alert("[FROM] Value HTML string: " + content); - - // Do custom cleanup code here - - break; - - case "insert_to_editor": - alert("[TO] Value HTML string: " + content); - - // Do custom cleanup code here - - break; - - case "get_from_editor_dom": - alert("[FROM] Value DOM Element " + content.innerHTML); - - // Do custom cleanup code here - - break; - - case "insert_to_editor_dom": - alert("[TO] Value DOM Element: " + content.innerHTML); - - // Do custom cleanup code here - - break; - } - - return content; -} +tinyMCE.importPluginLanguagePack('template','en,tr,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,pl');var TinyMCE_TemplatePlugin={getInfo:function(){return{longname:'Template plugin',author:'Your name',authorurl:'http://www.yoursite.com',infourl:'http://www.yoursite.com/docs/template.html',version:"1.0"};},initInstance:function(inst){alert("Initialization parameter:"+tinyMCE.getParam("template_someparam",false));inst.addShortcut('ctrl','t','lang_template_desc','mceTemplate');},getControlHTML:function(cn){switch(cn){case"template":return tinyMCE.getButtonHTML(cn,'lang_template_desc','{$pluginurl}/images/template.gif','mceTemplate',true);}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceTemplate":if(user_interface){var template=new Array();template['file']='../../plugins/template/popup.htm';template['width']=300;template['height']=200;tinyMCE.openWindow(template,{editor_id:editor_id,some_custom_arg:"somecustomdata"});tinyMCE.triggerNodeChange(false);}else{alert("execCommand: mceTemplate gets called from popup.");}return true;}return false;},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){if(node.parentNode.nodeName=="STRONG"||node.parentNode.nodeName=="B"){tinyMCE.switchClass(editor_id+'_template','mceButtonSelected');return true;}tinyMCE.switchClass(editor_id+'_template','mceButtonNormal');},setupContent:function(editor_id,body,doc){},onChange:function(inst){},handleEvent:function(e){top.status="template plugin event: "+e.type;return true;},cleanup:function(type,content,inst){switch(type){case"get_from_editor":alert("[FROM] Value HTML string: "+content);break;case"insert_to_editor":alert("[TO] Value HTML string: "+content);break;case"get_from_editor_dom":alert("[FROM] Value DOM Element "+content.innerHTML);break;case"insert_to_editor_dom":alert("[TO] Value DOM Element: "+content.innerHTML);break;}return content;},_someInternalFunction:function(a,b){return 1;}};tinyMCE.addPlugin("template",TinyMCE_TemplatePlugin); \ No newline at end of file diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/_template/editor_plugin_src.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/_template/editor_plugin_src.js index 7e181d104..e69f1fce4 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/_template/editor_plugin_src.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/_template/editor_plugin_src.js @@ -1,5 +1,14 @@ +/** + * $RCSfile: editor_plugin_src.js,v $ + * $Revision: 1.12 $ + * $Date: 2006/02/22 20:06:23 $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved. + */ + /* Import plugin specific language pack */ -tinyMCE.importPluginLanguagePack('template', 'en,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,pl'); // <- Add a comma separated list of all supported languages +tinyMCE.importPluginLanguagePack('template', 'en,tr,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,pl'); // <- Add a comma separated list of all supported languages /**** * Steps for creating a plugin from this template: @@ -13,120 +22,217 @@ tinyMCE.importPluginLanguagePack('template', 'en,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn, * ****/ -/** - * Information about the plugin. - */ -function TinyMCE_template_getInfo() { - return { - longname : 'Template plugin', - author : 'Your name', - authorurl : 'http://www.yoursite.com', - infourl : 'http://www.yoursite.com/docs/template.html', - version : "1.0" - }; +// Singleton class +var TinyMCE_TemplatePlugin = { + /** + * Returns information about the plugin as a name/value array. + * The current keys are longname, author, authorurl, infourl and version. + * + * @returns Name/value array containing information about the plugin. + * @type Array + */ + getInfo : function() { + return { + longname : 'Template plugin', + author : 'Your name', + authorurl : 'http://www.yoursite.com', + infourl : 'http://www.yoursite.com/docs/template.html', + version : "1.0" + }; + }, + + /** + * Gets executed when a TinyMCE editor instance is initialized. + * + * @param {TinyMCE_Control} Initialized TinyMCE editor control instance. + */ + initInstance : function(inst) { + // You can take out plugin specific parameters + alert("Initialization parameter:" + tinyMCE.getParam("template_someparam", false)); + + // Register custom keyboard shortcut + inst.addShortcut('ctrl', 't', 'lang_template_desc', 'mceTemplate'); + }, + + /** + * Returns the HTML code for a specific control or empty string if this plugin doesn't have that control. + * A control can be a button, select list or any other HTML item to present in the TinyMCE user interface. + * The variable {$editor_id} will be replaced with the current editor instance id and {$pluginurl} will be replaced + * with the URL of the plugin. Language variables such as {$lang_somekey} will also be replaced with contents from + * the language packs. + * + * @param {string} cn Editor control/button name to get HTML for. + * @return HTML code for a specific control or empty string. + * @type string + */ + getControlHTML : function(cn) { + switch (cn) { + case "template": + return tinyMCE.getButtonHTML(cn, 'lang_template_desc', '{$pluginurl}/images/template.gif', 'mceTemplate', true); + } + + return ""; + }, + + /** + * Executes a specific command, this function handles plugin commands. + * + * @param {string} editor_id TinyMCE editor instance id that issued the command. + * @param {HTMLElement} element Body or root element for the editor instance. + * @param {string} command Command name to be executed. + * @param {string} user_interface True/false if a user interface should be presented. + * @param {mixed} value Custom value argument, can be anything. + * @return true/false if the command was executed by this plugin or not. + * @type + */ + execCommand : function(editor_id, element, command, user_interface, value) { + // Handle commands + switch (command) { + // Remember to have the "mce" prefix for commands so they don't intersect with built in ones in the browser. + case "mceTemplate": + // Show UI/Popup + if (user_interface) { + // Open a popup window and send in some custom data in a window argument + var template = new Array(); + + template['file'] = '../../plugins/template/popup.htm'; // Relative to theme + template['width'] = 300; + template['height'] = 200; + + tinyMCE.openWindow(template, {editor_id : editor_id, some_custom_arg : "somecustomdata"}); + + // Let TinyMCE know that something was modified + tinyMCE.triggerNodeChange(false); + } else { + // Do a command this gets called from the template popup + alert("execCommand: mceTemplate gets called from popup."); + } + + return true; + } + + // Pass to next handler in chain + return false; + }, + + /** + * Gets called ones the cursor/selection in a TinyMCE instance changes. This is useful to enable/disable + * button controls depending on where the user are and what they have selected. This method gets executed + * alot and should be as performance tuned as possible. + * + * @param {string} editor_id TinyMCE editor instance id that was changed. + * @param {HTMLNode} node Current node location, where the cursor is in the DOM tree. + * @param {int} undo_index The current undo index, if this is -1 custom undo/redo is disabled. + * @param {int} undo_levels The current undo levels, if this is -1 custom undo/redo is disabled. + * @param {boolean} visual_aid Is visual aids enabled/disabled ex: dotted lines on tables. + * @param {boolean} any_selection Is there any selection at all or is there only a cursor. + */ + handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) { + // Select template button if parent node is a strong or b + if (node.parentNode.nodeName == "STRONG" || node.parentNode.nodeName == "B") { + tinyMCE.switchClass(editor_id + '_template', 'mceButtonSelected'); + return true; + } + + // Deselect template button + tinyMCE.switchClass(editor_id + '_template', 'mceButtonNormal'); + }, + + /** + * Gets called when a TinyMCE editor instance gets filled with content on startup. + * + * @param {string} editor_id TinyMCE editor instance id that was filled with content. + * @param {HTMLElement} body HTML body element of editor instance. + * @param {HTMLDocument} doc HTML document instance. + */ + setupContent : function(editor_id, body, doc) { + }, + + /** + * Gets called when the contents of a TinyMCE area is modified, in other words when a undo level is + * added. + * + * @param {TinyMCE_Control} inst TinyMCE editor area control instance that got modified. + */ + onChange : function(inst) { + }, + + /** + * Gets called when TinyMCE handles events such as keydown, mousedown etc. TinyMCE + * doesn't listen on all types of events so custom event handling may be required for + * some purposes. + * + * @param {Event} e HTML editor event reference. + * @return true - pass to next handler in chain, false - stop chain execution + * @type boolean + */ + handleEvent : function(e) { + // Display event type in statusbar + top.status = "template plugin event: " + e.type; + + return true; // Pass to next handler + }, + + /** + * Gets called when HTML contents is inserted or retrived from a TinyMCE editor instance. + * The type parameter contains what type of event that was performed and what format the content is in. + * Possible valuses for type is get_from_editor, insert_to_editor, get_from_editor_dom, insert_to_editor_dom. + * + * @param {string} type Cleanup event type. + * @param {mixed} content Editor contents that gets inserted/extracted can be a string or DOM element. + * @param {TinyMCE_Control} inst TinyMCE editor instance control that performes the cleanup. + * @return New content or the input content depending on action. + * @type string + */ + cleanup : function(type, content, inst) { + switch (type) { + case "get_from_editor": + alert("[FROM] Value HTML string: " + content); + + // Do custom cleanup code here + + break; + + case "insert_to_editor": + alert("[TO] Value HTML string: " + content); + + // Do custom cleanup code here + + break; + + case "get_from_editor_dom": + alert("[FROM] Value DOM Element " + content.innerHTML); + + // Do custom cleanup code here + + break; + + case "insert_to_editor_dom": + alert("[TO] Value DOM Element: " + content.innerHTML); + + // Do custom cleanup code here + + break; + } + + return content; + }, + + // Private plugin internal methods + + /** + * This is just a internal plugin method, prefix all internal methods with a _ character. + * The prefix is needed so they doesn't collide with future TinyMCE callback functions. + * + * @param {string} a Some arg1. + * @param {string} b Some arg2. + * @return Some return. + * @type string + */ + _someInternalFunction : function(a, b) { + return 1; + } }; -/** - * Gets executed when a editor instance is initialized - */ -function TinyMCE_template_initInstance(inst) { - // You can take out plugin specific parameters - alert("Initialization parameter:" + tinyMCE.getParam("template_someparam", false)); -} - -/** - * Gets executed when a editor needs to generate a button. - */ -function TinyMCE_template_getControlHTML(control_name) { - switch (control_name) { - case "template": - var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceTemplate\', true);return false;'; - return ''; - } - - return ""; -} - -/** - * Gets executed when a command is called. - */ -function TinyMCE_template_execCommand(editor_id, element, command, user_interface, value) { - // Handle commands - switch (command) { - // Remember to have the "mce" prefix for commands so they don't intersect with built in ones in the browser. - case "mceTemplate": - // Show UI/Popup - if (user_interface) { - // Open a popup window and send in some custom data in a window argument - var template = new Array(); - - template['file'] = '../../plugins/template/popup.htm'; // Relative to theme - template['width'] = 300; - template['height'] = 200; - - tinyMCE.openWindow(template, {editor_id : editor_id, some_custom_arg : "somecustomdata"}); - - // Let TinyMCE know that something was modified - tinyMCE.triggerNodeChange(false); - } else { - // Do a command this gets called from the template popup - alert("execCommand: mceTemplate gets called from popup."); - } - - return true; - } - - // Pass to next handler in chain - return false; -} - -/** - * Gets executed when the selection/cursor position was changed. - */ -function TinyMCE_template_handleNodeChange(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) { - // Deselect template button - tinyMCE.switchClassSticky(editor_id + '_template', 'mceButtonNormal'); - - // Select template button if parent node is a strong or b - if (node.parentNode.nodeName == "STRONG" || node.parentNode.nodeName == "B") - tinyMCE.switchClassSticky(editor_id + '_template', 'mceButtonSelected'); - - return true; -} - -/** - * Gets executed when contents is inserted / retrived. - */ -function TinyMCE_template_cleanup(type, content) { - switch (type) { - case "get_from_editor": - alert("[FROM] Value HTML string: " + content); - - // Do custom cleanup code here - - break; - - case "insert_to_editor": - alert("[TO] Value HTML string: " + content); - - // Do custom cleanup code here - - break; - - case "get_from_editor_dom": - alert("[FROM] Value DOM Element " + content.innerHTML); - - // Do custom cleanup code here - - break; - - case "insert_to_editor_dom": - alert("[TO] Value DOM Element: " + content.innerHTML); - - // Do custom cleanup code here - - break; - } - - return content; -} +// Adds the plugin class to the list of available TinyMCE plugins +tinyMCE.addPlugin("template", TinyMCE_TemplatePlugin); diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/_template/langs/zh_cn.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/_template/langs/zh_cn.js index 50f83ede4..d64baf4f4 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/_template/langs/zh_cn.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/_template/langs/zh_cn.js @@ -1,4 +1,5 @@ -// Simplified Chinese lang variables contributed by tom_cat (thomaswangyang@gmail.com) +// Simplified Chinese lang variables contributed by TinyMCE_China_Team ( tinymce_china {AT} yahoogroups {DOT} com ). +// visit our homepage at: http://www.cube316.net/tinymce/ for more information. /* Remember to namespace the language parameters _ */ diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advhr/editor_plugin.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advhr/editor_plugin.js index cb3209214..b9843beb0 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advhr/editor_plugin.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advhr/editor_plugin.js @@ -1 +1 @@ -tinyMCE.importPluginLanguagePack('advhr','en,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,es,cy,is,zh_tw,zh_tw_utf8,sk');function TinyMCE_advhr_getInfo(){return{longname:'Advanced HR',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_advhr.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};};function TinyMCE_advhr_getControlHTML(control_name){switch(control_name){case "advhr":var cmd='tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceAdvancedHr\');return false;';return '';}return "";}function TinyMCE_advhr_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mceAdvancedHr":var template=new Array();template['file']='../../plugins/advhr/rule.htm';template['width']=270;template['height']=180;template['width']+=tinyMCE.getLang('lang_advhr_delta_width',0);template['height']+=tinyMCE.getLang('lang_advhr_delta_height',0);var size="",width="",noshade="";if(tinyMCE.selectedElement!=null&&tinyMCE.selectedElement.nodeName.toLowerCase()=="hr"){tinyMCE.hrElement=tinyMCE.selectedElement;if(tinyMCE.hrElement){size=tinyMCE.hrElement.getAttribute('size')?tinyMCE.hrElement.getAttribute('size'):"";width=tinyMCE.hrElement.getAttribute('width')?tinyMCE.hrElement.getAttribute('width'):"";noshade=tinyMCE.hrElement.getAttribute('noshade')?tinyMCE.hrElement.getAttribute('noshade'):"";}tinyMCE.openWindow(template,{editor_id:editor_id,size:size,width:width,noshade:noshade,mceDo:'update'});}else{if(tinyMCE.isMSIE){tinyMCE.execInstanceCommand(editor_id,'mceInsertContent',false,'
    ');}else{tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes",size:size,width:width,noshade:noshade,mceDo:'insert'});}}return true;}return false;}function TinyMCE_advhr_handleNodeChange(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){tinyMCE.switchClassSticky(editor_id+'_advhr','mceButtonNormal');if(node==null)return;do{if(node.nodeName.toLowerCase()=="hr")tinyMCE.switchClassSticky(editor_id+'_advhr','mceButtonSelected');}while((node=node.parentNode));return true;} \ No newline at end of file +tinyMCE.importPluginLanguagePack('advhr','en,tr,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,es,cy,is,zh_tw,zh_tw_utf8,sk');var TinyMCE_AdvancedHRPlugin={getInfo:function(){return{longname:'Advanced HR',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_advhr.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},getControlHTML:function(cn){switch(cn){case"advhr":return tinyMCE.getButtonHTML(cn,'lang_insert_advhr_desc','{$pluginurl}/images/advhr.gif','mceAdvancedHr');}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceAdvancedHr":var template=new Array();template['file']='../../plugins/advhr/rule.htm';template['width']=250;template['height']=160;template['width']+=tinyMCE.getLang('lang_advhr_delta_width',0);template['height']+=tinyMCE.getLang('lang_advhr_delta_height',0);var size="",width="",noshade="";if(tinyMCE.selectedElement!=null&&tinyMCE.selectedElement.nodeName.toLowerCase()=="hr"){tinyMCE.hrElement=tinyMCE.selectedElement;if(tinyMCE.hrElement){size=tinyMCE.hrElement.getAttribute('size')?tinyMCE.hrElement.getAttribute('size'):"";width=tinyMCE.hrElement.getAttribute('width')?tinyMCE.hrElement.getAttribute('width'):"";noshade=tinyMCE.hrElement.getAttribute('noshade')?tinyMCE.hrElement.getAttribute('noshade'):"";}tinyMCE.openWindow(template,{editor_id:editor_id,size:size,width:width,noshade:noshade,mceDo:'update'});}else{if(tinyMCE.isMSIE){tinyMCE.execInstanceCommand(editor_id,'mceInsertContent',false,'
    ');}else{tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes",size:size,width:width,noshade:noshade,mceDo:'insert'});}}return true;}return false;},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){if(node==null)return;do{if(node.nodeName=="HR"){tinyMCE.switchClass(editor_id+'_advhr','mceButtonSelected');return true;}}while((node=node.parentNode));tinyMCE.switchClass(editor_id+'_advhr','mceButtonNormal');return true;}};tinyMCE.addPlugin("advhr",TinyMCE_AdvancedHRPlugin); \ No newline at end of file diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advhr/editor_plugin_src.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advhr/editor_plugin_src.js index b18afa578..5cce97c2c 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advhr/editor_plugin_src.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advhr/editor_plugin_src.js @@ -1,75 +1,92 @@ -/* Import plugin specific language pack */ -tinyMCE.importPluginLanguagePack('advhr', 'en,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,es,cy,is,zh_tw,zh_tw_utf8,sk'); +/** + * $RCSfile: editor_plugin_src.js,v $ + * $Revision: 1.19 $ + * $Date: 2006/02/10 16:29:37 $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved. + */ -function TinyMCE_advhr_getInfo() { - return { - longname : 'Advanced HR', - author : 'Moxiecode Systems', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_advhr.html', - version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion - }; +/* Import plugin specific language pack */ +tinyMCE.importPluginLanguagePack('advhr', 'en,tr,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,es,cy,is,zh_tw,zh_tw_utf8,sk'); + +var TinyMCE_AdvancedHRPlugin = { + getInfo : function() { + return { + longname : 'Advanced HR', + author : 'Moxiecode Systems', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_advhr.html', + version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion + } + }, + + getControlHTML : function(cn) { + switch (cn) { + case "advhr": + return tinyMCE.getButtonHTML(cn, 'lang_insert_advhr_desc', '{$pluginurl}/images/advhr.gif', 'mceAdvancedHr'); + } + + return ""; + }, + + /** + * Executes the mceAdvanceHr command. + */ + execCommand : function(editor_id, element, command, user_interface, value) { + // Handle commands + switch (command) { + case "mceAdvancedHr": + var template = new Array(); + + template['file'] = '../../plugins/advhr/rule.htm'; // Relative to theme + template['width'] = 250; + template['height'] = 160; + + template['width'] += tinyMCE.getLang('lang_advhr_delta_width', 0); + template['height'] += tinyMCE.getLang('lang_advhr_delta_height', 0); + + var size = "", width = "", noshade = ""; + if (tinyMCE.selectedElement != null && tinyMCE.selectedElement.nodeName.toLowerCase() == "hr") { + tinyMCE.hrElement = tinyMCE.selectedElement; + + if (tinyMCE.hrElement) { + size = tinyMCE.hrElement.getAttribute('size') ? tinyMCE.hrElement.getAttribute('size') : ""; + width = tinyMCE.hrElement.getAttribute('width') ? tinyMCE.hrElement.getAttribute('width') : ""; + noshade = tinyMCE.hrElement.getAttribute('noshade') ? tinyMCE.hrElement.getAttribute('noshade') : ""; + } + + tinyMCE.openWindow(template, {editor_id : editor_id, size : size, width : width, noshade : noshade, mceDo : 'update'}); + } else { + if (tinyMCE.isMSIE) { + tinyMCE.execInstanceCommand(editor_id, 'mceInsertContent', false,'
    '); + } else { + tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes", size : size, width : width, noshade : noshade, mceDo : 'insert'}); + } + } + + return true; + } + + // Pass to next handler in chain + return false; + }, + + handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) { + if (node == null) + return; + + do { + if (node.nodeName == "HR") { + tinyMCE.switchClass(editor_id + '_advhr', 'mceButtonSelected'); + return true; + } + } while ((node = node.parentNode)); + + tinyMCE.switchClass(editor_id + '_advhr', 'mceButtonNormal'); + + return true; + } }; -function TinyMCE_advhr_getControlHTML(control_name) { - switch (control_name) { - case "advhr": - var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceAdvancedHr\');return false;'; - return ''; - } - - return ""; -} - -/** - * Executes the mceAdvanceHr command. - */ -function TinyMCE_advhr_execCommand(editor_id, element, command, user_interface, value) { - // Handle commands - switch (command) { - case "mceAdvancedHr": - var template = new Array(); - - template['file'] = '../../plugins/advhr/rule.htm'; // Relative to theme - template['width'] = 270; - template['height'] = 180; - - template['width'] += tinyMCE.getLang('lang_advhr_delta_width', 0); - template['height'] += tinyMCE.getLang('lang_advhr_delta_height', 0); - - var size = "", width = "", noshade = ""; - if (tinyMCE.selectedElement != null && tinyMCE.selectedElement.nodeName.toLowerCase() == "hr"){ - tinyMCE.hrElement = tinyMCE.selectedElement; - if (tinyMCE.hrElement) { - size = tinyMCE.hrElement.getAttribute('size') ? tinyMCE.hrElement.getAttribute('size') : ""; - width = tinyMCE.hrElement.getAttribute('width') ? tinyMCE.hrElement.getAttribute('width') : ""; - noshade = tinyMCE.hrElement.getAttribute('noshade') ? tinyMCE.hrElement.getAttribute('noshade') : ""; - } - tinyMCE.openWindow(template, {editor_id : editor_id, size : size, width : width, noshade : noshade, mceDo : 'update'}); - } else { - if (tinyMCE.isMSIE) { - tinyMCE.execInstanceCommand(editor_id, 'mceInsertContent', false,'
    '); - } else { - tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes", size : size, width : width, noshade : noshade, mceDo : 'insert'}); - } - } - - return true; - } - // Pass to next handler in chain - return false; -} - -function TinyMCE_advhr_handleNodeChange(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) { - tinyMCE.switchClassSticky(editor_id + '_advhr', 'mceButtonNormal'); - - if (node == null) - return; - - do { - if (node.nodeName.toLowerCase() == "hr") - tinyMCE.switchClassSticky(editor_id + '_advhr', 'mceButtonSelected'); - } while ((node = node.parentNode)); - - return true; -} \ No newline at end of file +tinyMCE.addPlugin("advhr", TinyMCE_AdvancedHRPlugin); diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advhr/jscripts/rule.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advhr/jscripts/rule.js index a75a6dfa8..b64c13399 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advhr/jscripts/rule.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advhr/jscripts/rule.js @@ -2,7 +2,7 @@ function init() { var formObj = document.forms[0]; formObj.width.value = tinyMCE.getWindowArg('width'); formObj.size.value = tinyMCE.getWindowArg('size'); - formObj.insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('mceDo')); + formObj.insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('mceDo'),'Insert',true); if (tinyMCE.getWindowArg('noshade')) { formObj.noshade.checked = true; } diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advhr/langs/cs.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advhr/langs/cs.js index e33df89d1..4508c1a70 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advhr/langs/cs.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advhr/langs/cs.js @@ -2,7 +2,7 @@ * Czech lang variables * encoding: utf-8 * - * $Id: cs.js,v 1.4 2005/10/18 13:59:21 spocke Exp $ + * $Id: cs.js,v 1.5 2006/01/11 14:25:47 spocke Exp $ */ tinyMCE.addToLang('',{ diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advhr/langs/da.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advhr/langs/da.js index 5bce9e677..6f09c18a2 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advhr/langs/da.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advhr/langs/da.js @@ -1,8 +1,8 @@ -// DK lang variables contributed by Jan Moelgaard +// DK lang variables contributed by Jan Moelgaard, John Dalsgaard and Bo Frederiksen. tinyMCE.addToLang('',{ -insert_advhr_desc : 'Indsæt / rediger horisontal bjælke', +insert_advhr_desc : 'Indsæt / rediger horisontal linie', insert_advhr_width : 'Bredde', -insert_advhr_size : 'Højde', +insert_advhr_size : 'Højde', insert_advhr_noshade : 'Ingen skygge' }); diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advhr/langs/en.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advhr/langs/en.js index 7c23b39ec..819476478 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advhr/langs/en.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advhr/langs/en.js @@ -1,7 +1,7 @@ // UK lang variables tinyMCE.addToLang('',{ -insert_advhr_desc : 'Insert / edit Horizontale Rule', +insert_advhr_desc : 'Horizontale rule', insert_advhr_width : 'Width', insert_advhr_size : 'Height', insert_advhr_noshade : 'No shadow' diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advhr/langs/zh_cn.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advhr/langs/zh_cn.js index b9ee54594..97943ce4f 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advhr/langs/zh_cn.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advhr/langs/zh_cn.js @@ -1,4 +1,5 @@ -// Simplified Chinese lang variables contributed by tom_cat (thomaswangyang@gmail.com) +// Simplified Chinese lang variables contributed by TinyMCE_China_Team ( tinymce_china {AT} yahoogroups {DOT} com ). +// visit our homepage at: http://www.cube316.net/tinymce/ for more information. tinyMCE.addToLang('',{ insert_advhr_desc : '²åÈë/±à¼­ ˮƽ±ê³ß', diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advhr/rule.htm b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advhr/rule.htm index 0e711b41a..6f6034d39 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advhr/rule.htm +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advhr/rule.htm @@ -1,40 +1,36 @@ - {$lang_insert_link_title} + {$lang_insert_advhr_desc} - + + -
    - - - - -
    + + + +
    +
    +
    - - - - + - - + - + - - - - -
    {$lang_insert_advhr_desc}
    {$lang_insert_advhr_width}: - - +
    {$lang_insert_advhr_size}:
    -
    + +
    +
    + +
    +
    + +
    + +
    + +
    +
    + diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advimage/css/advimage.css b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advimage/css/advimage.css index f05e376bd..abf4405d3 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advimage/css/advimage.css +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advimage/css/advimage.css @@ -17,7 +17,7 @@ } .checkbox { - border: 0px; + border: 0; } .panel_wrapper div.current { @@ -25,11 +25,11 @@ } #prev { - margin:0px; + margin: 0; border: 1px solid black; width: 99%; - height:150px; + height: 150px; overflow: auto; } diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advimage/editor_plugin.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advimage/editor_plugin.js index 3c81a74f2..0061bc464 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advimage/editor_plugin.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advimage/editor_plugin.js @@ -1 +1 @@ -tinyMCE.importPluginLanguagePack('advimage','en,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,cy,es,is,zh_tw,zh_tw_utf8,sk');function TinyMCE_advimage_getInfo(){return{longname:'Advanced image',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_advimage.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};};function TinyMCE_advimage_getControlHTML(control_name){switch(control_name){case "image":var cmd='tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceAdvImage\');return false;';return '';}return "";}function TinyMCE_advimage_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mceAdvImage":var template=new Array();template['file']='../../plugins/advimage/image.htm';template['width']=480;template['height']=380;template['width']+=tinyMCE.getLang('lang_advimage_delta_width',0);template['height']+=tinyMCE.getLang('lang_advimage_delta_height',0);var inst=tinyMCE.getInstanceById(editor_id);var elm=inst.getFocusElement();if(elm!=null&&tinyMCE.getAttrib(elm,'class').indexOf('mceItem')!=-1)return true;tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});return true;}return false;}function TinyMCE_advimage_cleanup(type,content){switch(type){case "insert_to_editor_dom":var imgs=content.getElementsByTagName("img");for(var i=0;i'; - } - - return ""; -} - -function TinyMCE_advimage_execCommand(editor_id, element, command, user_interface, value) { - switch (command) { - case "mceAdvImage": - var template = new Array(); - - template['file'] = '../../plugins/advimage/image.htm'; - template['width'] = 480; - template['height'] = 380; - - // Language specific width and height addons - template['width'] += tinyMCE.getLang('lang_advimage_delta_width', 0); - template['height'] += tinyMCE.getLang('lang_advimage_delta_height', 0); - - var inst = tinyMCE.getInstanceById(editor_id); - var elm = inst.getFocusElement(); - - if (elm != null && tinyMCE.getAttrib(elm, 'class').indexOf('mceItem') != -1) - return true; - - tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"}); - - return true; - } - - return false; -} - -function TinyMCE_advimage_cleanup(type, content) { - switch (type) { - case "insert_to_editor_dom": - var imgs = content.getElementsByTagName("img"); - for (var i=0; i/g, '&gr;'); + value = value.replace(/>/g, '>'); return ' ' + attrib + '="' + value + '"'; } diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advimage/langs/cs.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advimage/langs/cs.js index 9dd373d09..155efb62b 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advimage/langs/cs.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advimage/langs/cs.js @@ -1,8 +1,33 @@ -// UK lang variables +/** + * Czech lang variables + * encoding: utf-8 + * + * $Id: cs.js,v 1.4 2006/01/11 14:25:47 spocke Exp $ + */ -tinyMCE.addToLang('',{ -insert_image_alt2 : 'Název obrázku', -insert_image_onmousemove : 'Alternativní obrázek', -insert_image_mouseover : 'pøi najetí myši', -insert_image_mouseout : 'pøi odjetí myši' +tinyMCE.addToLang('advimage',{ +tab_general : 'Obecné', +tab_appearance : 'Vzhled', +tab_advanced : 'PokroÄilé', +general : 'Obecné', +title : 'Titulek', +preview : 'Náhled', +constrain_proportions : 'Zachovat rozmÄ›ry', +langdir : 'SmÄ›r textu', +langcode : 'Kód jazyka', +long_desc : 'Dlouhý popis odkazu', +style : 'Styl', +classes : 'Třídy', +ltr : 'Z leva doprava', +rtl : 'Z prava doleva', +id : 'Id', +image_map : 'Obrázková mapa', +swap_image : 'PÅ™epnout obrázek', +alt_image : 'Alternativní obrázek', +mouseover : 'pro pÅ™ejetí myší', +mouseout : 'pro odjetí myší', +misc : 'Různé', +example_img : 'Vzhled náhled obrázek', +missing_alt : 'Jste si jistý(á), že chcete pokraÄovat bez vyplnÄ›ní popisu obrázku? Bez popisu může být obrázek nepřístupný handicapovaným uživatelům, nebo tÄ›m kteří používají textový prohlížeÄ, nebo prohlíží stránky s vypnutým obrázky.' }); + diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advimage/langs/da.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advimage/langs/da.js index acd488b21..a9c4b0016 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advimage/langs/da.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advimage/langs/da.js @@ -1,4 +1,4 @@ -// DK lang variables contributed by Jan Moelgaard +// DK lang variables contributed by Jan Moelgaard, John Dalsgaard and Bo Frederiksen. tinyMCE.addToLang('advimage',{ tab_general : 'Generelt', @@ -13,8 +13,8 @@ langcode : 'Sprogkode', long_desc : 'Langt beskrivelseslink', style : 'Style', classes : 'Klasser', -ltr : 'Venstre til højre', -rtl : 'Højre til venstre', +ltr : 'Venstre til højre', +rtl : 'Højre til venstre', id : 'Id', image_map : 'Billedkort', swap_image : 'Alternativt billede', @@ -22,5 +22,6 @@ alt_image : 'Alternative image', mouseover : 'ved mouse over', mouseout : 'ved mouse out', misc : 'Diverse', -example_img : 'Appearance preview image' +example_img : 'Appearance preview image', +missing_alt : 'Er du sikker på at du vil fortsætte uden at indsætte en billedbeskrivelse? Uden den, kan billedet være utilgængeligt for brugere med handicap, eller for brugere med en tekst-browser, eller som har slået billedvisning fra.' }); diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advimage/langs/fr.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advimage/langs/fr.js index 5adc8162e..833656482 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advimage/langs/fr.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advimage/langs/fr.js @@ -1,47 +1,27 @@ -// French lang variables by Laurent Dran -// Modifié par Normand Lamoureux le 2005-11-12 +// Modifier par Mathieu Gautheret -tinyMCE.addToLang('advlink',{ -general_tab : 'Général', -popup_tab : 'Pop-up', -events_tab : 'Événements', -advanced_tab : 'Avancé', -general_props : 'Propriétés générales', -popup_props : 'Propriétés du pop-up', -event_props : 'Événements', -advanced_props : 'Propriétés avancées', -popup_opts : 'Options', -anchor_names : 'Ancres', -target_same : 'Ovrir dans la même fenêtre/cadre', -target_parent : 'Ouvrir dans la fenêtre/cadre parent', -target_top : 'Ouvrir dans la fenêtre principale', -target_blank : 'Ouvrir dans une nouvelle fenêtre', -popup : 'Pop-up Javascript', -popup_url : 'URL du pop-up', -popup_name : 'Nom de la fenêtre', -popup_return : 'Insérer \'return false;\'', -popup_scrollbars : 'Montrer les barres de défilement', -popup_statusbar : 'Montrer la barre de statut', -popup_toolbar : 'Montrer la barre d\'outils', -popup_menubar : 'Montrer la barre de menus', -popup_location : 'Montrer la barre de titre', -popup_resizable : 'Permettre le redimensionnement', -popup_dependent : 'Dépendent (Mozilla/Firefox seulement)', -popup_size : 'Taille', -popup_position : 'Position (X/Y)', -id : 'Id', -style: 'Style en ligne', -classes : 'Classe CSS', -target_name : 'Nom de la cible', +tinyMCE.addToLang('advimage',{ +tab_general : 'Générale', +tab_appearance : 'Apparence', +tab_advanced : 'Avancée', +general : 'Générale', +title : 'Titre', +preview : 'Prévisualisation', +constrain_proportions : 'Conserver les proportions', langdir : 'Sens d\'écriture', -target_langcode : 'Code de langue de la cible', langcode : 'Code de langue du libellé', -encoding : 'Encodage de la cible', -mime : 'Type MIME de la cible', -rel : 'Relation de la page vers la cible', -rev : 'Relation de la cible vers la page', -tabindex : 'Attribut tabindex', -accesskey : 'Attribut accesskey', -ltr : 'Vers la droite', -rtl : 'Vers la gauche' -}); +long_desc : 'Description du lien', +style : 'Style', +classes : 'Classes', +ltr : 'De gauche à droite', +rtl : 'De droite à gauche', +id : 'Id', +image_map : 'Image map', +swap_image : 'Image d\'échange', +alt_image : 'Image alternative', +mouseover : 'Quand le pointeur est au dessus', +mouseout : 'Quand le pointeur est en dehors', +misc : 'Divers', +example_img : 'Apparence prévisualisation image', +missing_alt : 'Etes vous sur de vouloir continuer sans inclure une description de l\'image. Cette description est utile pour les utilisateurs ne pouvant pas afficher les images ou les ayant désactivées.' +}); \ No newline at end of file diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advimage/langs/zh_cn.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advimage/langs/zh_cn.js index 43e5818e6..41c6c57c3 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advimage/langs/zh_cn.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advimage/langs/zh_cn.js @@ -1,4 +1,5 @@ -// Simplified Chinese lang variables contributed by tom_cat (thomaswangyang@gmail.com) +// Simplified Chinese lang variables contributed by TinyMCE_China_Team ( tinymce_china {AT} yahoogroups {DOT} com ). +// visit our homepage at: http://www.cube316.net/tinymce/ for more information. tinyMCE.addToLang('advimage',{ tab_general : 'Ò»°ã', @@ -22,6 +23,6 @@ alt_image : ' mouseover : 'Êó±êÔÚÉÏÃæÊ±', mouseout : 'Êó±êÀ뿪ʱ', misc : 'ÔÓÏî', -example_img : 'Appearance preview image', +example_img : 'ÏÔʾ Ô¤ÀÀ Í¼Æ¬', missing_alt : 'ÄúÈ·ÈÏÒªÔÚûÓÐͼƬ˵Ã÷µÄÇé¿öϼÌÐøÂ𣿠ÕâÑùÆäËû¹Ø±ÕͼƬä¯ÀÀµÄÓû§½«ÎÞ·¨×¢Òâµ½ÄãÔÚÕâÀïÓÐͼƬ¡£' }); diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advlink/editor_plugin.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advlink/editor_plugin.js index 9e2047bdc..bf1db5632 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advlink/editor_plugin.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advlink/editor_plugin.js @@ -1 +1 @@ -tinyMCE.importPluginLanguagePack('advlink','en,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,cy,es,is,zh_tw,zh_tw_utf8,sk');function TinyMCE_advlink_getInfo(){return{longname:'Advanced link',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_advlink.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};};function TinyMCE_advlink_getControlHTML(control_name){switch(control_name){case "link":var cmd='tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceAdvLink\');return false;';return '';}return "";}function TinyMCE_advlink_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mceAdvLink":var anySelection=false;var inst=tinyMCE.getInstanceById(editor_id);var focusElm=inst.getFocusElement();if(tinyMCE.selectedElement)anySelection=(tinyMCE.selectedElement.nodeName.toLowerCase()=="img")||(selectedText&&selectedText.length>0);if(anySelection||(focusElm!=null&&focusElm.nodeName=="A")){var template=new Array();template['file']='../../plugins/advlink/link.htm';template['width']=480;template['height']=400;template['width']+=tinyMCE.getLang('lang_advlink_delta_width',0);template['height']+=tinyMCE.getLang('lang_advlink_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});}return true;}return false;}function TinyMCE_advlink_handleNodeChange(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){tinyMCE.switchClassSticky(editor_id+'_advlink','mceButtonDisabled',true);if(node==null)return;if(any_selection)tinyMCE.switchClassSticky(editor_id+'_advlink','mceButtonNormal',false);do{if(node.nodeName=="A"&&tinyMCE.getAttrib(node,'href')!="")tinyMCE.switchClassSticky(editor_id+'_advlink','mceButtonSelected',false);}while((node=node.parentNode));return true;} \ No newline at end of file +tinyMCE.importPluginLanguagePack('advlink','en,tr,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,cy,es,is,zh_tw,zh_tw_utf8,sk,da');var TinyMCE_AdvancedLinkPlugin={getInfo:function(){return{longname:'Advanced link',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_advlink.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},initInstance:function(inst){inst.addShortcut('ctrl','k','lang_advlink_desc','mceAdvLink');},getControlHTML:function(cn){switch(cn){case"link":return tinyMCE.getButtonHTML(cn,'lang_link_desc','{$themeurl}/images/link.gif','mceAdvLink');}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceAdvLink":var anySelection=false;var inst=tinyMCE.getInstanceById(editor_id);var focusElm=inst.getFocusElement();var selectedText=inst.selection.getSelectedText();if(tinyMCE.selectedElement)anySelection=(tinyMCE.selectedElement.nodeName.toLowerCase()=="img")||(selectedText&&selectedText.length>0);if(anySelection||(focusElm!=null&&focusElm.nodeName=="A")){var template=new Array();template['file']='../../plugins/advlink/link.htm';template['width']=480;template['height']=400;template['width']+=tinyMCE.getLang('lang_advlink_delta_width',0);template['height']+=tinyMCE.getLang('lang_advlink_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});}return true;}return false;},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){if(node==null)return;do{if(node.nodeName=="A"&&tinyMCE.getAttrib(node,'href')!=""){tinyMCE.switchClass(editor_id+'_advlink','mceButtonSelected');return true;}}while((node=node.parentNode));if(any_selection){tinyMCE.switchClass(editor_id+'_advlink','mceButtonNormal');return true;}tinyMCE.switchClass(editor_id+'_advlink','mceButtonDisabled');return true;}};tinyMCE.addPlugin("advlink",TinyMCE_AdvancedLinkPlugin); \ No newline at end of file diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advlink/editor_plugin_src.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advlink/editor_plugin_src.js index 77aecb90b..7fd4f07ce 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advlink/editor_plugin_src.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advlink/editor_plugin_src.js @@ -1,69 +1,90 @@ -/* Import plugin specific language pack */ -tinyMCE.importPluginLanguagePack('advlink', 'en,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,cy,es,is,zh_tw,zh_tw_utf8,sk'); +/** + * $RCSfile: editor_plugin_src.js,v $ + * $Revision: 1.24 $ + * $Date: 2006/02/10 16:29:38 $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved. + */ -function TinyMCE_advlink_getInfo() { - return { - longname : 'Advanced link', - author : 'Moxiecode Systems', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_advlink.html', - version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion - }; +/* Import plugin specific language pack */ +tinyMCE.importPluginLanguagePack('advlink', 'en,tr,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,cy,es,is,zh_tw,zh_tw_utf8,sk,da'); + +var TinyMCE_AdvancedLinkPlugin = { + getInfo : function() { + return { + longname : 'Advanced link', + author : 'Moxiecode Systems', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_advlink.html', + version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion + }; + }, + + initInstance : function(inst) { + inst.addShortcut('ctrl', 'k', 'lang_advlink_desc', 'mceAdvLink'); + }, + + getControlHTML : function(cn) { + switch (cn) { + case "link": + return tinyMCE.getButtonHTML(cn, 'lang_link_desc', '{$themeurl}/images/link.gif', 'mceAdvLink'); + } + + return ""; + }, + + execCommand : function(editor_id, element, command, user_interface, value) { + switch (command) { + case "mceAdvLink": + var anySelection = false; + var inst = tinyMCE.getInstanceById(editor_id); + var focusElm = inst.getFocusElement(); + var selectedText = inst.selection.getSelectedText(); + + if (tinyMCE.selectedElement) + anySelection = (tinyMCE.selectedElement.nodeName.toLowerCase() == "img") || (selectedText && selectedText.length > 0); + + if (anySelection || (focusElm != null && focusElm.nodeName == "A")) { + var template = new Array(); + + template['file'] = '../../plugins/advlink/link.htm'; + template['width'] = 480; + template['height'] = 400; + + // Language specific width and height addons + template['width'] += tinyMCE.getLang('lang_advlink_delta_width', 0); + template['height'] += tinyMCE.getLang('lang_advlink_delta_height', 0); + + tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"}); + } + + return true; + } + + return false; + }, + + handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) { + if (node == null) + return; + + do { + if (node.nodeName == "A" && tinyMCE.getAttrib(node, 'href') != "") { + tinyMCE.switchClass(editor_id + '_advlink', 'mceButtonSelected'); + return true; + } + } while ((node = node.parentNode)); + + if (any_selection) { + tinyMCE.switchClass(editor_id + '_advlink', 'mceButtonNormal'); + return true; + } + + tinyMCE.switchClass(editor_id + '_advlink', 'mceButtonDisabled'); + + return true; + } }; -function TinyMCE_advlink_getControlHTML(control_name) { - switch (control_name) { - case "link": - var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceAdvLink\');return false;'; - return ''; - } - - return ""; -} - -function TinyMCE_advlink_execCommand(editor_id, element, command, user_interface, value) { - switch (command) { - case "mceAdvLink": - var anySelection = false; - var inst = tinyMCE.getInstanceById(editor_id); - var focusElm = inst.getFocusElement(); - - if (tinyMCE.selectedElement) - anySelection = (tinyMCE.selectedElement.nodeName.toLowerCase() == "img") || (selectedText && selectedText.length > 0); - - if (anySelection || (focusElm != null && focusElm.nodeName == "A")) { - var template = new Array(); - - template['file'] = '../../plugins/advlink/link.htm'; - template['width'] = 480; - template['height'] = 400; - - // Language specific width and height addons - template['width'] += tinyMCE.getLang('lang_advlink_delta_width', 0); - template['height'] += tinyMCE.getLang('lang_advlink_delta_height', 0); - - tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"}); - } - - return true; - } - - return false; -} - -function TinyMCE_advlink_handleNodeChange(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) { - tinyMCE.switchClassSticky(editor_id + '_advlink', 'mceButtonDisabled', true); - - if (node == null) - return; - - if (any_selection) - tinyMCE.switchClassSticky(editor_id + '_advlink', 'mceButtonNormal', false); - - do { - if (node.nodeName == "A" && tinyMCE.getAttrib(node, 'href') != "") - tinyMCE.switchClassSticky(editor_id + '_advlink', 'mceButtonSelected', false); - } while ((node = node.parentNode)); - - return true; -} +tinyMCE.addPlugin("advlink", TinyMCE_AdvancedLinkPlugin); diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advlink/jscripts/functions.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advlink/jscripts/functions.js index 538ad6a06..58a2c9e98 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advlink/jscripts/functions.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advlink/jscripts/functions.js @@ -146,7 +146,8 @@ function parseWindowOpen(onclick) { if (onclick.indexOf('return false;') != -1) { formObj.popupreturn.checked = true; onclick = onclick.replace('return false;', ''); - } + } else + formObj.popupreturn.checked = false; var onClickData = parseLink(onclick); @@ -355,6 +356,9 @@ function buildOnClick() { // tinyMCE.debug(onclick); formObj.onclick.value = onclick; + + if (formObj.href.value == "") + formObj.href.value = url; } function setAttrib(elm, attrib, value) { @@ -416,7 +420,7 @@ function insertAction() { // Create new anchor elements if (elm == null) { if (tinyMCE.isSafari) - tinyMCEPopup.execCommand("mceInsertContent", false, '' + inst.getSelectedHTML() + ''); + tinyMCEPopup.execCommand("mceInsertContent", false, '' + inst.selection.getSelectedHTML() + ''); else tinyMCEPopup.execCommand("createlink", false, "#mce_temp_url#"); @@ -460,7 +464,7 @@ function setAllAttribs(elm) { var target = getSelectValue(formObj, 'targetlist'); // Make anchors absolute - if (href.charAt(0) == '#') + if (href.charAt(0) == '#' && tinyMCE.getParam('convert_urls')) href = tinyMCE.settings['document_base_url'] + href; setAttrib(elm, 'href', convertURL(href, elm)); diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advlink/langs/cs.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advlink/langs/cs.js index 586dce0b5..827623c61 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advlink/langs/cs.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advlink/langs/cs.js @@ -2,27 +2,50 @@ * Czech lang variables * encoding: utf-8 * - * $Id: cs.js,v 1.4 2005/10/18 13:59:42 spocke Exp $ + * $Id: cs.js,v 1.5 2006/01/11 14:25:47 spocke Exp $ */ -tinyMCE.addToLang('',{ -insert_link_target_same : 'Otevřít ve stejném oknÄ›/rámu', -insert_link_target_parent : 'Otevřít v rodiÄovském oknÄ›/rámu', -insert_link_target_top : 'Otevřít v nejvyšším rámu (pÅ™epíše vÅ¡echny rámy)', -insert_link_target_blank : 'Otevřít v novém oknÄ›', -insert_link_target_named : 'Otevřít v oknÄ›', -insert_link_popup : 'JS-Popup', -insert_link_popup_url : 'Popup URL', -insert_link_popup_name : 'Název okna', -insert_link_popup_return : 'Vložit \'return false\'', -insert_link_popup_scrollbars : 'Ukázat posuvníky', -insert_link_popup_statusbar : 'Ukázat stavový řádek', -insert_link_popup_toolbar : 'Ukázat ovládací liÅ¡tu', -insert_link_popup_menubar : 'Ukázat menu', -insert_link_popup_location : 'Ukázat liÅ¡tu umístÄ›ní', -insert_link_popup_resizable : 'PromÄ›nná velikost okna', -insert_link_popup_size : 'Velikost', -insert_link_popup_position : 'UmístÄ›ní (X/Y)', -insert_link_popup_missingtarget : 'Vložte název cíle nebo vyberte jinou volbu.' +tinyMCE.addToLang('advlink',{ +general_tab : 'Obecné', +popup_tab : 'Popup', +events_tab : 'Události', +advanced_tab : 'PokroÄilé', +general_props : 'Obecné vlastnosti', +popup_props : 'Popup vlastnosti', +event_props : 'Události', +advanced_props : 'Advanced properties', +popup_opts : 'Možnosti', +anchor_names : 'Anchors', +target_same : 'Otevřít v tomto oknÄ› / rámu', +target_parent : 'Otevřít v rodiÄovském oknÄ› / rámu', +target_top : 'Otevřít v hlavním rámci (nahradí vÅ¡echny rámce)', +target_blank : 'Otevřít v novém oknÄ›', +popup : 'Javascript popup', +popup_url : 'Popup URL', +popup_name : 'Jméno okna', +popup_return : 'Vložit \'return false\'', +popup_scrollbars : 'Zobrazit posuvníky', +popup_statusbar : 'Zobrazit stavový řádek', +popup_toolbar : 'Zobrazit nástrojovou liÅ¡tu', +popup_menubar : 'Zobrazit menu', +popup_location : 'Zobrazit pole s adresou', +popup_resizable : 'VytvoÅ™it okno, které jde zvÄ›tÅ¡ovat/zmenÅ¡ovat', +popup_dependent : 'Závisí (jen pro Mozilla/Firefox)', +popup_size : 'Velikost', +popup_position : 'Pozice (X/Y)', +id : 'Id', +style: 'Styl', +classes : 'Třídy', +target_name : 'Jméno cíle', +langdir : 'Jazykové nastavení', +target_langcode : 'Cílový jazyk', +langcode : 'Kód jazyka', +encoding : 'Cílové kódování znaků', +mime : 'Cílový MIME typ', +rel : 'Vztah stránky k cíli', +rev : 'Vztah cíle ke stránce', +tabindex : 'Tabulátor', +accesskey : 'Přístupové tlaÄítko', +ltr : 'Z leva doprava', +rtl : 'Z prava doleva' }); - diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advlink/langs/da.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advlink/langs/da.js index 511d40370..ed2cf9a69 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advlink/langs/da.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advlink/langs/da.js @@ -1,4 +1,4 @@ -// DK lang variables contributed by Jan Moelgaard +// DK lang variables contributed by Jan Moelgaard, John Dalsgaard and Bo Frederiksen. tinyMCE.addToLang('advlink',{ general_tab : 'Generelt', @@ -10,37 +10,37 @@ popup_props : 'Popup egenskaber', event_props : 'Events', advanced_props : 'Advancerede egenskaber', popup_opts : 'Valgmuligheder', -anchor_names : 'Bogmærker', -target_same : 'Åbn i samme vindue / ramme', -target_parent : 'Åbn i overordnet vindue / ramme', -target_top : 'Åbn i topramme (erstatter alle rammer)', -target_blank : 'Åbn i nyt vindue', +anchor_names : 'Bogmærker', +target_same : 'Åbn i samme vindue / ramme', +target_parent : 'Åbn i overordnet vindue / ramme', +target_top : 'Åbn i topramme (erstatter alle rammer)', +target_blank : 'Åbn i nyt vindue', popup : 'Javascript popup', popup_url : 'Popup adresse', popup_name : 'Winduets navn', -popup_return : 'Indsæt \'return false\'', +popup_return : 'Indsæt \'return false\'', popup_scrollbars : 'Vis scrollbar', popup_statusbar : 'Vis statuslinje', -popup_toolbar : 'Vis værktøjslinjer', +popup_toolbar : 'Vis værktøjslinjer', popup_menubar : 'Vis menulinje', popup_location : 'Vis adresse', -popup_resizable : 'Gør vinduet skalerbart', -popup_dependent : 'Afhængigt (kun ved Mozilla/Firefox)', -popup_size : 'Størrelse', +popup_resizable : 'Gør vinduet skalerbart', +popup_dependent : 'Afhængigt (kun ved Mozilla/Firefox)', +popup_size : 'Størrelse', popup_position : 'Placering (X/Y)', id : 'Id', style: 'Style', classes : 'Klasser', target_name : 'Target navn', -langdir : 'Sprogretning', target_langcode : 'Target sprog', +langdir : 'Sprogretning', langcode : 'Sprogkode', -encoding : 'Target karakterkode', +encoding : 'Target tegnkode', mime : 'Target MIME type', rel : 'Relation mellem side og target', rev : 'Relation mellem target og side', tabindex : 'Tabindex', -accesskey : 'Adgangsnøgle', -ltr : 'Venstre til højre', -rtl : 'Højre til venstre' +accesskey : 'Genvejstast', +ltr : 'Venstre til højre', +rtl : 'Højre til venstre' }); diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advlink/langs/nb.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advlink/langs/nb.js index 5528ada84..181c54571 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advlink/langs/nb.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advlink/langs/nb.js @@ -26,7 +26,7 @@ popup_menubar : 'Vis meny bar', popup_location : 'Vis location bar', popup_resizable : 'Gjør vinduet skalerbart', popup_dependent : 'Avhengig vindu (Bare i Mozilla/Firefox)', -popup_size : 'St&oring;rrelse', +popup_size : 'Størrelse', popup_position : 'Posisjon (X/Y)', id : 'Id', style: 'Stil', @@ -44,3 +44,4 @@ accesskey : 'Accesskey', ltr : 'Venstre mot høyre', rtl : 'Høyre mot venstre' }); + diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advlink/langs/nl.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advlink/langs/nl.js index 8d089ad12..d4819ed18 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advlink/langs/nl.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advlink/langs/nl.js @@ -1,6 +1,6 @@ // NL lang variables -tinyMCE.addToLang('',{ +tinyMCE.addToLang('advlink',{ general_tab : 'Algemeen', popup_tab : 'Popup', events_tab : 'Gebeurtenissen', diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advlink/langs/zh_cn.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advlink/langs/zh_cn.js index 9cd3de933..7c146946c 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advlink/langs/zh_cn.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advlink/langs/zh_cn.js @@ -1,4 +1,5 @@ -// Simplified Chinese lang variables contributed by tom_cat (thomaswangyang@gmail.com) +// Simplified Chinese lang variables contributed by TinyMCE_China_Team ( tinymce_china {AT} yahoogroups {DOT} com ). +// visit our homepage at: http://www.cube316.net/tinymce/ for more information. tinyMCE.addToLang('advlink',{ general_tab : 'Ò»°ã', @@ -40,7 +41,7 @@ mime : 'Ä¿ rel : 'Ò³ÓëÄ¿±êµÄ¹ØÏµ', rev : 'Ä¿±êÓëÒ³µÄ¹ØÏµ', tabindex : 'Tabindex', -accesskey : 'Accesskey', +accesskey : '¿ì½Ý¼ü', ltr : '´Ó×óµ½ÓÒ', rtl : '´ÓÓÒµ½×ó' }); diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advlink/link.htm b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advlink/link.htm index 2299ac808..afd04d7e1 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/advlink/link.htm +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/advlink/link.htm @@ -126,7 +126,7 @@ - + diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/autosave/editor_plugin.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/autosave/editor_plugin.js index cc0500858..f5d6857c7 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/autosave/editor_plugin.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/autosave/editor_plugin.js @@ -1 +1 @@ -tinyMCE.importPluginLanguagePack('autosave','en,sv,cs,he,nb,hu,de,da,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,pl,pt_br');function TinyMCE_autosave_getInfo(){return{longname:'Auto save',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_autosave.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};};function TinyMCE_autosave_beforeUnloadHandler(){var msg=tinyMCE.getLang("lang_autosave_unload_msg");var anyDirty=false;for(var n in tinyMCE.instances){var inst=tinyMCE.instances[n];if(!tinyMCE.isInstance(inst))continue;if(inst.isDirty())return msg;}return;}window.onbeforeunload=TinyMCE_autosave_beforeUnloadHandler; \ No newline at end of file +tinyMCE.importPluginLanguagePack('autosave','en,tr,sv,cs,he,nb,hu,de,da,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,pl,pt_br');var TinyMCE_AutoSavePlugin={getInfo:function(){return{longname:'Auto save',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_autosave.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},_beforeUnloadHandler:function(){var n,inst,anyDirty=false,msg=tinyMCE.getLang("lang_autosave_unload_msg");if(tinyMCE.getParam("fullscreen_is_enabled"))return;for(n in tinyMCE.instances){inst=tinyMCE.instances[n];if(!tinyMCE.isInstance(inst))continue;if(inst.isDirty())return msg;}return;}};window.onbeforeunload=TinyMCE_AutoSavePlugin._beforeUnloadHandler;tinyMCE.addPlugin("autosave",TinyMCE_AutoSavePlugin); \ No newline at end of file diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/autosave/editor_plugin_src.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/autosave/editor_plugin_src.js index 0cc8b32cd..4b88d2ecf 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/autosave/editor_plugin_src.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/autosave/editor_plugin_src.js @@ -1,30 +1,48 @@ -/* Import plugin specific language pack */ -tinyMCE.importPluginLanguagePack('autosave', 'en,sv,cs,he,nb,hu,de,da,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,pl,pt_br'); +/** + * $RCSfile: editor_plugin_src.js,v $ + * $Revision: 1.11 $ + * $Date: 2006/03/22 12:21:21 $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved. + */ -function TinyMCE_autosave_getInfo() { - return { - longname : 'Auto save', - author : 'Moxiecode Systems', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_autosave.html', - version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion - }; +/* Import plugin specific language pack */ +tinyMCE.importPluginLanguagePack('autosave', 'en,tr,sv,cs,he,nb,hu,de,da,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,pl,pt_br'); + +var TinyMCE_AutoSavePlugin = { + getInfo : function() { + return { + longname : 'Auto save', + author : 'Moxiecode Systems', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_autosave.html', + version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion + }; + }, + + // Private plugin internal methods + + _beforeUnloadHandler : function() { + var n, inst, anyDirty = false, msg = tinyMCE.getLang("lang_autosave_unload_msg"); + + if (tinyMCE.getParam("fullscreen_is_enabled")) + return; + + for (n in tinyMCE.instances) { + inst = tinyMCE.instances[n]; + + if (!tinyMCE.isInstance(inst)) + continue; + + if (inst.isDirty()) + return msg; + } + + return; + } }; -function TinyMCE_autosave_beforeUnloadHandler() { - var msg = tinyMCE.getLang("lang_autosave_unload_msg"); +window.onbeforeunload = TinyMCE_AutoSavePlugin._beforeUnloadHandler; - var anyDirty = false; - for (var n in tinyMCE.instances) { - var inst = tinyMCE.instances[n]; - if (!tinyMCE.isInstance(inst)) - continue; - - if (inst.isDirty()) - return msg; - } - - return; -} - -window.onbeforeunload = TinyMCE_autosave_beforeUnloadHandler; +tinyMCE.addPlugin("autosave", TinyMCE_AutoSavePlugin); diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/autosave/langs/cs.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/autosave/langs/cs.js index 8033482fd..c24637ca8 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/autosave/langs/cs.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/autosave/langs/cs.js @@ -2,7 +2,7 @@ * Czech lang variables * encoding: utf-8 * - * $Id: cs.js,v 1.1 2005/10/18 13:55:41 spocke Exp $ + * $Id: cs.js,v 1.2 2006/01/11 14:25:47 spocke Exp $ */ tinyMCE.addToLang('',{ diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/autosave/langs/da.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/autosave/langs/da.js index f66dfe3af..ebf58fcad 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/autosave/langs/da.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/autosave/langs/da.js @@ -1,5 +1,5 @@ -// DK lang variables contributed by Jan Moelgaard +// DK lang variables contributed by Jan Moelgaard, John Dalsgaard and Bo Frederiksen. tinyMCE.addToLang('',{ -autosave_unload_msg : 'De ændringer, du har lavet, vil gå tabt, hvis du lukker denne side.' +autosave_unload_msg : 'De ændringer, du har lavet, vil gå tabt, hvis du lukker denne side.' }); diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/autosave/langs/zh_cn.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/autosave/langs/zh_cn.js index 260b67c57..c6cb4ed53 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/autosave/langs/zh_cn.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/autosave/langs/zh_cn.js @@ -1,4 +1,5 @@ -// Simplified Chinese lang variables contributed by tom_cat (thomaswangyang@gmail.com) +// Simplified Chinese lang variables contributed by TinyMCE_China_Team ( tinymce_china {AT} yahoogroups {DOT} com ). +// visit our homepage at: http://www.cube316.net/tinymce/ for more information. tinyMCE.addToLang('',{ autosave_unload_msg : 'Èç¹ûÄúÀ뿪±¾Ò³£¬ÄúËù×÷µÄÐ޸Ľ«»áÏûʧ¡£' diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/contextmenu/css/contextmenu.css b/www/extras/tinymce2/jscripts/tiny_mce/plugins/contextmenu/css/contextmenu.css index 58bb33757..fb3721468 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/contextmenu/css/contextmenu.css +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/contextmenu/css/contextmenu.css @@ -1,7 +1,7 @@ .contextMenuIEPopup { - padding: 0px; - margin: 0px; - border: 0px; + padding: 0; + margin: 0; + border: 0; overflow: hidden; } @@ -16,18 +16,14 @@ .contextMenuItem, .contextMenuItemOver { } -.contextMenuItemOver { - background-color: #B6BDD2; -} - .contextMenuSeparator { width: 100%; background-color: #D4D0C8; - border: 0px; + border: 0; } .contextMenuImage, .contextMenuItemDisabled { - border: 0px; + border: 0; } .contextMenuIcon { @@ -51,10 +47,28 @@ .contextMenuText { font-family: Tahoma, Verdana, Arial, Helvetica; font-size: 11px; - margin-left: 5px; - margin-right: 10px; + line-height: 20px; } .contextMenuItemDisabled { color: #AAAAAA; } + +.contextMenuText a { + display: block; + line-height: 20px; + width: 100%; + text-decoration: none; + color: black; + font-weight: normal; + margin: 0; + padding: 0; +} + +.contextMenuText a:hover { + background-color: #B6BDD2; + text-decoration: none !important; + font-weight: normal; + margin: 0; + padding: 0; +} diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/contextmenu/editor_plugin.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/contextmenu/editor_plugin.js index dc4567cff..03931a5bf 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/contextmenu/editor_plugin.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/contextmenu/editor_plugin.js @@ -1 +1 @@ -if(!tinyMCE.settings['contextmenu_skip_plugin_css'])tinyMCE.loadCSS(tinyMCE.baseURL+"/plugins/contextmenu/css/contextmenu.css");var TinyMCE_contextmenu_contextMenu=null;function TinyMCE_contextmenu_getInfo(){return{longname:'Context menus',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_contextmenu.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};};function TinyMCE_contextmenu_initInstance(inst){if(tinyMCE.isMSIE5_0&&tinyMCE.isOpera)return;tinyMCE.addEvent(inst.getDoc(),"click",TinyMCE_contextmenu_hideContextMenu);tinyMCE.addEvent(inst.getDoc(),"keypress",TinyMCE_contextmenu_hideContextMenu);tinyMCE.addEvent(inst.getDoc(),"keydown",TinyMCE_contextmenu_hideContextMenu);tinyMCE.addEvent(document,"click",TinyMCE_contextmenu_hideContextMenu);tinyMCE.addEvent(document,"keypress",TinyMCE_contextmenu_hideContextMenu);tinyMCE.addEvent(document,"keydown",TinyMCE_contextmenu_hideContextMenu);var contextMenu=new ContextMenu({commandhandler:"TinyMCE_contextmenu_commandHandler",spacer_image:tinyMCE.baseURL+"/plugins/contextmenu/images/spacer.gif"});TinyMCE_contextmenu_contextMenu=contextMenu;if(tinyMCE.isGecko){tinyMCE.addEvent(inst.getDoc(),"contextmenu",function(e){TinyMCE_contextmenu_showContextMenu(tinyMCE.isMSIE?inst.contentWindow.event:e,inst);});}else tinyMCE.addEvent(inst.getDoc(),"contextmenu",TinyMCE_contextmenu_onContextMenu);}function TinyMCE_contextmenu_onContextMenu(e){var elm=tinyMCE.isMSIE?e.srcElement:e.target;var targetInst,body;if((body=tinyMCE.getParentElement(elm,"body"))!=null){for(var n in tinyMCE.instances){var inst=tinyMCE.instances[n];if(!tinyMCE.isInstance(inst))continue;if(body==inst.getBody()){targetInst=inst;break;}}return TinyMCE_contextmenu_showContextMenu(tinyMCE.isMSIE?targetInst.contentWindow.event:e,targetInst);}}function TinyMCE_contextmenu_showContextMenu(e,inst){function getAttrib(elm,name){return elm.getAttribute(name)?elm.getAttribute(name):"";}var x,y,elm,contextMenu;var pos=tinyMCE.getAbsPosition(inst.iframeElement);x=tinyMCE.isMSIE?e.screenX:pos.absLeft+(e.pageX-inst.getBody().scrollLeft);y=tinyMCE.isMSIE?e.screenY:pos.absTop+(e.pageY-inst.getBody().scrollTop);elm=tinyMCE.isMSIE?e.srcElement:e.target;contextMenu=TinyMCE_contextmenu_contextMenu;contextMenu.inst=inst;window.setTimeout(function(){var theme=tinyMCE.getParam("theme");contextMenu.clearAll();var sel=inst.getSelectedText().length!=0||elm.nodeName=="IMG";contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/cut.gif","$lang_cut_desc","Cut","",!sel);contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/copy.gif","$lang_copy_desc","Copy","",!sel);contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/paste.gif","$lang_paste_desc","Paste","",false);elm=tinyMCE.getParentElement(elm,"img,table,td");if(elm){switch(elm.nodeName){case "IMG":contextMenu.addSeparator();if(tinyMCE.getAttrib(elm,'class').indexOf('mceItemFlash')==0)contextMenu.addItem(tinyMCE.baseURL+"/plugins/flash/images/flash.gif","$lang_flash_props","mceFlash");else contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/image.gif","$lang_image_props_desc",typeof(TinyMCE_advimage_getControlHTML)!="undefined"?"mceAdvImage":"mceImage");break;case "TABLE":case "TD":if(typeof(TinyMCE_table_getControlHTML)!="undefined"){var colspan=(elm.nodeName=="TABLE")?"":getAttrib(elm,"colspan");var rowspan=(elm.nodeName=="TABLE")?"":getAttrib(elm,"rowspan");colspan=colspan==""?"1":colspan;rowspan=rowspan==""?"1":rowspan;contextMenu.addSeparator();contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/cut.gif","$lang_table_cut_row_desc","mceTableCutRow");contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/copy.gif","$lang_table_copy_row_desc","mceTableCopyRow");contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/paste.gif","$lang_table_paste_row_before_desc","mceTablePasteRowBefore","",inst.tableRowClipboard==null);contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/paste.gif","$lang_table_paste_row_after_desc","mceTablePasteRowAfter","",inst.tableRowClipboard==null);contextMenu.addSeparator();contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table.gif","$lang_table_desc","mceInsertTable","insert");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table.gif","$lang_table_props_desc","mceInsertTable");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_cell_props.gif","$lang_table_cell_desc","mceTableCellProps");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_delete.gif","$lang_table_del","mceTableDelete");contextMenu.addSeparator();contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_row_props.gif","$lang_table_row_desc","mceTableRowProps");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_insert_row_before.gif","$lang_table_row_before_desc","mceTableInsertRowBefore");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_insert_row_after.gif","$lang_table_row_after_desc","mceTableInsertRowAfter");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_delete_row.gif","$lang_table_delete_row_desc","mceTableDeleteRow");contextMenu.addSeparator();contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_insert_col_before.gif","$lang_table_col_before_desc","mceTableInsertColBefore");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_insert_col_after.gif","$lang_table_col_after_desc","mceTableInsertColAfter");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_delete_col.gif","$lang_table_delete_col_desc","mceTableDeleteCol");contextMenu.addSeparator();contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_split_cells.gif","$lang_table_split_cells_desc","mceTableSplitCells","",(colspan=="1"&&rowspan=="1"));contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_merge_cells.gif","$lang_table_merge_cells_desc","mceTableMergeCells","",false);}break;}}else{if(typeof(TinyMCE_table_getControlHTML)!="undefined"){contextMenu.addSeparator();contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table.gif","$lang_table_desc","mceInsertTable","insert");}}contextMenu.show(x,y);},10);tinyMCE.cancelEvent(e);return false;}function TinyMCE_contextmenu_hideContextMenu(){TinyMCE_contextmenu_contextMenu.hide();}function TinyMCE_contextmenu_commandHandler(command,value){TinyMCE_contextmenu_contextMenu.hide();var ui=false;if(command=="mceInsertTable"||command=="mceTableCellProps"||command=="mceTableRowProps"||command=="mceTableMergeCells")ui=true;if(command=="Paste")value=null;TinyMCE_contextmenu_contextMenu.inst.execCommand(command,ui,value);}function ContextMenu(settings){function defParam(key,def_val){settings[key]=typeof(settings[key])!="undefined"?settings[key]:def_val;}var self=this;this.isMSIE=(navigator.appName=="Microsoft Internet Explorer");this.contextMenuDiv=document.createElement("div");this.contextMenuDiv.className="contextMenu";this.contextMenuDiv.setAttribute("class","contextMenu");this.contextMenuDiv.style.display="none";this.contextMenuDiv.style.position='absolute';this.contextMenuDiv.style.zindex=1000;this.contextMenuDiv.style.left='0px';this.contextMenuDiv.style.top='0px';this.contextMenuDiv.unselectable="on";document.body.appendChild(this.contextMenuDiv);defParam("commandhandler","");defParam("spacer_image","images/spacer.gif");this.items=new Array();this.settings=settings;this.html="";if(tinyMCE.isMSIE&&!tinyMCE.isMSIE5_0&&!tinyMCE.isOpera){this.pop=window.createPopup();doc=this.pop.document;doc.open();doc.write('');doc.close();}};ContextMenu.prototype.clearAll=function(){this.html="";this.contextMenuDiv.innerHTML="";};ContextMenu.prototype.addSeparator=function(){this.html+='';};ContextMenu.prototype.addItem=function(icon,title,command,value,disabled){if(title.charAt(0)=='$')title=tinyMCE.getLang(title.substring(1));var onMouseDown='';var html='';if(tinyMCE.isMSIE&&!tinyMCE.isMSIE5_0)onMouseDown='contextMenu.execCommand(\''+command+'\', \''+value+'\');return false;';else onMouseDown=this.settings['commandhandler']+'(\''+command+'\', \''+value+'\');return false;';if(icon=="")icon=this.settings['spacer_image'];if(!disabled)html+='';else html+='';html+='';html+='
    ';html+=title;html+='
    ';html+='';this.html+=html;};ContextMenu.prototype.show=function(x,y){if(this.html=="")return;var html='';html+='';html+=this.html;html+='
    ';this.contextMenuDiv.innerHTML=html;if(tinyMCE.isMSIE&&!tinyMCE.isMSIE5_0&&!tinyMCE.isOpera){var width,height;this.contextMenuDiv.style.display="block";width=this.contextMenuDiv.offsetWidth;height=this.contextMenuDiv.offsetHeight;this.contextMenuDiv.style.display="none";this.pop.document.body.innerHTML='
    '+html+"
    ";this.pop.document.tinyMCE=tinyMCE;this.pop.document.contextMenu=this;this.pop.show(x,y,width,height);}else{this.contextMenuDiv.style.left=x+'px';this.contextMenuDiv.style.top=y+'px';this.contextMenuDiv.style.display="block";}};ContextMenu.prototype.hide=function(){if(tinyMCE.isMSIE&&!tinyMCE.isMSIE5_0&&!tinyMCE.isOpera)this.pop.hide();else this.contextMenuDiv.style.display="none";};ContextMenu.prototype.execCommand=function(command,value){eval(this.settings['commandhandler']+"(command, value);");}; \ No newline at end of file +if(!tinyMCE.settings['contextmenu_skip_plugin_css']){tinyMCE.loadCSS(tinyMCE.baseURL+"/plugins/contextmenu/css/contextmenu.css");}var TinyMCE_ContextMenuPlugin={_contextMenu:null,getInfo:function(){return{longname:'Context menus',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_contextmenu.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},initInstance:function(inst){if(tinyMCE.isMSIE5_0&&tinyMCE.isOpera)return;TinyMCE_ContextMenuPlugin._contextMenu=new TinyMCE_ContextMenu({commandhandler:"TinyMCE_ContextMenuPlugin._commandHandler",spacer_image:tinyMCE.baseURL+"/plugins/contextmenu/images/spacer.gif"});tinyMCE.addEvent(inst.getDoc(),"click",TinyMCE_ContextMenuPlugin._hideContextMenu);tinyMCE.addEvent(inst.getDoc(),"keypress",TinyMCE_ContextMenuPlugin._hideContextMenu);tinyMCE.addEvent(inst.getDoc(),"keydown",TinyMCE_ContextMenuPlugin._hideContextMenu);tinyMCE.addEvent(document,"click",TinyMCE_ContextMenuPlugin._hideContextMenu);tinyMCE.addEvent(document,"keypress",TinyMCE_ContextMenuPlugin._hideContextMenu);tinyMCE.addEvent(document,"keydown",TinyMCE_ContextMenuPlugin._hideContextMenu);if(tinyMCE.isGecko){tinyMCE.addEvent(inst.getDoc(),"contextmenu",function(e){TinyMCE_ContextMenuPlugin._showContextMenu(tinyMCE.isMSIE?inst.contentWindow.event:e,inst);});}else tinyMCE.addEvent(inst.getDoc(),"contextmenu",TinyMCE_ContextMenuPlugin._onContextMenu);},_onContextMenu:function(e){var elm=tinyMCE.isMSIE?e.srcElement:e.target;var targetInst,body;if((body=tinyMCE.getParentElement(elm,"body"))!=null){for(var n in tinyMCE.instances){var inst=tinyMCE.instances[n];if(!tinyMCE.isInstance(inst))continue;if(body==inst.getBody()){targetInst=inst;break;}}return TinyMCE_ContextMenuPlugin._showContextMenu(tinyMCE.isMSIE?targetInst.contentWindow.event:e,targetInst);}},_showContextMenu:function(e,inst){function getAttrib(elm,name){return elm.getAttribute(name)?elm.getAttribute(name):"";}var x,y,elm,contextMenu;var pos=tinyMCE.getAbsPosition(inst.iframeElement);x=tinyMCE.isMSIE?e.screenX:pos.absLeft+(e.pageX-inst.getBody().scrollLeft);y=tinyMCE.isMSIE?e.screenY:pos.absTop+(e.pageY-inst.getBody().scrollTop);elm=tinyMCE.isMSIE?e.srcElement:e.target;contextMenu=this._contextMenu;contextMenu.inst=inst;window.setTimeout(function(){var theme=tinyMCE.getParam("theme");contextMenu.clearAll();var sel=inst.selection.getSelectedText().length!=0||elm.nodeName=="IMG";contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/cut.gif","$lang_cut_desc","Cut","",!sel);contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/copy.gif","$lang_copy_desc","Copy","",!sel);contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/paste.gif","$lang_paste_desc","Paste","",false);if(sel||(elm?(elm.nodeName=='A')||(elm.nodeName=='IMG'):false)){contextMenu.addSeparator();contextMenu.addItem(tinyMCE.baseURL+"/themes/advanced/images/link.gif","$lang_link_desc",inst.hasPlugin("advlink")?"mceAdvLink":"mceLink");contextMenu.addItem(tinyMCE.baseURL+"/themes/advanced/images/unlink.gif","$lang_unlink_desc","unlink","",(elm?(elm.nodeName!='A')&&(elm.nodeName!='IMG'):true));}elm=tinyMCE.getParentElement(elm,"img,table,td"+(inst.hasPlugin("advhr")?',hr':''));if(elm){switch(elm.nodeName){case"IMG":contextMenu.addSeparator();if(tinyMCE.getAttrib(elm,'class').indexOf('mceItemFlash')!=-1)contextMenu.addItem(tinyMCE.baseURL+"/plugins/flash/images/flash.gif","$lang_flash_props","mceFlash");else contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/image.gif","$lang_image_props_desc",inst.hasPlugin("advimage")?"mceAdvImage":"mceImage");break;case"HR":contextMenu.addSeparator();contextMenu.addItem(tinyMCE.baseURL+"/plugins/advhr/images/advhr.gif","$lang_insert_advhr_desc","mceAdvancedHr");break;case"TABLE":case"TD":if(inst.hasPlugin("table")){var colspan=(elm.nodeName=="TABLE")?"":getAttrib(elm,"colspan");var rowspan=(elm.nodeName=="TABLE")?"":getAttrib(elm,"rowspan");colspan=colspan==""?"1":colspan;rowspan=rowspan==""?"1":rowspan;contextMenu.addSeparator();contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/cut.gif","$lang_table_cut_row_desc","mceTableCutRow");contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/copy.gif","$lang_table_copy_row_desc","mceTableCopyRow");contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/paste.gif","$lang_table_paste_row_before_desc","mceTablePasteRowBefore","",inst.tableRowClipboard==null);contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/paste.gif","$lang_table_paste_row_after_desc","mceTablePasteRowAfter","",inst.tableRowClipboard==null);contextMenu.addSeparator();contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table.gif","$lang_table_desc","mceInsertTable","insert");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table.gif","$lang_table_props_desc","mceInsertTable");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_cell_props.gif","$lang_table_cell_desc","mceTableCellProps");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_delete.gif","$lang_table_del","mceTableDelete");contextMenu.addSeparator();contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_row_props.gif","$lang_table_row_desc","mceTableRowProps");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_insert_row_before.gif","$lang_table_row_before_desc","mceTableInsertRowBefore");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_insert_row_after.gif","$lang_table_row_after_desc","mceTableInsertRowAfter");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_delete_row.gif","$lang_table_delete_row_desc","mceTableDeleteRow");contextMenu.addSeparator();contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_insert_col_before.gif","$lang_table_col_before_desc","mceTableInsertColBefore");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_insert_col_after.gif","$lang_table_col_after_desc","mceTableInsertColAfter");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_delete_col.gif","$lang_table_delete_col_desc","mceTableDeleteCol");contextMenu.addSeparator();contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_split_cells.gif","$lang_table_split_cells_desc","mceTableSplitCells","",(colspan=="1"&&rowspan=="1"));contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_merge_cells.gif","$lang_table_merge_cells_desc","mceTableMergeCells","",false);}break;}}else{if(inst.hasPlugin("table")){contextMenu.addSeparator();contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table.gif","$lang_table_desc","mceInsertTable","insert");}}contextMenu.show(x,y);},10);tinyMCE.cancelEvent(e);return false;},_hideContextMenu:function(){if(TinyMCE_ContextMenuPlugin._contextMenu)TinyMCE_ContextMenuPlugin._contextMenu.hide();},_commandHandler:function(command,value){var cm=TinyMCE_ContextMenuPlugin._contextMenu;cm.hide();var ui=false;if(command=="mceInsertTable"||command=="mceTableCellProps"||command=="mceTableRowProps"||command=="mceTableMergeCells")ui=true;if(command=="Paste")value=null;if(tinyMCE.getParam("dialog_type")=="modal"&&tinyMCE.isMSIE){window.setTimeout(function(){cm.inst.execCommand(command,ui,value);},100);}else cm.inst.execCommand(command,ui,value);}};tinyMCE.addPlugin("contextmenu",TinyMCE_ContextMenuPlugin);function TinyMCE_ContextMenu(settings){function defParam(key,def_val){settings[key]=typeof(settings[key])!="undefined"?settings[key]:def_val;}var self=this;this.isMSIE=(navigator.appName=="Microsoft Internet Explorer");this.contextMenuDiv=document.createElement("div");this.contextMenuDiv.className="contextMenu";this.contextMenuDiv.setAttribute("class","contextMenu");this.contextMenuDiv.style.display="none";this.contextMenuDiv.style.position='absolute';this.contextMenuDiv.style.zindex=1000;this.contextMenuDiv.style.left='0';this.contextMenuDiv.style.top='0';this.contextMenuDiv.unselectable="on";document.body.appendChild(this.contextMenuDiv);defParam("commandhandler","");defParam("spacer_image","images/spacer.gif");this.items=new Array();this.settings=settings;this.html="";if(tinyMCE.isMSIE&&!tinyMCE.isMSIE5_0&&!tinyMCE.isOpera){this.pop=window.createPopup();doc=this.pop.document;doc.open();doc.write('');doc.close();}};TinyMCE_ContextMenu.prototype={clearAll:function(){this.html="";this.contextMenuDiv.innerHTML="";},addSeparator:function(){this.html+='';},addItem:function(icon,title,command,value,disabled){if(title.charAt(0)=='$')title=tinyMCE.getLang(title.substring(1));var onMouseDown='';var html='';if(tinyMCE.isMSIE&&!tinyMCE.isMSIE5_0)onMouseDown='contextMenu.execCommand(\''+command+'\', \''+value+'\');return false;';else onMouseDown=this.settings['commandhandler']+'(\''+command+'\', \''+value+'\');return false;';if(icon=="")icon=this.settings['spacer_image'];if(!disabled)html+='';else html+='';html+='';html+='
    ';html+=' ';html+=title;html+=' ';html+='
    ';html+='';this.html+=html;},show:function(x,y){if(this.html=="")return;var html='';html+='';html+=this.html;html+='
    ';this.contextMenuDiv.innerHTML=html;if(tinyMCE.isMSIE&&!tinyMCE.isMSIE5_0&&!tinyMCE.isOpera){var width,height;this.contextMenuDiv.style.display="block";width=this.contextMenuDiv.offsetWidth;height=this.contextMenuDiv.offsetHeight;this.contextMenuDiv.style.display="none";this.pop.document.body.innerHTML='
    '+html+"
    ";this.pop.document.tinyMCE=tinyMCE;this.pop.document.contextMenu=this;this.pop.show(x,y,width,height);}else{this.contextMenuDiv.style.left=x+'px';this.contextMenuDiv.style.top=y+'px';this.contextMenuDiv.style.display="block";}},hide:function(){if(tinyMCE.isMSIE&&!tinyMCE.isMSIE5_0&&!tinyMCE.isOpera)this.pop.hide();else this.contextMenuDiv.style.display="none";},execCommand:function(command,value){eval(this.settings['commandhandler']+"(command, value);");}}; \ No newline at end of file diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/contextmenu/editor_plugin_src.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/contextmenu/editor_plugin_src.js index 42743e46a..faae3aefe 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/contextmenu/editor_plugin_src.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/contextmenu/editor_plugin_src.js @@ -1,187 +1,221 @@ +/** + * $RCSfile: editor_plugin_src.js,v $ + * $Revision: 1.29 $ + * $Date: 2006/02/13 15:09:28 $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved. + */ + /* Import plugin specific language pack */ -//tinyMCE.importPluginLanguagePack('contextmenu', 'en,zh_cn,cs,fa,fr_ca,fr,de,nb'); -if (!tinyMCE.settings['contextmenu_skip_plugin_css']) +//tinyMCE.importPluginLanguagePack('contextmenu', 'en,tr,zh_cn,cs,fa,fr_ca,fr,de,nb'); +if (!tinyMCE.settings['contextmenu_skip_plugin_css']) { tinyMCE.loadCSS(tinyMCE.baseURL + "/plugins/contextmenu/css/contextmenu.css"); +} -// Global contextmenu class instance -var TinyMCE_contextmenu_contextMenu = null; +var TinyMCE_ContextMenuPlugin = { + // Private fields + _contextMenu : null, -function TinyMCE_contextmenu_getInfo() { - return { - longname : 'Context menus', - author : 'Moxiecode Systems', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_contextmenu.html', - version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion - }; + getInfo : function() { + return { + longname : 'Context menus', + author : 'Moxiecode Systems', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_contextmenu.html', + version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion + }; + }, + + initInstance : function(inst) { + // Is not working on MSIE 5.0 or Opera no contextmenu event + if (tinyMCE.isMSIE5_0 && tinyMCE.isOpera) + return; + + TinyMCE_ContextMenuPlugin._contextMenu = new TinyMCE_ContextMenu({ + commandhandler : "TinyMCE_ContextMenuPlugin._commandHandler", + spacer_image : tinyMCE.baseURL + "/plugins/contextmenu/images/spacer.gif" + }); + + // Add hide event handles + tinyMCE.addEvent(inst.getDoc(), "click", TinyMCE_ContextMenuPlugin._hideContextMenu); + tinyMCE.addEvent(inst.getDoc(), "keypress", TinyMCE_ContextMenuPlugin._hideContextMenu); + tinyMCE.addEvent(inst.getDoc(), "keydown", TinyMCE_ContextMenuPlugin._hideContextMenu); + tinyMCE.addEvent(document, "click", TinyMCE_ContextMenuPlugin._hideContextMenu); + tinyMCE.addEvent(document, "keypress", TinyMCE_ContextMenuPlugin._hideContextMenu); + tinyMCE.addEvent(document, "keydown", TinyMCE_ContextMenuPlugin._hideContextMenu); + + // Attach contextmenu event + if (tinyMCE.isGecko) { + tinyMCE.addEvent(inst.getDoc(), "contextmenu", function(e) {TinyMCE_ContextMenuPlugin._showContextMenu(tinyMCE.isMSIE ? inst.contentWindow.event : e, inst);}); + } else + tinyMCE.addEvent(inst.getDoc(), "contextmenu", TinyMCE_ContextMenuPlugin._onContextMenu); + }, + + // Private plugin internal methods + + _onContextMenu : function(e) { + var elm = tinyMCE.isMSIE ? e.srcElement : e.target; + var targetInst, body; + + // Find instance + if ((body = tinyMCE.getParentElement(elm, "body")) != null) { + for (var n in tinyMCE.instances) { + var inst = tinyMCE.instances[n]; + if (!tinyMCE.isInstance(inst)) + continue; + + if (body == inst.getBody()) { + targetInst = inst; + break; + } + } + + return TinyMCE_ContextMenuPlugin._showContextMenu(tinyMCE.isMSIE ? targetInst.contentWindow.event : e, targetInst); + } + }, + + _showContextMenu : function(e, inst) { + function getAttrib(elm, name) { + return elm.getAttribute(name) ? elm.getAttribute(name) : ""; + } + + var x, y, elm, contextMenu; + var pos = tinyMCE.getAbsPosition(inst.iframeElement); + + x = tinyMCE.isMSIE ? e.screenX : pos.absLeft + (e.pageX - inst.getBody().scrollLeft); + y = tinyMCE.isMSIE ? e.screenY : pos.absTop + (e.pageY - inst.getBody().scrollTop); + elm = tinyMCE.isMSIE ? e.srcElement : e.target; + + contextMenu = this._contextMenu; + contextMenu.inst = inst; + + // Mozilla needs some time + window.setTimeout(function () { + var theme = tinyMCE.getParam("theme"); + + contextMenu.clearAll(); + var sel = inst.selection.getSelectedText().length != 0 || elm.nodeName == "IMG"; + + // Default items + contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/cut.gif", "$lang_cut_desc", "Cut", "", !sel); + contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/copy.gif", "$lang_copy_desc", "Copy", "", !sel); + contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/paste.gif", "$lang_paste_desc", "Paste", "", false); + + if (sel || (elm ? (elm.nodeName == 'A') || (elm.nodeName == 'IMG') : false)) { + contextMenu.addSeparator(); + contextMenu.addItem(tinyMCE.baseURL + "/themes/advanced/images/link.gif", "$lang_link_desc", inst.hasPlugin("advlink") ? "mceAdvLink" : "mceLink"); + contextMenu.addItem(tinyMCE.baseURL + "/themes/advanced/images/unlink.gif", "$lang_unlink_desc", "unlink", "", (elm ? (elm.nodeName != 'A') && (elm.nodeName != 'IMG') : true)); + } + + // Get element + elm = tinyMCE.getParentElement(elm, "img,table,td" + (inst.hasPlugin("advhr") ? ',hr' : '')); + if (elm) { + switch (elm.nodeName) { + case "IMG": + contextMenu.addSeparator(); + + // If flash + if (tinyMCE.getAttrib(elm, 'class').indexOf('mceItemFlash') != -1) + contextMenu.addItem(tinyMCE.baseURL + "/plugins/flash/images/flash.gif", "$lang_flash_props", "mceFlash"); + else + contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/image.gif", "$lang_image_props_desc", inst.hasPlugin("advimage") ? "mceAdvImage" : "mceImage"); + break; + + case "HR": + contextMenu.addSeparator(); + contextMenu.addItem(tinyMCE.baseURL + "/plugins/advhr/images/advhr.gif", "$lang_insert_advhr_desc", "mceAdvancedHr"); + break; + + case "TABLE": + case "TD": + // Is table plugin loaded + if (inst.hasPlugin("table")) { + var colspan = (elm.nodeName == "TABLE") ? "" : getAttrib(elm, "colspan"); + var rowspan = (elm.nodeName == "TABLE") ? "" : getAttrib(elm, "rowspan"); + + colspan = colspan == "" ? "1" : colspan; + rowspan = rowspan == "" ? "1" : rowspan; + + contextMenu.addSeparator(); + contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/cut.gif", "$lang_table_cut_row_desc", "mceTableCutRow"); + contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/copy.gif", "$lang_table_copy_row_desc", "mceTableCopyRow"); + contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/paste.gif", "$lang_table_paste_row_before_desc", "mceTablePasteRowBefore", "", inst.tableRowClipboard == null); + contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/paste.gif", "$lang_table_paste_row_after_desc", "mceTablePasteRowAfter", "", inst.tableRowClipboard == null); + + /* contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/justifyleft.gif", "$lang_justifyleft_desc", "JustifyLeft", "", false); + contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/justifycenter.gif", "$lang_justifycenter_desc", "JustifyCenter", "", false); + contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/justifyright.gif", "$lang_justifyright_desc", "JustifyRight", "", false); + contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/justifyfull.gif", "$lang_justifyfull_desc", "JustifyFull", "", false);*/ + contextMenu.addSeparator(); + contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table.gif", "$lang_table_desc", "mceInsertTable", "insert"); + contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table.gif", "$lang_table_props_desc", "mceInsertTable"); + contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_cell_props.gif", "$lang_table_cell_desc", "mceTableCellProps"); + contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_delete.gif", "$lang_table_del", "mceTableDelete"); + contextMenu.addSeparator(); + contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_row_props.gif", "$lang_table_row_desc", "mceTableRowProps"); + contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_insert_row_before.gif", "$lang_table_row_before_desc", "mceTableInsertRowBefore"); + contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_insert_row_after.gif", "$lang_table_row_after_desc", "mceTableInsertRowAfter"); + contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_delete_row.gif", "$lang_table_delete_row_desc", "mceTableDeleteRow"); + contextMenu.addSeparator(); + contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_insert_col_before.gif", "$lang_table_col_before_desc", "mceTableInsertColBefore"); + contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_insert_col_after.gif", "$lang_table_col_after_desc", "mceTableInsertColAfter"); + contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_delete_col.gif", "$lang_table_delete_col_desc", "mceTableDeleteCol"); + contextMenu.addSeparator(); + contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_split_cells.gif", "$lang_table_split_cells_desc", "mceTableSplitCells", "", (colspan == "1" && rowspan == "1")); + contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_merge_cells.gif", "$lang_table_merge_cells_desc", "mceTableMergeCells", "", false); + } + break; + } + } else { + // Add table specific + if (inst.hasPlugin("table")) { + contextMenu.addSeparator(); + contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table.gif", "$lang_table_desc", "mceInsertTable", "insert"); + } + } + + contextMenu.show(x, y); + }, 10); + + // Cancel default handeling + tinyMCE.cancelEvent(e); + return false; + }, + + _hideContextMenu : function() { + if (TinyMCE_ContextMenuPlugin._contextMenu) + TinyMCE_ContextMenuPlugin._contextMenu.hide(); + }, + + _commandHandler : function(command, value) { + var cm = TinyMCE_ContextMenuPlugin._contextMenu; + + cm.hide(); + + // UI must be true on these + var ui = false; + if (command == "mceInsertTable" || command == "mceTableCellProps" || command == "mceTableRowProps" || command == "mceTableMergeCells") + ui = true; + + if (command == "Paste") + value = null; + + if (tinyMCE.getParam("dialog_type") == "modal" && tinyMCE.isMSIE) { + // Cell properties will generate access denied error is this isn't done?! + window.setTimeout(function() { + cm.inst.execCommand(command, ui, value); + }, 100); + } else + cm.inst.execCommand(command, ui, value); + } }; -function TinyMCE_contextmenu_initInstance(inst) { - // Is not working on MSIE 5.0 or Opera no contextmenu event - if (tinyMCE.isMSIE5_0 && tinyMCE.isOpera) - return; - - // Add hide event handles - tinyMCE.addEvent(inst.getDoc(), "click", TinyMCE_contextmenu_hideContextMenu); - tinyMCE.addEvent(inst.getDoc(), "keypress", TinyMCE_contextmenu_hideContextMenu); - tinyMCE.addEvent(inst.getDoc(), "keydown", TinyMCE_contextmenu_hideContextMenu); - tinyMCE.addEvent(document, "click", TinyMCE_contextmenu_hideContextMenu); - tinyMCE.addEvent(document, "keypress", TinyMCE_contextmenu_hideContextMenu); - tinyMCE.addEvent(document, "keydown", TinyMCE_contextmenu_hideContextMenu); - - var contextMenu = new ContextMenu({ - commandhandler : "TinyMCE_contextmenu_commandHandler", - spacer_image : tinyMCE.baseURL + "/plugins/contextmenu/images/spacer.gif" - }); - - // Register global reference - TinyMCE_contextmenu_contextMenu = contextMenu; - - // Attach contextmenu event - if (tinyMCE.isGecko) { - tinyMCE.addEvent(inst.getDoc(), "contextmenu", function(e) {TinyMCE_contextmenu_showContextMenu(tinyMCE.isMSIE ? inst.contentWindow.event : e, inst);}); - } else - tinyMCE.addEvent(inst.getDoc(), "contextmenu", TinyMCE_contextmenu_onContextMenu); -} - -function TinyMCE_contextmenu_onContextMenu(e) { - var elm = tinyMCE.isMSIE ? e.srcElement : e.target; - var targetInst, body; - - // Find instance - if ((body = tinyMCE.getParentElement(elm, "body")) != null) { - for (var n in tinyMCE.instances) { - var inst = tinyMCE.instances[n]; - if (!tinyMCE.isInstance(inst)) - continue; - - if (body == inst.getBody()) { - targetInst = inst; - break; - } - } - - return TinyMCE_contextmenu_showContextMenu(tinyMCE.isMSIE ? targetInst.contentWindow.event : e, targetInst); - } -} - -function TinyMCE_contextmenu_showContextMenu(e, inst) { - function getAttrib(elm, name) { - return elm.getAttribute(name) ? elm.getAttribute(name) : ""; - } - - var x, y, elm, contextMenu; - var pos = tinyMCE.getAbsPosition(inst.iframeElement); - - x = tinyMCE.isMSIE ? e.screenX : pos.absLeft + (e.pageX - inst.getBody().scrollLeft); - y = tinyMCE.isMSIE ? e.screenY : pos.absTop + (e.pageY - inst.getBody().scrollTop); - elm = tinyMCE.isMSIE ? e.srcElement : e.target; - contextMenu = TinyMCE_contextmenu_contextMenu; - contextMenu.inst = inst; - - // Mozilla needs some time - window.setTimeout(function () { - var theme = tinyMCE.getParam("theme"); - - contextMenu.clearAll(); - var sel = inst.getSelectedText().length != 0 || elm.nodeName == "IMG"; - - // Default items - contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/cut.gif", "$lang_cut_desc", "Cut", "", !sel); - contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/copy.gif", "$lang_copy_desc", "Copy", "", !sel); - contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/paste.gif", "$lang_paste_desc", "Paste", "", false); - - // Get element - elm = tinyMCE.getParentElement(elm, "img,table,td"); - if (elm) { - switch (elm.nodeName) { - case "IMG": - contextMenu.addSeparator(); - - // If flash - if (tinyMCE.getAttrib(elm, 'class').indexOf('mceItemFlash') == 0) - contextMenu.addItem(tinyMCE.baseURL + "/plugins/flash/images/flash.gif", "$lang_flash_props", "mceFlash"); - else - contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/image.gif", "$lang_image_props_desc", typeof(TinyMCE_advimage_getControlHTML) != "undefined" ? "mceAdvImage" : "mceImage"); - break; - - case "TABLE": - case "TD": - // Is table plugin loaded - if (typeof(TinyMCE_table_getControlHTML) != "undefined") { - var colspan = (elm.nodeName == "TABLE") ? "" : getAttrib(elm, "colspan"); - var rowspan = (elm.nodeName == "TABLE") ? "" : getAttrib(elm, "rowspan"); - - colspan = colspan == "" ? "1" : colspan; - rowspan = rowspan == "" ? "1" : rowspan; - - contextMenu.addSeparator(); - contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/cut.gif", "$lang_table_cut_row_desc", "mceTableCutRow"); - contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/copy.gif", "$lang_table_copy_row_desc", "mceTableCopyRow"); - contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/paste.gif", "$lang_table_paste_row_before_desc", "mceTablePasteRowBefore", "", inst.tableRowClipboard == null); - contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/paste.gif", "$lang_table_paste_row_after_desc", "mceTablePasteRowAfter", "", inst.tableRowClipboard == null); - -/* contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/justifyleft.gif", "$lang_justifyleft_desc", "JustifyLeft", "", false); - contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/justifycenter.gif", "$lang_justifycenter_desc", "JustifyCenter", "", false); - contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/justifyright.gif", "$lang_justifyright_desc", "JustifyRight", "", false); - contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/justifyfull.gif", "$lang_justifyfull_desc", "JustifyFull", "", false);*/ - contextMenu.addSeparator(); - contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table.gif", "$lang_table_desc", "mceInsertTable", "insert"); - contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table.gif", "$lang_table_props_desc", "mceInsertTable"); - contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_cell_props.gif", "$lang_table_cell_desc", "mceTableCellProps"); - contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_delete.gif", "$lang_table_del", "mceTableDelete"); - contextMenu.addSeparator(); - contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_row_props.gif", "$lang_table_row_desc", "mceTableRowProps"); - contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_insert_row_before.gif", "$lang_table_row_before_desc", "mceTableInsertRowBefore"); - contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_insert_row_after.gif", "$lang_table_row_after_desc", "mceTableInsertRowAfter"); - contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_delete_row.gif", "$lang_table_delete_row_desc", "mceTableDeleteRow"); - contextMenu.addSeparator(); - contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_insert_col_before.gif", "$lang_table_col_before_desc", "mceTableInsertColBefore"); - contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_insert_col_after.gif", "$lang_table_col_after_desc", "mceTableInsertColAfter"); - contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_delete_col.gif", "$lang_table_delete_col_desc", "mceTableDeleteCol"); - contextMenu.addSeparator(); - contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_split_cells.gif", "$lang_table_split_cells_desc", "mceTableSplitCells", "", (colspan == "1" && rowspan == "1")); - contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_merge_cells.gif", "$lang_table_merge_cells_desc", "mceTableMergeCells", "", false); - } - break; - } - } else { - // Add table specific - if (typeof(TinyMCE_table_getControlHTML) != "undefined") { - contextMenu.addSeparator(); - contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table.gif", "$lang_table_desc", "mceInsertTable", "insert"); - } - } - - contextMenu.show(x, y); - }, 10); - - // Cancel default handeling - tinyMCE.cancelEvent(e); - return false; -} - -function TinyMCE_contextmenu_hideContextMenu() { - TinyMCE_contextmenu_contextMenu.hide(); -} - -function TinyMCE_contextmenu_commandHandler(command, value) { - TinyMCE_contextmenu_contextMenu.hide(); - - // UI must be true on these - var ui = false; - if (command == "mceInsertTable" || command == "mceTableCellProps" || command == "mceTableRowProps" || command == "mceTableMergeCells") - ui = true; - - if (command == "Paste") - value = null; - - TinyMCE_contextmenu_contextMenu.inst.execCommand(command, ui, value); -} +tinyMCE.addPlugin("contextmenu", TinyMCE_ContextMenuPlugin); // Context menu class -function ContextMenu(settings) { +function TinyMCE_ContextMenu(settings) { // Default value function function defParam(key, def_val) { settings[key] = typeof(settings[key]) != "undefined" ? settings[key] : def_val; @@ -198,8 +232,8 @@ function ContextMenu(settings) { this.contextMenuDiv.style.display = "none"; this.contextMenuDiv.style.position = 'absolute'; this.contextMenuDiv.style.zindex = 1000; - this.contextMenuDiv.style.left = '0px'; - this.contextMenuDiv.style.top = '0px'; + this.contextMenuDiv.style.left = '0'; + this.contextMenuDiv.style.top = '0'; this.contextMenuDiv.unselectable = "on"; document.body.appendChild(this.contextMenuDiv); @@ -222,88 +256,92 @@ function ContextMenu(settings) { } }; -ContextMenu.prototype.clearAll = function() { - this.html = ""; - this.contextMenuDiv.innerHTML = ""; -}; +TinyMCE_ContextMenu.prototype = { + clearAll : function() { + this.html = ""; + this.contextMenuDiv.innerHTML = ""; + }, -ContextMenu.prototype.addSeparator = function() { - this.html += ''; -}; + addSeparator : function() { + this.html += ''; + }, -ContextMenu.prototype.addItem = function(icon, title, command, value, disabled) { - if (title.charAt(0) == '$') - title = tinyMCE.getLang(title.substring(1)); + addItem : function(icon, title, command, value, disabled) { + if (title.charAt(0) == '$') + title = tinyMCE.getLang(title.substring(1)); - var onMouseDown = ''; - var html = ''; + var onMouseDown = ''; + var html = ''; - if (tinyMCE.isMSIE && !tinyMCE.isMSIE5_0) - onMouseDown = 'contextMenu.execCommand(\'' + command + '\', \'' + value + '\');return false;'; - else - onMouseDown = this.settings['commandhandler'] + '(\'' + command + '\', \'' + value + '\');return false;'; + if (tinyMCE.isMSIE && !tinyMCE.isMSIE5_0) + onMouseDown = 'contextMenu.execCommand(\'' + command + '\', \'' + value + '\');return false;'; + else + onMouseDown = this.settings['commandhandler'] + '(\'' + command + '\', \'' + value + '\');return false;'; - if (icon == "") - icon = this.settings['spacer_image']; + if (icon == "") + icon = this.settings['spacer_image']; - if (!disabled) - html += ''; - else - html += ''; + if (!disabled) + html += ''; + else + html += ''; - html += ''; - html += ''; + html += ''; - // Add to main - this.html += html; -}; + // Add to main + this.html += html; + }, -ContextMenu.prototype.show = function(x, y) { - if (this.html == "") - return; + show : function(x, y) { + if (this.html == "") + return; - var html = ''; + var html = ''; - html += ''; - html += this.html; - html += '
    '; + html += ''; + html += this.html; + html += '
    '; - this.contextMenuDiv.innerHTML = html; + this.contextMenuDiv.innerHTML = html; - if (tinyMCE.isMSIE && !tinyMCE.isMSIE5_0 && !tinyMCE.isOpera) { - var width, height; + if (tinyMCE.isMSIE && !tinyMCE.isMSIE5_0 && !tinyMCE.isOpera) { + var width, height; - // Get dimensions - this.contextMenuDiv.style.display = "block"; - width = this.contextMenuDiv.offsetWidth; - height = this.contextMenuDiv.offsetHeight; - this.contextMenuDiv.style.display = "none"; + // Get dimensions + this.contextMenuDiv.style.display = "block"; + width = this.contextMenuDiv.offsetWidth; + height = this.contextMenuDiv.offsetHeight; + this.contextMenuDiv.style.display = "none"; - // Setup popup and show - this.pop.document.body.innerHTML = '
    ' + html + "
    "; - this.pop.document.tinyMCE = tinyMCE; - this.pop.document.contextMenu = this; - this.pop.show(x, y, width, height); - } else { - this.contextMenuDiv.style.left = x + 'px'; - this.contextMenuDiv.style.top = y + 'px'; - this.contextMenuDiv.style.display = "block"; + // Setup popup and show + this.pop.document.body.innerHTML = '
    ' + html + "
    "; + this.pop.document.tinyMCE = tinyMCE; + this.pop.document.contextMenu = this; + this.pop.show(x, y, width, height); + } else { + this.contextMenuDiv.style.left = x + 'px'; + this.contextMenuDiv.style.top = y + 'px'; + this.contextMenuDiv.style.display = "block"; + } + }, + + hide : function() { + if (tinyMCE.isMSIE && !tinyMCE.isMSIE5_0 && !tinyMCE.isOpera) + this.pop.hide(); + else + this.contextMenuDiv.style.display = "none"; + }, + + execCommand : function(command, value) { + eval(this.settings['commandhandler'] + "(command, value);"); } }; - -ContextMenu.prototype.hide = function() { - if (tinyMCE.isMSIE && !tinyMCE.isMSIE5_0 && !tinyMCE.isOpera) - this.pop.hide(); - else - this.contextMenuDiv.style.display = "none"; -}; - -ContextMenu.prototype.execCommand = function(command, value) { - eval(this.settings['commandhandler'] + "(command, value);"); -}; diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/directionality/editor_plugin.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/directionality/editor_plugin.js index 78e192173..4447d17d1 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/directionality/editor_plugin.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/directionality/editor_plugin.js @@ -1 +1 @@ -tinyMCE.importPluginLanguagePack('directionality','en,sv,fr_ca,zh_cn,cs,da,he,nb,de,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,pl,nl,fr,pt_br');function TinyMCE_directionality_getInfo(){return{longname:'Directionality',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_directionality.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};};function TinyMCE_directionality_getControlHTML(control_name){switch(control_name){case "ltr":var cmd='tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceDirectionLTR\');return false;';return '';case "rtl":var cmd='tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceDirectionRTL\');return false;';return '';}return "";}function TinyMCE_directionality_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mceDirectionLTR":var inst=tinyMCE.getInstanceById(editor_id);var elm=tinyMCE.getParentElement(inst.getFocusElement(),"p,div,td,h1,h2,h3,h4,h5,h6,pre,address");if(elm)elm.setAttribute("dir","ltr");tinyMCE.triggerNodeChange(false);return true;case "mceDirectionRTL":var inst=tinyMCE.getInstanceById(editor_id);var elm=tinyMCE.getParentElement(inst.getFocusElement(),"p,div,td,h1,h2,h3,h4,h5,h6,pre,address");if(elm)elm.setAttribute("dir","rtl");tinyMCE.triggerNodeChange(false);return true;}return false;}function TinyMCE_directionality_handleNodeChange(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){function getAttrib(elm,name){return elm.getAttribute(name)?elm.getAttribute(name):"";}tinyMCE.switchClassSticky(editor_id+'_ltr','mceButtonNormal',false);tinyMCE.switchClassSticky(editor_id+'_rtl','mceButtonNormal',false);if(node==null)return;var elm=tinyMCE.getParentElement(node,"p,div,td,h1,h2,h3,h4,h5,h6,pre,address");if(!elm){tinyMCE.switchClassSticky(editor_id+'_ltr','mceButtonDisabled',true);tinyMCE.switchClassSticky(editor_id+'_rtl','mceButtonDisabled',true);return;}var dir=getAttrib(elm,"dir");if(dir=="ltr"||dir=="")tinyMCE.switchClassSticky(editor_id+'_ltr','mceButtonSelected',false);else tinyMCE.switchClassSticky(editor_id+'_rtl','mceButtonSelected',false);return true;} \ No newline at end of file +tinyMCE.importPluginLanguagePack('directionality','en,tr,sv,fr_ca,zh_cn,cs,da,he,nb,de,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,pl,nl,fr,pt_br');var TinyMCE_DirectionalityPlugin={getInfo:function(){return{longname:'Directionality',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_directionality.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},getControlHTML:function(cn){switch(cn){case"ltr":return tinyMCE.getButtonHTML(cn,'lang_directionality_ltr_desc','{$pluginurl}/images/ltr.gif','mceDirectionLTR');case"rtl":return tinyMCE.getButtonHTML(cn,'lang_directionality_rtl_desc','{$pluginurl}/images/rtl.gif','mceDirectionRTL');}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceDirectionLTR":var inst=tinyMCE.getInstanceById(editor_id);var elm=tinyMCE.getParentElement(inst.getFocusElement(),"p,div,td,h1,h2,h3,h4,h5,h6,pre,address");if(elm)elm.setAttribute("dir","ltr");tinyMCE.triggerNodeChange(false);return true;case"mceDirectionRTL":var inst=tinyMCE.getInstanceById(editor_id);var elm=tinyMCE.getParentElement(inst.getFocusElement(),"p,div,td,h1,h2,h3,h4,h5,h6,pre,address");if(elm)elm.setAttribute("dir","rtl");tinyMCE.triggerNodeChange(false);return true;}return false;},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){function getAttrib(elm,name){return elm.getAttribute(name)?elm.getAttribute(name):"";}if(node==null)return;var elm=tinyMCE.getParentElement(node,"p,div,td,h1,h2,h3,h4,h5,h6,pre,address");if(!elm){tinyMCE.switchClass(editor_id+'_ltr','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_rtl','mceButtonDisabled');return true;}tinyMCE.switchClass(editor_id+'_ltr','mceButtonNormal');tinyMCE.switchClass(editor_id+'_rtl','mceButtonNormal');var dir=getAttrib(elm,"dir");if(dir=="ltr"||dir=="")tinyMCE.switchClass(editor_id+'_ltr','mceButtonSelected');else tinyMCE.switchClass(editor_id+'_rtl','mceButtonSelected');return true;}};tinyMCE.addPlugin("directionality",TinyMCE_DirectionalityPlugin); \ No newline at end of file diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/directionality/editor_plugin_src.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/directionality/editor_plugin_src.js index 210d2aa26..ad0fa87e9 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/directionality/editor_plugin_src.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/directionality/editor_plugin_src.js @@ -1,81 +1,92 @@ -/* Import plugin specific language pack */ -tinyMCE.importPluginLanguagePack('directionality', 'en,sv,fr_ca,zh_cn,cs,da,he,nb,de,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,pl,nl,fr,pt_br'); +/** + * $RCSfile: editor_plugin_src.js,v $ + * $Revision: 1.16 $ + * $Date: 2006/02/10 21:34:28 $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved. + */ -function TinyMCE_directionality_getInfo() { - return { - longname : 'Directionality', - author : 'Moxiecode Systems', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_directionality.html', - version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion - }; +/* Import plugin specific language pack */ +tinyMCE.importPluginLanguagePack('directionality', 'en,tr,sv,fr_ca,zh_cn,cs,da,he,nb,de,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,pl,nl,fr,pt_br'); + +var TinyMCE_DirectionalityPlugin = { + getInfo : function() { + return { + longname : 'Directionality', + author : 'Moxiecode Systems', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_directionality.html', + version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion + }; + }, + + getControlHTML : function(cn) { + switch (cn) { + case "ltr": + return tinyMCE.getButtonHTML(cn, 'lang_directionality_ltr_desc', '{$pluginurl}/images/ltr.gif', 'mceDirectionLTR'); + + case "rtl": + return tinyMCE.getButtonHTML(cn, 'lang_directionality_rtl_desc', '{$pluginurl}/images/rtl.gif', 'mceDirectionRTL'); + } + + return ""; + }, + + execCommand : function(editor_id, element, command, user_interface, value) { + // Handle commands + switch (command) { + case "mceDirectionLTR": + var inst = tinyMCE.getInstanceById(editor_id); + var elm = tinyMCE.getParentElement(inst.getFocusElement(), "p,div,td,h1,h2,h3,h4,h5,h6,pre,address"); + + if (elm) + elm.setAttribute("dir", "ltr"); + + tinyMCE.triggerNodeChange(false); + return true; + + case "mceDirectionRTL": + var inst = tinyMCE.getInstanceById(editor_id); + var elm = tinyMCE.getParentElement(inst.getFocusElement(), "p,div,td,h1,h2,h3,h4,h5,h6,pre,address"); + + if (elm) + elm.setAttribute("dir", "rtl"); + + tinyMCE.triggerNodeChange(false); + return true; + } + + // Pass to next handler in chain + return false; + }, + + handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) { + function getAttrib(elm, name) { + return elm.getAttribute(name) ? elm.getAttribute(name) : ""; + } + + if (node == null) + return; + + var elm = tinyMCE.getParentElement(node, "p,div,td,h1,h2,h3,h4,h5,h6,pre,address"); + if (!elm) { + tinyMCE.switchClass(editor_id + '_ltr', 'mceButtonDisabled'); + tinyMCE.switchClass(editor_id + '_rtl', 'mceButtonDisabled'); + return true; + } + + tinyMCE.switchClass(editor_id + '_ltr', 'mceButtonNormal'); + tinyMCE.switchClass(editor_id + '_rtl', 'mceButtonNormal'); + + var dir = getAttrib(elm, "dir"); + if (dir == "ltr" || dir == "") + tinyMCE.switchClass(editor_id + '_ltr', 'mceButtonSelected'); + else + tinyMCE.switchClass(editor_id + '_rtl', 'mceButtonSelected'); + + return true; + } }; -function TinyMCE_directionality_getControlHTML(control_name) { - switch (control_name) { - case "ltr": - var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceDirectionLTR\');return false;'; - return ''; - - case "rtl": - var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceDirectionRTL\');return false;'; - return ''; - } - - return ""; -} - -function TinyMCE_directionality_execCommand(editor_id, element, command, user_interface, value) { - // Handle commands - switch (command) { - case "mceDirectionLTR": - var inst = tinyMCE.getInstanceById(editor_id); - var elm = tinyMCE.getParentElement(inst.getFocusElement(), "p,div,td,h1,h2,h3,h4,h5,h6,pre,address"); - - if (elm) - elm.setAttribute("dir", "ltr"); - - tinyMCE.triggerNodeChange(false); - return true; - - case "mceDirectionRTL": - var inst = tinyMCE.getInstanceById(editor_id); - var elm = tinyMCE.getParentElement(inst.getFocusElement(), "p,div,td,h1,h2,h3,h4,h5,h6,pre,address"); - - if (elm) - elm.setAttribute("dir", "rtl"); - - tinyMCE.triggerNodeChange(false); - return true; - } - - // Pass to next handler in chain - return false; -} - -function TinyMCE_directionality_handleNodeChange(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) { - function getAttrib(elm, name) { - return elm.getAttribute(name) ? elm.getAttribute(name) : ""; - } - - tinyMCE.switchClassSticky(editor_id + '_ltr', 'mceButtonNormal', false); - tinyMCE.switchClassSticky(editor_id + '_rtl', 'mceButtonNormal', false); - - if (node == null) - return; - - var elm = tinyMCE.getParentElement(node, "p,div,td,h1,h2,h3,h4,h5,h6,pre,address"); - if (!elm) { - tinyMCE.switchClassSticky(editor_id + '_ltr', 'mceButtonDisabled', true); - tinyMCE.switchClassSticky(editor_id + '_rtl', 'mceButtonDisabled', true); - return; - } - - var dir = getAttrib(elm, "dir"); - if (dir == "ltr" || dir == "") - tinyMCE.switchClassSticky(editor_id + '_ltr', 'mceButtonSelected', false); - else - tinyMCE.switchClassSticky(editor_id + '_rtl', 'mceButtonSelected', false); - - return true; -} +tinyMCE.addPlugin("directionality", TinyMCE_DirectionalityPlugin); diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/directionality/langs/cs.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/directionality/langs/cs.js index 194657195..d16b4958b 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/directionality/langs/cs.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/directionality/langs/cs.js @@ -2,7 +2,7 @@ * Czech lang variables * encoding: utf-8 * - * $Id: cs.js,v 1.1 2005/10/18 13:55:41 spocke Exp $ + * $Id: cs.js,v 1.2 2006/01/11 14:25:48 spocke Exp $ */ tinyMCE.addToLang('',{ diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/directionality/langs/da.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/directionality/langs/da.js index 5eab4ea02..3240269c6 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/directionality/langs/da.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/directionality/langs/da.js @@ -1,6 +1,6 @@ -// DK lang variables contributed by Jan Moelgaard +// DK lang variables contributed by Jan Moelgaard, John Dalsgaard and Bo Frederiksen. tinyMCE.addToLang('',{ -directionality_ltr_desc : 'Retning - venstre mod højre', -directionality_rtl_desc : 'Retning - højre mod venstre' +directionality_ltr_desc : 'Retning - venstre mod højre', +directionality_rtl_desc : 'Retning - højre mod venstre' }); diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/directionality/langs/zh_cn.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/directionality/langs/zh_cn.js index 922874f18..ea0a03657 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/directionality/langs/zh_cn.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/directionality/langs/zh_cn.js @@ -1,4 +1,5 @@ -// Simplified Chinese lang variables contributed by tom_cat (thomaswangyang@gmail.com) +// Simplified Chinese lang variables contributed by TinyMCE_China_Team ( tinymce_china {AT} yahoogroups {DOT} com ). +// visit our homepage at: http://www.cube316.net/tinymce/ for more information. tinyMCE.addToLang('',{ directionality_ltr_desc : '·½Ïò´Ó×óÍùÓÒ', diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/emotions/editor_plugin.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/emotions/editor_plugin.js index 68f2c42b7..07779873b 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/emotions/editor_plugin.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/emotions/editor_plugin.js @@ -1 +1 @@ -tinyMCE.importPluginLanguagePack('emotions','en,sv,zh_cn,cs,fa,fr_ca,fr,de,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,zh_tw,zh_tw_utf8,sk');function TinyMCE_emotions_getInfo(){return{longname:'Emotions',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_emotions.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};};function TinyMCE_emotions_getControlHTML(control_name){switch(control_name){case "emotions":var cmd='tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceEmotion\');return false;';return '';}return "";}function TinyMCE_emotions_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mceEmotion":var template=new Array();template['file']='../../plugins/emotions/emotions.htm';template['width']=160;template['height']=160;template['width']+=tinyMCE.getLang('lang_emotions_delta_width',0);template['height']+=tinyMCE.getLang('lang_emotions_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});return true;}return false;} \ No newline at end of file +tinyMCE.importPluginLanguagePack('emotions','en,tr,sv,zh_cn,cs,fa,fr_ca,fr,de,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,zh_tw,zh_tw_utf8,sk');var TinyMCE_EmotionsPlugin={getInfo:function(){return{longname:'Emotions',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_emotions.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},getControlHTML:function(cn){switch(cn){case"emotions":return tinyMCE.getButtonHTML(cn,'lang_emotions_desc','{$pluginurl}/images/emotions.gif','mceEmotion');}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceEmotion":var template=new Array();template['file']='../../plugins/emotions/emotions.htm';template['width']=160;template['height']=160;template['width']+=tinyMCE.getLang('lang_emotions_delta_width',0);template['height']+=tinyMCE.getLang('lang_emotions_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});return true;}return false;}};tinyMCE.addPlugin('emotions',TinyMCE_EmotionsPlugin); \ No newline at end of file diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/emotions/editor_plugin_src.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/emotions/editor_plugin_src.js index 4517b9479..10db6422d 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/emotions/editor_plugin_src.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/emotions/editor_plugin_src.js @@ -1,51 +1,65 @@ -/* Import plugin specific language pack */ -tinyMCE.importPluginLanguagePack('emotions', 'en,sv,zh_cn,cs,fa,fr_ca,fr,de,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,zh_tw,zh_tw_utf8,sk'); +/** + * $RCSfile: editor_plugin_src.js,v $ + * $Revision: 1.23 $ + * $Date: 2006/02/10 16:29:38 $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved. + */ -function TinyMCE_emotions_getInfo() { - return { - longname : 'Emotions', - author : 'Moxiecode Systems', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_emotions.html', - version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion - }; +/* Import plugin specific language pack */ +tinyMCE.importPluginLanguagePack('emotions', 'en,tr,sv,zh_cn,cs,fa,fr_ca,fr,de,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,zh_tw,zh_tw_utf8,sk'); + +// Plucin static class +var TinyMCE_EmotionsPlugin = { + getInfo : function() { + return { + longname : 'Emotions', + author : 'Moxiecode Systems', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_emotions.html', + version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion + }; + }, + + /** + * Returns the HTML contents of the emotions control. + */ + getControlHTML : function(cn) { + switch (cn) { + case "emotions": + return tinyMCE.getButtonHTML(cn, 'lang_emotions_desc', '{$pluginurl}/images/emotions.gif', 'mceEmotion'); + } + + return ""; + }, + + /** + * Executes the mceEmotion command. + */ + execCommand : function(editor_id, element, command, user_interface, value) { + // Handle commands + switch (command) { + case "mceEmotion": + var template = new Array(); + + template['file'] = '../../plugins/emotions/emotions.htm'; // Relative to theme + template['width'] = 160; + template['height'] = 160; + + // Language specific width and height addons + template['width'] += tinyMCE.getLang('lang_emotions_delta_width', 0); + template['height'] += tinyMCE.getLang('lang_emotions_delta_height', 0); + + tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"}); + + return true; + } + + // Pass to next handler in chain + return false; + } }; -/** - * Returns the HTML contents of the emotions control. - */ -function TinyMCE_emotions_getControlHTML(control_name) { - switch (control_name) { - case "emotions": - var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceEmotion\');return false;'; - return ''; - } - - return ""; -} - -/** - * Executes the mceEmotion command. - */ -function TinyMCE_emotions_execCommand(editor_id, element, command, user_interface, value) { - // Handle commands - switch (command) { - case "mceEmotion": - var template = new Array(); - - template['file'] = '../../plugins/emotions/emotions.htm'; // Relative to theme - template['width'] = 160; - template['height'] = 160; - - // Language specific width and height addons - template['width'] += tinyMCE.getLang('lang_emotions_delta_width', 0); - template['height'] += tinyMCE.getLang('lang_emotions_delta_height', 0); - - tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"}); - - return true; - } - - // Pass to next handler in chain - return false; -} +// Register plugin +tinyMCE.addPlugin('emotions', TinyMCE_EmotionsPlugin); diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/emotions/images/emotions.gif b/www/extras/tinymce2/jscripts/tiny_mce/plugins/emotions/images/emotions.gif index 26adbe68aad9509fadb09f54e8d21928d036b508..a39ed8ec3807e9da5725bfffc1a9e64694156d7a 100644 GIT binary patch delta 213 zcmV;`04o3G0>1(bM@dFFIbjq46ad5kkqmTyyx=E}WNDsgDjJ#RWrive%Y{f1axFw! zIf%`K!I*3ij>^f9kW4NYB6K22#7YY%qoE*ji;_jjP}pEF3dK2n-W0B)3}SNbH0pQE z1d$^(eIsNH90DB)hzT7691L$j zBoq!CgB<|103CxH4isYvvJVad0uH%WCmIO|frAVf2niY~1`Y*ALIn=74h|Xy PyfPvI<^kmCBOw4g#XCS~ delta 251 zcmVM@dFFIbjq46adr^kqmTy;@~HaWNDUAs-`CiMMma%nGr$l2NBDK zND{~6$fH7VK62egrjmm84{Ao<>K5*R-37QEV0vrr}jt~?M8Ps4-NtX4$ff*V-OY^ z2?(JN3>XLr8Wv-K76uLlP)r351{RJe78C{=4h|X&P+*s1nuP!e1K?|yqoIfp06W$# BNSpuw diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/emotions/jscripts/functions.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/emotions/jscripts/functions.js index b151b577b..95a9eafe8 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/emotions/jscripts/functions.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/emotions/jscripts/functions.js @@ -12,9 +12,9 @@ function insertEmotion(file_name, title) { title = title.replace(/&/g, '&'); title = title.replace(/\"/g, '"'); title = title.replace(//g, '&gr;'); + title = title.replace(/>/g, '>'); - var html = '' + title + ''; + var html = '' + title + ''; tinyMCE.execCommand('mceInsertContent', false, html); tinyMCEPopup.close(); diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/emotions/langs/da.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/emotions/langs/da.js index a671571d3..248dc2030 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/emotions/langs/da.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/emotions/langs/da.js @@ -1,22 +1,22 @@ -// DK lang variables contributed by Jan Moelgaard +// DK lang variables contributed by Jan Moelgaard, John Dalsgaard and Bo Frederiksen. tinyMCE.addToLang('emotions',{ -title : 'Indsæt smiley', +title : 'Indsæt smiley', desc : 'Smileys', -cool : 'Cool', -cry : 'Gråd', +cool : 'Sej', +cry : 'Gråd', embarassed : 'Forlegen', foot_in_mouth : 'Foden i munden', frown : 'Rynket pande', innocent : 'Uskyldig', kiss : 'Kys', laughing : 'Latter', -money_mouth : 'Lækker mund', +money_mouth : 'Lækker mund', sealed : 'Lukket af', smile : 'Smil', surprised : 'Overrasket', -tongue_out : 'Ræk tunge', +tongue_out : 'Ræk tunge', undecided : 'Usikker', wink : 'Blink', -yell : 'Råb' +yell : 'Råb' }); diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/emotions/langs/zh_cn.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/emotions/langs/zh_cn.js index 2d05cb923..b0a98be09 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/emotions/langs/zh_cn.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/emotions/langs/zh_cn.js @@ -1,22 +1,23 @@ -// Simplified Chinese lang variables contributed by tom_cat (thomaswangyang@gmail.com) +// Simplified Chinese lang variables contributed by TinyMCE_China_Team ( tinymce_china {AT} yahoogroups {DOT} com ). +// visit our homepage at: http://www.cube316.net/tinymce/ for more information. tinyMCE.addToLang('emotions',{ title : '²åÈë±íÇé', desc : '±íÇé', -cool : 'Cool', -cry : 'Cry', -embarassed : 'Embarassed', +cool : '¿á', +cry : '¿Þ', +embarassed : 'ÞÏÞÎ', foot_in_mouth : 'Foot in mouth', -frown : 'Frown', -innocent : 'Innocent', -kiss : 'Kiss', -laughing : 'Laughing', +frown : 'Öåü', +innocent : 'ÎÞ¹¼', +kiss : 'Ç×ÎÇ', +laughing : '´óЦ', money_mouth : 'Money mouth', -sealed : 'Sealed', -smile : 'Smile', -surprised : 'Surprised', -tongue_out : 'Tongue out', -undecided : 'Undecided', -wink : 'Wink', -yell : 'Yell' +sealed : '±£ÃÜ', +smile : '΢Ц', +surprised : '¾ªÑÈ', +tongue_out : 'ÍÂÉà', +undecided : 'ÓÌÔ¥', +wink : 'Õ£ÑÛ', +yell : '´ó½Ð' }); \ No newline at end of file diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/flash/editor_plugin.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/flash/editor_plugin.js index daf029499..244c3c0d6 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/flash/editor_plugin.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/flash/editor_plugin.js @@ -1 +1 @@ -tinyMCE.importPluginLanguagePack('flash','en,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,zh_tw,zh_tw_utf8,sk,pt_br');function TinyMCE_flash_getInfo(){return{longname:'Flash',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_flash.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};};function TinyMCE_flash_initInstance(inst){if(!tinyMCE.settings['flash_skip_plugin_css'])tinyMCE.importCSS(inst.getDoc(),tinyMCE.baseURL+"/plugins/flash/css/content.css");}function TinyMCE_flash_getControlHTML(control_name){switch(control_name){case "flash":var cmd='tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceFlash\');return false;';return '';}return "";}function TinyMCE_flash_parseAttributes(attribute_string){var attributeName="";var attributeValue="";var withInName;var withInValue;var attributes=new Array();var whiteSpaceRegExp=new RegExp('^[ \n\r\t]+','g');if(attribute_string==null||attribute_string.length<2)return null;withInName=withInValue=false;for(var i=0;i','gi'),'');content=content.replace(new RegExp('<[ ]*object','gi'),'','gi'),'');while((startPos=content.indexOf('',startPos);var attribs=TinyMCE_flash_parseAttributes(content.substring(startPos+6,endPos));embedList[embedList.length]=attribs;}var index=0;while((startPos=content.indexOf('=embedList.length)break;var attribs=embedList[index];endPos=content.indexOf('',startPos);endPos+=9;var contentAfter=content.substring(endPos);content=content.substring(0,startPos);content+=''+content.substring(endPos);content+=contentAfter;index++;startPos++;}var index=0;while((startPos=content.indexOf('=embedList.length)break;var attribs=embedList[index];endPos=content.indexOf('>',startPos);endPos+=9;var contentAfter=content.substring(endPos);content=content.substring(0,startPos);content+=''+content.substring(endPos);content+=contentAfter;index++;startPos++;}break;case "get_from_editor":var startPos=-1;while((startPos=content.indexOf('',startPos);var attribs=TinyMCE_flash_parseAttributes(content.substring(startPos+4,endPos));if(attribs['class']!="mceItemFlash")continue;endPos+=2;var embedHTML='';var wmode=tinyMCE.getParam("flash_wmode","");var quality=tinyMCE.getParam("flash_quality","high");var menu=tinyMCE.getParam("flash_menu","false");embedHTML+='';embedHTML+='';embedHTML+='';embedHTML+='';embedHTML+='';embedHTML+='';chunkBefore=content.substring(0,startPos);chunkAfter=content.substring(endPos);content=chunkBefore+embedHTML+chunkAfter;}break;}return content;}function TinyMCE_flash_handleNodeChange(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){tinyMCE.switchClassSticky(editor_id+'_flash','mceButtonNormal');if(node==null)return;do{if(node.nodeName.toLowerCase()=="img"&&tinyMCE.getAttrib(node,'class').indexOf('mceItemFlash')==0)tinyMCE.switchClassSticky(editor_id+'_flash','mceButtonSelected');}while((node=node.parentNode));return true;} \ No newline at end of file +tinyMCE.importPluginLanguagePack('flash','en,tr,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,zh_tw,zh_tw_utf8,sk,pt_br');var TinyMCE_FlashPlugin={getInfo:function(){return{longname:'Flash',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_flash.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},initInstance:function(inst){if(!tinyMCE.settings['flash_skip_plugin_css'])tinyMCE.importCSS(inst.getDoc(),tinyMCE.baseURL+"/plugins/flash/css/content.css");},getControlHTML:function(cn){switch(cn){case"flash":return tinyMCE.getButtonHTML(cn,'lang_flash_desc','{$pluginurl}/images/flash.gif','mceFlash');}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceFlash":var name="",swffile="",swfwidth="",swfheight="",action="insert";var template=new Array();var inst=tinyMCE.getInstanceById(editor_id);var focusElm=inst.getFocusElement();template['file']='../../plugins/flash/flash.htm';template['width']=430;template['height']=175;template['width']+=tinyMCE.getLang('lang_flash_delta_width',0);template['height']+=tinyMCE.getLang('lang_flash_delta_height',0);if(focusElm!=null&&focusElm.nodeName.toLowerCase()=="img"){name=tinyMCE.getAttrib(focusElm,'class');if(name.indexOf('mceItemFlash')==-1)return true;swffile=tinyMCE.getAttrib(focusElm,'alt');if(tinyMCE.getParam('convert_urls'))swffile=eval(tinyMCE.settings['urlconverter_callback']+"(swffile, null, true);");swfwidth=tinyMCE.getAttrib(focusElm,'width');swfheight=tinyMCE.getAttrib(focusElm,'height');action="update";}tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes",swffile:swffile,swfwidth:swfwidth,swfheight:swfheight,action:action});return true;}return false;},cleanup:function(type,content){switch(type){case"insert_to_editor_dom":if(tinyMCE.getParam('convert_urls')){var imgs=content.getElementsByTagName("img");for(var i=0;i','gi'),'');content=content.replace(new RegExp('<[ ]*object','gi'),'','gi'),'');while((startPos=content.indexOf('',startPos);var attribs=TinyMCE_FlashPlugin._parseAttributes(content.substring(startPos+6,endPos));embedList[embedList.length]=attribs;}var index=0;while((startPos=content.indexOf('=embedList.length)break;var attribs=embedList[index];endPos=content.indexOf('',startPos);endPos+=9;var contentAfter=content.substring(endPos);content=content.substring(0,startPos);content+=''+content.substring(endPos);content+=contentAfter;index++;startPos++;}var index=0;while((startPos=content.indexOf('=embedList.length)break;var attribs=embedList[index];endPos=content.indexOf('>',startPos);endPos+=9;var contentAfter=content.substring(endPos);content=content.substring(0,startPos);content+=''+content.substring(endPos);content+=contentAfter;index++;startPos++;}break;case"get_from_editor":var startPos=-1;while((startPos=content.indexOf('',startPos);var attribs=TinyMCE_FlashPlugin._parseAttributes(content.substring(startPos+4,endPos));if(attribs['class']!="mceItemFlash")continue;endPos+=2;var embedHTML='';var wmode=tinyMCE.getParam("flash_wmode","");var quality=tinyMCE.getParam("flash_quality","high");var menu=tinyMCE.getParam("flash_menu","false");embedHTML+='';embedHTML+='';embedHTML+='';embedHTML+='';embedHTML+='';embedHTML+='';chunkBefore=content.substring(0,startPos);chunkAfter=content.substring(endPos);content=chunkBefore+embedHTML+chunkAfter;}break;}return content;},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){if(node==null)return;do{if(node.nodeName=="IMG"&&tinyMCE.getAttrib(node,'class').indexOf('mceItemFlash')==0){tinyMCE.switchClass(editor_id+'_flash','mceButtonSelected');return true;}}while((node=node.parentNode));tinyMCE.switchClass(editor_id+'_flash','mceButtonNormal');return true;},_parseAttributes:function(attribute_string){var attributeName="";var attributeValue="";var withInName;var withInValue;var attributes=new Array();var whiteSpaceRegExp=new RegExp('^[ \n\r\t]+','g');if(attribute_string==null||attribute_string.length<2)return null;withInName=withInValue=false;for(var i=0;i'; - } + getControlHTML : function(cn) { + switch (cn) { + case "flash": + return tinyMCE.getButtonHTML(cn, 'lang_flash_desc', '{$pluginurl}/images/flash.gif', 'mceFlash'); + } - return ""; -} + return ""; + }, -function TinyMCE_flash_parseAttributes(attribute_string) { - var attributeName = ""; - var attributeValue = ""; - var withInName; - var withInValue; - var attributes = new Array(); - var whiteSpaceRegExp = new RegExp('^[ \n\r\t]+', 'g'); + execCommand : function(editor_id, element, command, user_interface, value) { + // Handle commands + switch (command) { + case "mceFlash": + var name = "", swffile = "", swfwidth = "", swfheight = "", action = "insert"; + var template = new Array(); + var inst = tinyMCE.getInstanceById(editor_id); + var focusElm = inst.getFocusElement(); - if (attribute_string == null || attribute_string.length < 2) - return null; + template['file'] = '../../plugins/flash/flash.htm'; // Relative to theme + template['width'] = 430; + template['height'] = 175; - withInName = withInValue = false; + template['width'] += tinyMCE.getLang('lang_flash_delta_width', 0); + template['height'] += tinyMCE.getLang('lang_flash_delta_height', 0); - for (var i=0; i','gi'),''); + content = content.replace(new RegExp('<[ ]*object','gi'),'','gi'),''); - imgs[i].setAttribute('alt', src); - imgs[i].setAttribute('title', src); + // Parse all embed tags + while ((startPos = content.indexOf('', startPos); + var attribs = TinyMCE_FlashPlugin._parseAttributes(content.substring(startPos + 6, endPos)); + embedList[embedList.length] = attribs; } + + // Parse all object tags and replace them with images from the embed data + var index = 0; + while ((startPos = content.indexOf('= embedList.length) + break; + + var attribs = embedList[index]; + + // Find end of object + endPos = content.indexOf('', startPos); + endPos += 9; + + // Insert image + var contentAfter = content.substring(endPos); + content = content.substring(0, startPos); + content += '' + content.substring(endPos); + content += contentAfter; + index++; + + startPos++; + } + + // Parse all embed tags and replace them with images from the embed data + var index = 0; + while ((startPos = content.indexOf('= embedList.length) + break; + + var attribs = embedList[index]; + + // Find end of embed + endPos = content.indexOf('>', startPos); + endPos += 9; + + // Insert image + var contentAfter = content.substring(endPos); + content = content.substring(0, startPos); + content += '' + content.substring(endPos); + content += contentAfter; + index++; + + startPos++; + } + + break; + + case "get_from_editor": + // Parse all img tags and replace them with object+embed + var startPos = -1; + + while ((startPos = content.indexOf('', startPos); + var attribs = TinyMCE_FlashPlugin._parseAttributes(content.substring(startPos + 4, endPos)); + + // Is not flash, skip it + if (attribs['class'] != "mceItemFlash") + continue; + + endPos += 2; + + var embedHTML = ''; + var wmode = tinyMCE.getParam("flash_wmode", ""); + var quality = tinyMCE.getParam("flash_quality", "high"); + var menu = tinyMCE.getParam("flash_menu", "false"); + + // Insert object + embed + embedHTML += ''; + embedHTML += ''; + embedHTML += ''; + embedHTML += ''; + embedHTML += ''; + embedHTML += ''; + + // Insert embed/object chunk + chunkBefore = content.substring(0, startPos); + chunkAfter = content.substring(endPos); + content = chunkBefore + embedHTML + chunkAfter; + } + break; + } + + // Pass through to next handler in chain + return content; + }, + + handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) { + if (node == null) + return; + + do { + if (node.nodeName == "IMG" && tinyMCE.getAttrib(node, 'class').indexOf('mceItemFlash') == 0) { + tinyMCE.switchClass(editor_id + '_flash', 'mceButtonSelected'); + return true; } - break; + } while ((node = node.parentNode)); - case "insert_to_editor": - var startPos = 0; - var embedList = new Array(); + tinyMCE.switchClass(editor_id + '_flash', 'mceButtonNormal'); - // Fix the embed and object elements - content = content.replace(new RegExp('<[ ]*embed','gi'),'','gi'),''); - content = content.replace(new RegExp('<[ ]*object','gi'),'','gi'),''); + return true; + }, - // Parse all embed tags - while ((startPos = content.indexOf('', startPos); - var attribs = TinyMCE_flash_parseAttributes(content.substring(startPos + 6, endPos)); - embedList[embedList.length] = attribs; - } + // Private plugin internal functions - // Parse all object tags and replace them with images from the embed data - var index = 0; - while ((startPos = content.indexOf('= embedList.length) - break; + _parseAttributes : function(attribute_string) { + var attributeName = ""; + var attributeValue = ""; + var withInName; + var withInValue; + var attributes = new Array(); + var whiteSpaceRegExp = new RegExp('^[ \n\r\t]+', 'g'); - var attribs = embedList[index]; + if (attribute_string == null || attribute_string.length < 2) + return null; - // Find end of object - endPos = content.indexOf('', startPos); - endPos += 9; + withInName = withInValue = false; - // Insert image - var contentAfter = content.substring(endPos); - content = content.substring(0, startPos); - content += '' + content.substring(endPos); - content += contentAfter; - index++; + for (var i=0; i= embedList.length) - break; + var pos = attributeName.lastIndexOf(' '); + if (pos != -1) + attributeName = attributeName.substring(pos+1); - var attribs = embedList[index]; + attributes[attributeName.toLowerCase()] = attributeValue.substring(1); - // Find end of embed - endPos = content.indexOf('>', startPos); - endPos += 9; + attributeName = ""; + attributeValue = ""; + } else if (!whiteSpaceRegExp.test(chr) && !withInName && !withInValue) + withInName = true; - // Insert image - var contentAfter = content.substring(endPos); - content = content.substring(0, startPos); - content += '' + content.substring(endPos); - content += contentAfter; - index++; + if (chr == '=' && withInName) + withInName = false; - startPos++; - } + if (withInName) + attributeName += chr; - break; + if (withInValue) + attributeValue += chr; + } - case "get_from_editor": - // Parse all img tags and replace them with object+embed - var startPos = -1; - while ((startPos = content.indexOf('', startPos); - var attribs = TinyMCE_flash_parseAttributes(content.substring(startPos + 4, endPos)); - - // Is not flash, skip it - if (attribs['class'] != "mceItemFlash") - continue; - - endPos += 2; - - var embedHTML = ''; - var wmode = tinyMCE.getParam("flash_wmode", ""); - var quality = tinyMCE.getParam("flash_quality", "high"); - var menu = tinyMCE.getParam("flash_menu", "false"); - - // Insert object + embed - embedHTML += ''; - embedHTML += ''; - embedHTML += ''; - embedHTML += ''; - embedHTML += ''; - embedHTML += ''; - - // Insert embed/object chunk - chunkBefore = content.substring(0, startPos); - chunkAfter = content.substring(endPos); - content = chunkBefore + embedHTML + chunkAfter; - } - break; + return attributes; } +}; - // Pass through to next handler in chain - return content; -} - -function TinyMCE_flash_handleNodeChange(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) { - tinyMCE.switchClassSticky(editor_id + '_flash', 'mceButtonNormal'); - - if (node == null) - return; - - do { - if (node.nodeName.toLowerCase() == "img" && tinyMCE.getAttrib(node, 'class').indexOf('mceItemFlash') == 0) - tinyMCE.switchClassSticky(editor_id + '_flash', 'mceButtonSelected'); - } while ((node = node.parentNode)); - - return true; -} +tinyMCE.addPlugin("flash", TinyMCE_FlashPlugin); diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/flash/langs/cs.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/flash/langs/cs.js index cebe01976..cbc5aff40 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/flash/langs/cs.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/flash/langs/cs.js @@ -2,13 +2,15 @@ * Czech lang variables * encoding: utf-8 * - * $Id: cs.js,v 1.6 2005/10/18 13:59:42 spocke Exp $ + * $Id: cs.js,v 1.8 2006/02/23 09:05:57 spocke Exp $ */ -tinyMCE.addToLang('',{ -insert_flash : 'Vložit/editovat Flash Movie', -insert_flash_file : 'Flash soubor (.swf)', -insert_flash_size : 'Velikost', -insert_flash_list : 'Seznam', -flash_props : 'Vlastnosti Flash' +tinyMCE.addToLang('flash',{ +title : 'Vložit / editovat Flash', +desc : 'Vložit / editovat Flash', +file : 'Flash soubor (.swf)', +size : 'Velikost', +list : 'Flash soubory', +props : 'Flash nastavení', +general : 'Obecné' }); diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/flash/langs/da.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/flash/langs/da.js index cd2134af0..90cc854c3 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/flash/langs/da.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/flash/langs/da.js @@ -1,10 +1,10 @@ -// DK lang variables contributed by Jan Moelgaard +// DK lang variables contributed by Jan Moelgaard, John Dalsgaard and Bo Frederiksen. tinyMCE.addToLang('flash',{ -title : 'Indsæt / rediger Flash-film', -desc : 'Indsæt / rediger Flash-film', +title : 'Indsæt / rediger Flash-film', +desc : 'Indsæt / rediger Flash-film', file : 'Flash-Fil (.swf)', -size : 'Størrelse', +size : 'Størrelse', list : 'Flash filer', props : 'Flash egenskaber', general : 'Genererelt' diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/flash/langs/zh_cn.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/flash/langs/zh_cn.js index 82c830d4e..f8d306094 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/flash/langs/zh_cn.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/flash/langs/zh_cn.js @@ -1,4 +1,5 @@ -// Simplified Chinese lang variables contributed by tom_cat (thomaswangyang@gmail.com) +// Simplified Chinese lang variables contributed by TinyMCE_China_Team ( tinymce_china {AT} yahoogroups {DOT} com ). +// visit our homepage at: http://www.cube316.net/tinymce/ for more information. tinyMCE.addToLang('flash',{ title : '²åÈë/±à¼­ FlashµçÓ°', diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/fullscreen/editor_plugin.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/fullscreen/editor_plugin.js index 4c6bccd32..e0e3602b4 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/fullscreen/editor_plugin.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/fullscreen/editor_plugin.js @@ -1 +1 @@ -tinyMCE.importPluginLanguagePack('fullscreen','en,sv,cs,fr_ca,zh_cn,da,he,nb,de,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,pl,nl,fr,pt_br');function TinyMCE_fullscreen_getInfo(){return{longname:'Fullscreen',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_fullscreen.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};};function TinyMCE_fullscreen_getControlHTML(control_name){switch(control_name){case "fullscreen":var cmd='tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceFullScreen\');return false;';return '';}return "";}function TinyMCE_fullscreen_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mceFullScreen":if(tinyMCE.getParam('fullscreen_is_enabled')){window.opener.tinyMCE.execInstanceCommand(tinyMCE.getParam('fullscreen_editor_id'),'mceSetContent',false,tinyMCE.getContent(editor_id));top.close();}else{tinyMCE.setWindowArg('editor_id',editor_id);var win=window.open(tinyMCE.baseURL+"/plugins/fullscreen/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);}return true;}return false;} \ No newline at end of file +tinyMCE.importPluginLanguagePack('fullscreen','en,tr,sv,cs,fr_ca,zh_cn,da,he,nb,de,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,pl,nl,fr,pt_br');var TinyMCE_FullScreenPlugin={getInfo:function(){return{longname:'Fullscreen',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_fullscreen.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},getControlHTML:function(cn){switch(cn){case"fullscreen":return tinyMCE.getButtonHTML(cn,'lang_fullscreen_desc','{$pluginurl}/images/fullscreen.gif','mceFullScreen');}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceFullScreen":if(tinyMCE.getParam('fullscreen_is_enabled')){window.opener.tinyMCE.execInstanceCommand(tinyMCE.getParam('fullscreen_editor_id'),'mceSetContent',false,tinyMCE.getContent(editor_id));top.close();}else{tinyMCE.setWindowArg('editor_id',editor_id);var win=window.open(tinyMCE.baseURL+"/plugins/fullscreen/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);try{win.resizeTo(screen.availWidth,screen.availHeight);}catch(e){}}return true;}return false;},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){if(tinyMCE.getParam('fullscreen_is_enabled'))tinyMCE.switchClass(editor_id+'_fullscreen','mceButtonSelected');return true;}};tinyMCE.addPlugin("fullscreen",TinyMCE_FullScreenPlugin); \ No newline at end of file diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/fullscreen/editor_plugin_src.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/fullscreen/editor_plugin_src.js index 68ab1f9e5..b6ef902da 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/fullscreen/editor_plugin_src.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/fullscreen/editor_plugin_src.js @@ -1,45 +1,63 @@ -/* Import plugin specific language pack */ -tinyMCE.importPluginLanguagePack('fullscreen', 'en,sv,cs,fr_ca,zh_cn,da,he,nb,de,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,pl,nl,fr,pt_br'); +/** + * $RCSfile: editor_plugin_src.js,v $ + * $Revision: 1.16 $ + * $Date: 2006/03/14 17:33:39 $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved. + */ -function TinyMCE_fullscreen_getInfo() { - return { - longname : 'Fullscreen', - author : 'Moxiecode Systems', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_fullscreen.html', - version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion - }; +/* Import plugin specific language pack */ +tinyMCE.importPluginLanguagePack('fullscreen', 'en,tr,sv,cs,fr_ca,zh_cn,da,he,nb,de,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,pl,nl,fr,pt_br'); + +var TinyMCE_FullScreenPlugin = { + getInfo : function() { + return { + longname : 'Fullscreen', + author : 'Moxiecode Systems', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_fullscreen.html', + version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion + }; + }, + + getControlHTML : function(cn) { + switch (cn) { + case "fullscreen": + return tinyMCE.getButtonHTML(cn, 'lang_fullscreen_desc', '{$pluginurl}/images/fullscreen.gif', 'mceFullScreen'); + } + + return ""; + }, + + execCommand : function(editor_id, element, command, user_interface, value) { + // Handle commands + switch (command) { + case "mceFullScreen": + if (tinyMCE.getParam('fullscreen_is_enabled')) { + // In fullscreen mode + window.opener.tinyMCE.execInstanceCommand(tinyMCE.getParam('fullscreen_editor_id'), 'mceSetContent', false, tinyMCE.getContent(editor_id)); + top.close(); + } else { + tinyMCE.setWindowArg('editor_id', editor_id); + + var win = window.open(tinyMCE.baseURL + "/plugins/fullscreen/fullscreen.htm", "mceFullScreenPopup", "fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width=" + screen.availWidth + ",height=" + screen.availHeight); + try { win.resizeTo(screen.availWidth, screen.availHeight); } catch (e) {} + } + + return true; + } + + // Pass to next handler in chain + return false; + }, + + handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) { + if (tinyMCE.getParam('fullscreen_is_enabled')) + tinyMCE.switchClass(editor_id + '_fullscreen', 'mceButtonSelected'); + + return true; + } }; -function TinyMCE_fullscreen_getControlHTML(control_name) { - switch (control_name) { - case "fullscreen": - var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceFullScreen\');return false;'; - return ''; - } - - return ""; -} - -function TinyMCE_fullscreen_execCommand(editor_id, element, command, user_interface, value) { - // Handle commands - switch (command) { - case "mceFullScreen": - if (tinyMCE.getParam('fullscreen_is_enabled')) { - // In fullscreen mode - window.opener.tinyMCE.execInstanceCommand(tinyMCE.getParam('fullscreen_editor_id'), 'mceSetContent', false, tinyMCE.getContent(editor_id)); - top.close(); - } else { - tinyMCE.setWindowArg('editor_id', editor_id); - - var win = window.open(tinyMCE.baseURL + "/plugins/fullscreen/fullscreen.htm", "mceFullScreenPopup", "fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width=" + screen.availWidth + ",height=" + screen.availHeight); - } - - return true; - } - - // Pass to next handler in chain - return false; -} - - +tinyMCE.addPlugin("fullscreen", TinyMCE_FullScreenPlugin); diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/fullscreen/fullscreen.htm b/www/extras/tinymce2/jscripts/tiny_mce/plugins/fullscreen/fullscreen.htm index d648d7610..5e455cde4 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/fullscreen/fullscreen.htm +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/fullscreen/fullscreen.htm @@ -29,6 +29,7 @@ patchCallback(settings, 'init_instance_callback'); patchCallback(settings, 'file_browser_callback'); patchCallback(settings, 'cleanup_callback'); + patchCallback(settings, 'execcommand_callback'); patchCallback(settings, 'oninit'); // Set options @@ -46,7 +47,7 @@ function setupContent(editor_id, body, doc) { var inst = tinyMCE.getInstanceById(editor_id); - var backInst = window.opener.tinyMCE.getInstanceById(tinyMCE.getParam('fullscreen_editor_id')); + var content = window.opener.tinyMCE.getContent(tinyMCE.getParam('fullscreen_editor_id')); // Setup title var divElm = document.createElement("div"); @@ -54,20 +55,37 @@ document.title = divElm.innerHTML; // Get content - inst.getBody().innerHTML = backInst.getBody().innerHTML; + inst.execCommand('mceSetContent', false, content); } function unloadHandler(e) { + moveContent(); + } + + function moveContent() { var doc = tinyMCE.isMSIE ? window.frames['mce_editor_0'].window.document : document.getElementById('mce_editor_0').contentDocument; window.opener.tinyMCE.setInnerHTML(window.opener.tinyMCE.selectedInstance.getBody(), doc.body.innerHTML); } // Add onunload tinyMCE.addEvent(window, "beforeunload", unloadHandler); + + function doParentSubmit() { + moveContent(); + + if (window.opener.tinyMCE.selectedInstance.formElement.form) + window.opener.tinyMCE.selectedInstance.formElement.form.submit(); + + window.close(); + + return false; + } - + +
    +
    diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/fullscreen/langs/cs.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/fullscreen/langs/cs.js index fc40a3e13..df6f362ad 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/fullscreen/langs/cs.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/fullscreen/langs/cs.js @@ -2,7 +2,7 @@ * Czech lang variables * encoding: utf-8 * - * $Id: cs.js,v 1.4 2005/10/18 13:59:42 spocke Exp $ + * $Id: cs.js,v 1.5 2006/01/11 14:25:48 spocke Exp $ */ tinyMCE.addToLang('',{ diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/fullscreen/langs/da.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/fullscreen/langs/da.js index 4d86b01c5..b07fe8f55 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/fullscreen/langs/da.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/fullscreen/langs/da.js @@ -1,6 +1,6 @@ -// DK lang variables contributed by Jan Moelgaard +// DK lang variables contributed by Jan Moelgaard, John Dalsgaard and Bo Frederiksen. tinyMCE.addToLang('',{ -fullscreen_title : 'Fuldskærmstilstand', -fullscreen_desc : 'Tænd / sluk for fuldskærm' +fullscreen_title : 'Fuldskærmstilstand', +fullscreen_desc : 'Tænd / sluk for fuldskærm' }); diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/fullscreen/langs/zh_cn.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/fullscreen/langs/zh_cn.js index 866427f28..fe6b82b6a 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/fullscreen/langs/zh_cn.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/fullscreen/langs/zh_cn.js @@ -1,4 +1,5 @@ -// Simplified Chinese lang variables contributed by tom_cat (thomaswangyang@gmail.com) +// Simplified Chinese lang variables contributed by TinyMCE_China_Team ( tinymce_china {AT} yahoogroups {DOT} com ). +// visit our homepage at: http://www.cube316.net/tinymce/ for more information. tinyMCE.addToLang('',{ fullscreen_title : 'È«ÆÁģʽ', diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/iespell/editor_plugin.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/iespell/editor_plugin.js index 9368e44b3..33a2b788c 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/iespell/editor_plugin.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/iespell/editor_plugin.js @@ -1 +1 @@ -tinyMCE.importPluginLanguagePack('iespell','cs,el,en,fr_ca,it,ko,sv,zh_cn,fr,de,pl,pt_br,nl,da,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,zh_tw,zh_tw_utf8,sk');function TinyMCE_iespell_getInfo(){return{longname:'IESpell',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_iespell.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};};function TinyMCE_iespell_getControlHTML(control_name){if(control_name=="iespell"&&(tinyMCE.isMSIE&&!tinyMCE.isOpera)){var cmd='tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceIESpell\');return false;';return '';}return "";}function TinyMCE_iespell_execCommand(editor_id,element,command,user_interface,value){if(command=="mceIESpell"){try{var ieSpell=new ActiveXObject("ieSpell.ieSpellExtension");ieSpell.CheckDocumentNode(tinyMCE.getInstanceById(editor_id).contentDocument.documentElement);}catch(e){if(e.number==-2146827859){if(confirm(tinyMCE.getLang("lang_iespell_download","",true)))window.open('http://www.iespell.com/download.php','ieSpellDownload','');}else alert("Error Loading ieSpell: Exception "+e.number);}return true;}return false;} \ No newline at end of file +tinyMCE.importPluginLanguagePack('iespell','en,tr,cs,el,fr_ca,it,ko,sv,zh_cn,fr,de,pl,pt_br,nl,da,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,zh_tw,zh_tw_utf8,sk');var TinyMCE_IESpellPlugin={getInfo:function(){return{longname:'IESpell (MSIE Only)',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_iespell.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},getControlHTML:function(cn){if(cn=="iespell"&&(tinyMCE.isMSIE&&!tinyMCE.isOpera))return tinyMCE.getButtonHTML(cn,'lang_iespell_desc','{$pluginurl}/images/iespell.gif','mceIESpell');return"";},execCommand:function(editor_id,element,command,user_interface,value){if(command=="mceIESpell"){try{var ieSpell=new ActiveXObject("ieSpell.ieSpellExtension");ieSpell.CheckDocumentNode(tinyMCE.getInstanceById(editor_id).contentDocument.documentElement);}catch(e){if(e.number==-2146827859){if(confirm(tinyMCE.getLang("lang_iespell_download","",true)))window.open('http://www.iespell.com/download.php','ieSpellDownload','');}else alert("Error Loading ieSpell: Exception "+e.number);}return true;}return false;}};tinyMCE.addPlugin("iespell",TinyMCE_IESpellPlugin); \ No newline at end of file diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/iespell/editor_plugin_src.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/iespell/editor_plugin_src.js index 1b09fb72d..ef1c875a3 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/iespell/editor_plugin_src.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/iespell/editor_plugin_src.js @@ -1,49 +1,60 @@ +/** + * $RCSfile: editor_plugin_src.js,v $ + * $Revision: 1.20 $ + * $Date: 2006/02/10 16:29:39 $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved. + */ + /* Import plugin specific language pack */ -tinyMCE.importPluginLanguagePack('iespell', 'cs,el,en,fr_ca,it,ko,sv,zh_cn,fr,de,pl,pt_br,nl,da,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,zh_tw,zh_tw_utf8,sk'); +tinyMCE.importPluginLanguagePack('iespell', 'en,tr,cs,el,fr_ca,it,ko,sv,zh_cn,fr,de,pl,pt_br,nl,da,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,zh_tw,zh_tw_utf8,sk'); -function TinyMCE_iespell_getInfo() { - return { - longname : 'IESpell', - author : 'Moxiecode Systems', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_iespell.html', - version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion - }; -}; +var TinyMCE_IESpellPlugin = { + getInfo : function() { + return { + longname : 'IESpell (MSIE Only)', + author : 'Moxiecode Systems', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_iespell.html', + version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion + }; + }, -/** - * Returns the HTML contents of the iespell control. - */ -function TinyMCE_iespell_getControlHTML(control_name) { - // Is it the iespell control and is the brower MSIE. - if (control_name == "iespell" && (tinyMCE.isMSIE && !tinyMCE.isOpera)) { - var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceIESpell\');return false;'; - return ''; - } + /** + * Returns the HTML contents of the iespell control. + */ + getControlHTML : function(cn) { + // Is it the iespell control and is the brower MSIE. + if (cn == "iespell" && (tinyMCE.isMSIE && !tinyMCE.isOpera)) + return tinyMCE.getButtonHTML(cn, 'lang_iespell_desc', '{$pluginurl}/images/iespell.gif', 'mceIESpell'); - return ""; -} + return ""; + }, -/** - * Executes the mceIESpell command. - */ -function TinyMCE_iespell_execCommand(editor_id, element, command, user_interface, value) { - // Handle ieSpellCommand - if (command == "mceIESpell") { - try { - var ieSpell = new ActiveXObject("ieSpell.ieSpellExtension"); - ieSpell.CheckDocumentNode(tinyMCE.getInstanceById(editor_id).contentDocument.documentElement); - } catch (e) { - if (e.number == -2146827859) { - if (confirm(tinyMCE.getLang("lang_iespell_download", "", true))) - window.open('http://www.iespell.com/download.php', 'ieSpellDownload', ''); - } else - alert("Error Loading ieSpell: Exception " + e.number); + /** + * Executes the mceIESpell command. + */ + execCommand : function(editor_id, element, command, user_interface, value) { + // Handle ieSpellCommand + if (command == "mceIESpell") { + try { + var ieSpell = new ActiveXObject("ieSpell.ieSpellExtension"); + ieSpell.CheckDocumentNode(tinyMCE.getInstanceById(editor_id).contentDocument.documentElement); + } catch (e) { + if (e.number == -2146827859) { + if (confirm(tinyMCE.getLang("lang_iespell_download", "", true))) + window.open('http://www.iespell.com/download.php', 'ieSpellDownload', ''); + } else + alert("Error Loading ieSpell: Exception " + e.number); + } + + return true; } - return true; + // Pass to next handler in chain + return false; } +}; - // Pass to next handler in chain - return false; -} \ No newline at end of file +tinyMCE.addPlugin("iespell", TinyMCE_IESpellPlugin); diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/iespell/langs/cs.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/iespell/langs/cs.js index 04e1282c9..8f9996a5e 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/iespell/langs/cs.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/iespell/langs/cs.js @@ -2,7 +2,7 @@ * Czech lang variables * encoding: utf-8 * - * $Id: cs.js,v 1.4 2005/10/18 13:59:42 spocke Exp $ + * $Id: cs.js,v 1.5 2006/01/11 14:25:48 spocke Exp $ */ tinyMCE.addToLang('',{ diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/iespell/langs/da.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/iespell/langs/da.js index 4612e1864..247deda85 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/iespell/langs/da.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/iespell/langs/da.js @@ -1,7 +1,7 @@ -// DK lang variables contributed by Jan Moelgaard +// DK lang variables contributed by Jan Moelgaard, John Dalsgaard and Bo Frederiksen. tinyMCE.addToLang('',{ iespell_desc : 'Lav stavekontrol', -iespell_download : "ieSpell kan ikke findes. Klik på OK for at fortsætte til downloadsiden." +iespell_download : "ieSpell kan ikke findes. Klik på OK for at fortsætte til downloadsiden." }); diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/iespell/langs/zh_cn.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/iespell/langs/zh_cn.js index 032655acf..01848d474 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/iespell/langs/zh_cn.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/iespell/langs/zh_cn.js @@ -1,4 +1,5 @@ -// Simplified Chinese lang variables contributed by tom_cat (thomaswangyang@gmail.com) +// Simplified Chinese lang variables contributed by TinyMCE_China_Team ( tinymce_china {AT} yahoogroups {DOT} com ). +// visit our homepage at: http://www.cube316.net/tinymce/ for more information. tinyMCE.addToLang('',{ iespell_desc : 'ÔËÐÐÆ´Ð´¼ì²é', diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/inlinepopups/css/inlinepopup.css b/www/extras/tinymce2/jscripts/tiny_mce/plugins/inlinepopups/css/inlinepopup.css index 2b62077eb..43be823cd 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/inlinepopups/css/inlinepopup.css +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/inlinepopups/css/inlinepopup.css @@ -2,8 +2,8 @@ .mceWindow { position: absolute; - left: 0px; - top: 0px; + left: 0; + top: 0; border: 1px solid black; background-color: #D4D0C8; } diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/inlinepopups/editor_plugin.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/inlinepopups/editor_plugin.js index a70f4d7c6..c0b2f9f58 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/inlinepopups/editor_plugin.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/inlinepopups/editor_plugin.js @@ -1 +1 @@ -function TinyMCE_inlinepopups_getInfo(){return{longname:'Inline Popups',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_inlinepopups.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};};TinyMCE.prototype.orgOpenWindow=TinyMCE.prototype.openWindow;TinyMCE.prototype.openWindow=function(template,args){if(args['inline']!="yes"||tinyMCE.isOpera||tinyMCE.getParam("plugins").indexOf('inlinepopups')==-1){mcWindows.selectedWindow=null;args['mce_inside_iframe']=false;this.orgOpenWindow(template,args);return;}var url,resizable,scrollbars;args['mce_inside_iframe']=true;tinyMCE.windowArgs=args;if(template['file'].charAt(0)!='/'&&template['file'].indexOf('://')==-1)url=tinyMCE.baseURL+"/themes/"+tinyMCE.getParam("theme")+"/"+template['file'];else url=template['file'];if(!(width=parseInt(template['width'])))width=320;if(!(height=parseInt(template['height'])))height=200;resizable=(args&&args['resizable'])?args['resizable']:"no";scrollbars=(args&&args['scrollbars'])?args['scrollbars']:"no";height+=18;for(var name in args){if(typeof(args[name])=='function')continue;url=tinyMCE.replaceVar(url,name,escape(args[name]));}var elm=document.getElementById(this.selectedInstance.editorId+'_parent');var pos=tinyMCE.getAbsPosition(elm);pos.absLeft+=Math.round((elm.firstChild.clientWidth/2)-(width/2));pos.absTop+=Math.round((elm.firstChild.clientHeight/2)-(height/2));mcWindows.open(url,mcWindows.idCounter++,"modal=yes,width="+width+",height="+height+",resizable="+resizable+",scrollbars="+scrollbars+",statusbar="+resizable+",left="+pos.absLeft+",top="+pos.absTop);};TinyMCE.prototype.orgCloseWindow=TinyMCE.prototype.closeWindow;TinyMCE.prototype.closeWindow=function(win){if(mcWindows.selectedWindow!=null)mcWindows.selectedWindow.close();else this.orgCloseWindow(win);};TinyMCE.prototype.setWindowTitle=function(win_ref,title){for(var n in mcWindows.windows){var win=mcWindows.windows[n];if(typeof(win)=='function')continue;if(win_ref.name==win.id+"_iframe")window.frames[win.id+"_iframe"].document.getElementById(win.id+'_title').innerHTML=title;}};function MCWindows(){this.settings=new Array();this.windows=new Array();this.isMSIE=(navigator.appName=="Microsoft Internet Explorer");this.isGecko=navigator.userAgent.indexOf('Gecko')!=-1;this.isSafari=navigator.userAgent.indexOf('Safari')!=-1;this.isMac=navigator.userAgent.indexOf('Mac')!=-1;this.isMSIE5_0=this.isMSIE&&(navigator.userAgent.indexOf('MSIE 5.0')!=-1);this.action="none";this.selectedWindow=null;this.lastSelectedWindow=null;this.zindex=100;this.mouseDownScreenX=0;this.mouseDownScreenY=0;this.mouseDownLayerX=0;this.mouseDownLayerY=0;this.mouseDownWidth=0;this.mouseDownHeight=0;this.idCounter=0;};MCWindows.prototype.init=function(settings){this.settings=settings;if(this.isMSIE)this.addEvent(document,"mousemove",mcWindows.eventDispatcher);else this.addEvent(window,"mousemove",mcWindows.eventDispatcher);this.addEvent(document,"mouseup",mcWindows.eventDispatcher);this.doc=document;};MCWindows.prototype.getParam=function(name,default_value){var value=null;value=(typeof(this.settings[name])=="undefined")?default_value:this.settings[name];if(value=="true"||value=="false")return(value=="true");return value;};MCWindows.prototype.eventDispatcher=function(e){e=typeof(e)=="undefined"?window.event:e;if(mcWindows.selectedWindow==null)return;if(mcWindows.isGecko&&e.type=="mousedown"){var elm=e.currentTarget;for(var n in mcWindows.windows){var win=mcWindows.windows[n];if(win.headElement==elm||win.resizeElement==elm){win.focus();break;}}}switch(e.type){case "mousemove":mcWindows.selectedWindow.onMouseMove(e);break;case "mouseup":mcWindows.selectedWindow.onMouseUp(e);break;case "mousedown":mcWindows.selectedWindow.onMouseDown(e);break;case "focus":mcWindows.selectedWindow.onFocus(e);break;}};MCWindows.prototype.addEvent=function(obj,name,handler){if(this.isMSIE)obj.attachEvent("on"+name,handler);else obj.addEventListener(name,handler,true);};MCWindows.prototype.cancelEvent=function(e){if(this.isMSIE){e.returnValue=false;e.cancelBubble=true;}else e.preventDefault();};MCWindows.prototype.parseFeatures=function(opts){opts=opts.toLowerCase();opts=opts.replace(/;/g,",");opts=opts.replace(/[^0-9a-z=,]/g,"");var optionChunks=opts.split(',');var options=new Array();options['left']="10";options['top']="10";options['width']="300";options['height']="300";options['resizable']="yes";options['minimizable']="yes";options['maximizable']="yes";options['close']="yes";options['movable']="yes";options['statusbar']="yes";options['scrollbars']="auto";options['modal']="no";if(opts=="")return options;for(var i=0;i';html+='';html+='';html+='Wrapper iframe';html+='';html+='';html+='';html+='';html+='
    ';html+='
    ';html+='
    ';html+='
    ';html+='
    ';html+='
    ';if(features['statusbar']=="yes"){html+='
    ';if(features['resizable']=="yes"){if(this.isGecko)html+='
    ';else html+='
    ';}html+='
    ';}html+='
    ';html+='';html+='';this.createFloatingIFrame(id,features['left'],features['top'],features['width'],features['height'],html);};MCWindows.prototype.setDocumentLock=function(state){if(state){var elm=document.getElementById('mcWindowEventBlocker');if(elm==null){elm=document.createElement("div");elm.id="mcWindowEventBlocker";elm.style.position="absolute";elm.style.left="0px";elm.style.top="0px";document.body.appendChild(elm);}elm.style.display="none";var imgPath=this.getParam("images_path");var width=document.body.clientWidth;var height=document.body.clientHeight;elm.style.width=width;elm.style.height=height;elm.innerHTML='';elm.style.zIndex=mcWindows.zindex-1;elm.style.display="block";}else{var elm=document.getElementById('mcWindowEventBlocker');if(mcWindows.windows.length==0)elm.parentNode.removeChild(elm);else elm.style.zIndex=mcWindows.zindex-1;}};MCWindows.prototype.onLoad=function(name){var win=mcWindows.windows[name];var id="mcWindow_"+name;var wrapperIframe=window.frames[id+"_iframe"].frames[0];var wrapperDoc=window.frames[id+"_iframe"].document;var doc=window.frames[id+"_iframe"].document;var winDiv=document.getElementById("mcWindow_"+name+"_div");var realIframe=window.frames[id+"_iframe"].frames[0];win.id="mcWindow_"+name;win.winElement=winDiv;win.bodyElement=doc.getElementById(id+'_body');win.iframeElement=doc.getElementById(id+'_iframe');win.headElement=doc.getElementById(id+'_head');win.titleElement=doc.getElementById(id+'_title');win.resizeElement=doc.getElementById(id+'_resize');win.containerElement=doc.getElementById(id+'_container');win.left=win.features['left'];win.top=win.features['top'];win.frame=window.frames[id+'_iframe'].frames[0];win.wrapperFrame=window.frames[id+'_iframe'];win.wrapperIFrameElement=document.getElementById(id+"_iframe");mcWindows.addEvent(win.headElement,"mousedown",mcWindows.eventDispatcher);if(win.resizeElement!=null)mcWindows.addEvent(win.resizeElement,"mousedown",mcWindows.eventDispatcher);if(mcWindows.isMSIE){mcWindows.addEvent(realIframe.document,"mousemove",mcWindows.eventDispatcher);mcWindows.addEvent(realIframe.document,"mouseup",mcWindows.eventDispatcher);}else{mcWindows.addEvent(realIframe,"mousemove",mcWindows.eventDispatcher);mcWindows.addEvent(realIframe,"mouseup",mcWindows.eventDispatcher);mcWindows.addEvent(realIframe,"focus",mcWindows.eventDispatcher);}for(var i=0;i';html+='';html+='';html+='Wrapper iframe';html+='';html+='';html+='';html+='';html+='
    ';html+='
    ';html+='
    ';html+='
    ';html+='
    ';html+='
    ';if(features['statusbar']=="yes"){html+='
    ';if(features['resizable']=="yes"){if(this.isGecko)html+='
    ';else html+='
    ';}html+='
    ';}html+='
    ';html+='';html+='';this.createFloatingIFrame(id,features['left'],features['top'],features['width'],features['height'],html);};TinyMCE_Windows.prototype.setDocumentLock=function(state){if(state){var elm=document.getElementById('mcWindowEventBlocker');if(elm==null){elm=document.createElement("div");elm.id="mcWindowEventBlocker";elm.style.position="absolute";elm.style.left="0";elm.style.top="0";document.body.appendChild(elm);}elm.style.display="none";var imgPath=this.getParam("images_path");var width=document.body.clientWidth;var height=document.body.clientHeight;elm.style.width=width;elm.style.height=height;elm.innerHTML='';elm.style.zIndex=mcWindows.zindex-1;elm.style.display="block";}else{var elm=document.getElementById('mcWindowEventBlocker');if(mcWindows.windows.length==0)elm.parentNode.removeChild(elm);else elm.style.zIndex=mcWindows.zindex-1;}};TinyMCE_Windows.prototype.onLoad=function(name){var win=mcWindows.windows[name];var id="mcWindow_"+name;var wrapperIframe=window.frames[id+"_iframe"].frames[0];var wrapperDoc=window.frames[id+"_iframe"].document;var doc=window.frames[id+"_iframe"].document;var winDiv=document.getElementById("mcWindow_"+name+"_div");var realIframe=window.frames[id+"_iframe"].frames[0];win.id="mcWindow_"+name;win.winElement=winDiv;win.bodyElement=doc.getElementById(id+'_body');win.iframeElement=doc.getElementById(id+'_iframe');win.headElement=doc.getElementById(id+'_head');win.titleElement=doc.getElementById(id+'_title');win.resizeElement=doc.getElementById(id+'_resize');win.containerElement=doc.getElementById(id+'_container');win.left=win.features['left'];win.top=win.features['top'];win.frame=window.frames[id+'_iframe'].frames[0];win.wrapperFrame=window.frames[id+'_iframe'];win.wrapperIFrameElement=document.getElementById(id+"_iframe");mcWindows.addEvent(win.headElement,"mousedown",mcWindows.eventDispatcher);if(win.resizeElement!=null)mcWindows.addEvent(win.resizeElement,"mousedown",mcWindows.eventDispatcher);if(mcWindows.isMSIE){mcWindows.addEvent(realIframe.document,"mousemove",mcWindows.eventDispatcher);mcWindows.addEvent(realIframe.document,"mouseup",mcWindows.eventDispatcher);}else{mcWindows.addEvent(realIframe,"mousemove",mcWindows.eventDispatcher);mcWindows.addEvent(realIframe,"mouseup",mcWindows.eventDispatcher);mcWindows.addEvent(realIframe,"focus",mcWindows.eventDispatcher);}for(var i=0;i';case "inserttime":var cmd='tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceInsertTime\');return false;';return '';}return "";}function TinyMCE_insertdatetime_execCommand(editor_id,element,command,user_interface,value){function addZeros(value,len){value=""+value;if(value.length'; + /** + * Returns the HTML contents of the insertdate, inserttime controls. + */ + getControlHTML : function(cn) { + switch (cn) { + case "insertdate": + return tinyMCE.getButtonHTML(cn, 'lang_insertdate_desc', '{$pluginurl}/images/insertdate.gif', 'mceInsertDate'); - case "inserttime": - var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceInsertTime\');return false;'; - return ''; - } - - return ""; -} - -/** - * Executes the mceInsertDate command. - */ -function TinyMCE_insertdatetime_execCommand(editor_id, element, command, user_interface, value) { - /* Adds zeros infront of value */ - function addZeros(value, len) { - value = "" + value; - - if (value.length < len) { - for (var i=0; i<(len-value.length); i++) - value = "0" + value; + case "inserttime": + return tinyMCE.getButtonHTML(cn, 'lang_inserttime_desc', '{$pluginurl}/images/inserttime.gif', 'mceInsertTime'); } - return value; + return ""; + }, + + /** + * Executes the mceInsertDate command. + */ + execCommand : function(editor_id, element, command, user_interface, value) { + /* Adds zeros infront of value */ + function addZeros(value, len) { + value = "" + value; + + if (value.length < len) { + for (var i=0; i<(len-value.length); i++) + value = "0" + value; + } + + return value; + } + + /* Returns the date object in the specified format */ + function getDateTime(date, format) { + format = tinyMCE.regexpReplace(format, "%D", "%m/%d/%y"); + format = tinyMCE.regexpReplace(format, "%r", "%I:%M:%S %p"); + format = tinyMCE.regexpReplace(format, "%Y", "" + date.getFullYear()); + format = tinyMCE.regexpReplace(format, "%y", "" + date.getYear()); + format = tinyMCE.regexpReplace(format, "%m", addZeros(date.getMonth()+1, 2)); + format = tinyMCE.regexpReplace(format, "%d", addZeros(date.getDate(), 2)); + format = tinyMCE.regexpReplace(format, "%H", "" + addZeros(date.getHours(), 2)); + format = tinyMCE.regexpReplace(format, "%M", "" + addZeros(date.getMinutes(), 2)); + format = tinyMCE.regexpReplace(format, "%S", "" + addZeros(date.getSeconds(), 2)); + format = tinyMCE.regexpReplace(format, "%I", "" + ((date.getHours() + 11) % 12 + 1)); + format = tinyMCE.regexpReplace(format, "%p", "" + (date.getHours() < 12 ? "AM" : "PM")); + format = tinyMCE.regexpReplace(format, "%B", "" + tinyMCE.getLang("lang_inserttime_months_long")[date.getMonth()]); + format = tinyMCE.regexpReplace(format, "%b", "" + tinyMCE.getLang("lang_inserttime_months_short")[date.getMonth()]); + format = tinyMCE.regexpReplace(format, "%A", "" + tinyMCE.getLang("lang_inserttime_day_long")[date.getDay()]); + format = tinyMCE.regexpReplace(format, "%a", "" + tinyMCE.getLang("lang_inserttime_day_short")[date.getDay()]); + format = tinyMCE.regexpReplace(format, "%%", "%"); + + return format; + } + + // Handle commands + switch (command) { + case "mceInsertDate": + tinyMCE.execInstanceCommand(editor_id, 'mceInsertContent', false, getDateTime(new Date(), tinyMCE.getParam("plugin_insertdate_dateFormat", tinyMCE.getLang('lang_insertdate_def_fmt')))); + return true; + + case "mceInsertTime": + tinyMCE.execInstanceCommand(editor_id, 'mceInsertContent', false, getDateTime(new Date(), tinyMCE.getParam("plugin_insertdate_timeFormat", tinyMCE.getLang('lang_inserttime_def_fmt')))); + return true; + } + + // Pass to next handler in chain + return false; } +}; - /* Returns the date object in the specified format */ - function getDateTime(date, format) { - format = tinyMCE.regexpReplace(format, "%D", "%m/%d/%y"); - format = tinyMCE.regexpReplace(format, "%r", "%I:%M:%S %p"); - format = tinyMCE.regexpReplace(format, "%Y", "" + date.getFullYear()); - format = tinyMCE.regexpReplace(format, "%y", "" + date.getYear()); - format = tinyMCE.regexpReplace(format, "%m", addZeros(date.getMonth()+1, 2)); - format = tinyMCE.regexpReplace(format, "%d", addZeros(date.getDate(), 2)); - format = tinyMCE.regexpReplace(format, "%H", "" + addZeros(date.getHours(), 2)); - format = tinyMCE.regexpReplace(format, "%M", "" + addZeros(date.getMinutes(), 2)); - format = tinyMCE.regexpReplace(format, "%S", "" + addZeros(date.getSeconds(), 2)); - format = tinyMCE.regexpReplace(format, "%I", "" + ((date.getHours() + 11) % 12 + 1)); - format = tinyMCE.regexpReplace(format, "%p", "" + (date.getHours() < 12 ? "AM" : "PM")); - format = tinyMCE.regexpReplace(format, "%B", "" + tinyMCE.getLang("lang_inserttime_months_long")[date.getMonth()]); - format = tinyMCE.regexpReplace(format, "%b", "" + tinyMCE.getLang("lang_inserttime_months_short")[date.getMonth()]); - format = tinyMCE.regexpReplace(format, "%A", "" + tinyMCE.getLang("lang_inserttime_day_long")[date.getDay()]); - format = tinyMCE.regexpReplace(format, "%a", "" + tinyMCE.getLang("lang_inserttime_day_short")[date.getDay()]); - format = tinyMCE.regexpReplace(format, "%%", "%"); - - return format; - } - - // Handle commands - switch (command) { - case "mceInsertDate": - tinyMCE.execInstanceCommand(editor_id, 'mceInsertContent', false, getDateTime(new Date(), tinyMCE.getParam("plugin_insertdate_dateFormat", tinyMCE.getLang('lang_insertdate_def_fmt')))); - return true; - - case "mceInsertTime": - tinyMCE.execInstanceCommand(editor_id, 'mceInsertContent', false, getDateTime(new Date(), tinyMCE.getParam("plugin_insertdate_timeFormat", tinyMCE.getLang('lang_inserttime_def_fmt')))); - return true; - } - - // Pass to next handler in chain - return false; -} +tinyMCE.addPlugin("insertdatetime", TinyMCE_InsertDateTimePlugin); diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/insertdatetime/langs/cs.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/insertdatetime/langs/cs.js index 0f766d580..fd099777a 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/insertdatetime/langs/cs.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/insertdatetime/langs/cs.js @@ -2,12 +2,12 @@ * Czech lang variables * encoding: utf-8 * - * $Id: cs.js,v 1.5 2005/10/18 13:59:43 spocke Exp $ + * $Id: cs.js,v 1.6 2006/01/11 14:25:49 spocke Exp $ */ tinyMCE.addToLang('',{ -insertdate_def_fmt : '%Y-%m-%d', -inserttime_def_fmt : '%H:%M:%S', +insertdate_def_fmt : '%d.%m.%Y', +inserttime_def_fmt : '%H:%M', insertdate_desc : 'Vložit datum', inserttime_desc : 'Vložit Äas', inserttime_months_long : new Array('Leden','Únor','BÅ™ezen','Duben','KvÄ›ten','ÄŒerven','ÄŒervenec','Srpen','Září','Říjen','Listopad','Prosinec'), diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/insertdatetime/langs/da.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/insertdatetime/langs/da.js index a88a91318..27ed1f313 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/insertdatetime/langs/da.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/insertdatetime/langs/da.js @@ -1,12 +1,12 @@ -// DK lang variables contributed by Jan Moelgaard +// DK lang variables contributed by Jan Moelgaard, John Dalsgaard and Bo Frederiksen. tinyMCE.addToLang('',{ insertdate_def_fmt : '%d-%m-%Y', inserttime_def_fmt : '%H:%M:%S', -insertdate_desc : 'Indsæt dato', -inserttime_desc : 'Indsæt tid', +insertdate_desc : 'Indsæt dato', +inserttime_desc : 'Indsæt tid', inserttime_months_long : new Array("Januar", "Februar", "Marts", "April", "Maj", "Juni", "Juli", "August", "September", "Oktober", "November", "December"), inserttime_months_short : new Array("Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"), -inserttime_day_long : new Array("Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag", "Søndag"), -inserttime_day_short : new Array("Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør", "Søn") +inserttime_day_long : new Array("Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag", "Søndag"), +inserttime_day_short : new Array("Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør", "Søn") }); diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/insertdatetime/langs/zh_cn.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/insertdatetime/langs/zh_cn.js index ead7dd217..509a3ea75 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/insertdatetime/langs/zh_cn.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/insertdatetime/langs/zh_cn.js @@ -1,4 +1,5 @@ -// Simplified Chinese lang variables contributed by tom_cat (thomaswangyang@gmail.com) +// Simplified Chinese lang variables contributed by TinyMCE_China_Team ( tinymce_china {AT} yahoogroups {DOT} com ). +// visit our homepage at: http://www.cube316.net/tinymce/ for more information. tinyMCE.addToLang('',{ insertdate_def_fmt : '%Y-%m-%d', diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/noneditable/css/noneditable.css b/www/extras/tinymce2/jscripts/tiny_mce/plugins/noneditable/css/noneditable.css index c4dc455ea..a50621425 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/noneditable/css/noneditable.css +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/noneditable/css/noneditable.css @@ -1,6 +1,6 @@ /* This is the CSS file for the noneditable elements plugin */ -.mceItemEditable { +.mceEditable { /*border: 1px dotted #0000cc;*/ -moz-user-focus: none; -moz-user-input: auto; @@ -8,7 +8,7 @@ -moz-user-select: text; } -.mceItemNonEditable { +.mceNonEditable { /*border: 1px dotted #cc0000;*/ -moz-user-focus: ignore; /*-moz-user-input: disabled;*/ diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/noneditable/editor_plugin.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/noneditable/editor_plugin.js index 37beb47c1..f1e031cf6 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/noneditable/editor_plugin.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/noneditable/editor_plugin.js @@ -1 +1 @@ -function TinyMCE_noneditable_getInfo(){return{longname:'Non editable elements',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_noneditable.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};};function TinyMCE_noneditable_initInstance(inst){tinyMCE.importCSS(inst.getDoc(),tinyMCE.baseURL+"/plugins/noneditable/css/noneditable.css");if(tinyMCE.isMSIE5_0)tinyMCE.settings['plugins']=tinyMCE.settings['plugins'].replace(/noneditable/gi,'Noneditable');if(tinyMCE.isGecko){tinyMCE.addEvent(inst.getDoc(),"keyup",TinyMCE_noneditable_fixKeyUp);}}function TinyMCE_noneditable_fixKeyUp(e){var inst=tinyMCE.selectedInstance;var sel=inst.getSel();var rng=inst.getRng();var an=sel.anchorNode;if((e.keyCode==38||e.keyCode==37||e.keyCode==40||e.keyCode==39)&&(elm=TinyMCE_noneditable_isNonEditable(an))!=null){rng=inst.getDoc().createRange();rng.selectNode(elm);rng.collapse(true);sel.removeAllRanges();sel.addRange(rng);tinyMCE.cancelEvent(e);}}function TinyMCE_noneditable_selectAll(e){var inst=tinyMCE.selectedInstance;var sel=inst.getSel();var doc=inst.getDoc();if((elm=TinyMCE_noneditable_isNonEditable(sel.focusNode))!=null){inst.selectNode(elm,false);tinyMCE.cancelEvent(e);return;}if((elm=TinyMCE_noneditable_isNonEditable(sel.anchorNode))!=null){inst.selectNode(elm,false);tinyMCE.cancelEvent(e);return;}}function TinyMCE_noneditable_isNonEditable(elm){var editClass=tinyMCE.getParam("noneditable_editable_class","mceItemEditable");var nonEditClass=tinyMCE.getParam("noneditable_noneditable_class","mceItemNonEditable");if(!elm)return;do{var className=elm.className?elm.className:"";if(className.indexOf(editClass)!=-1)return null;if(className.indexOf(nonEditClass)!=-1)return elm;}while(elm=elm.parentNode);return null;}function TinyMCE_noneditable_cleanup(type,content,inst){switch(type){case "insert_to_editor_dom":var nodes=tinyMCE.getNodeTree(content,new Array(),1);var editClass=tinyMCE.getParam("noneditable_editable_class","mceItemEditable");var nonEditClass=tinyMCE.getParam("noneditable_noneditable_class","mceItemNonEditable");for(var i=0;i","gi"),'<$1class="$2$3$4" contenteditable="true"$5>');content=content.replace(new RegExp("<(.*?)class=\"(.*?)("+nonEditClass+")(.*?)\"(.*?)>","gi"),'<$1class="$2$3$4" contenteditable="false"$5>');}break;case "get_from_editor_dom":if(tinyMCE.getParam("noneditable_leave_contenteditable",false)){var nodes=tinyMCE.getNodeTree(content,new Array(),1);for(var i=0;i", "gi"), '<$1class="$2$3$4" contenteditable="true"$5>'); - content = content.replace(new RegExp("<(.*?)class=\"(.*?)(" + nonEditClass + ")(.*?)\"(.*?)>", "gi"), '<$1class="$2$3$4" contenteditable="false"$5>'); - } - - break; - - case "get_from_editor_dom": - if (tinyMCE.getParam("noneditable_leave_contenteditable", false)) { - var nodes = tinyMCE.getNodeTree(content, new Array(), 1); - - for (var i=0; i0)tinyMCE.execCommand('mcePasteWord',false,html);tinyMCE.cancelEvent(e);return false;}return true;}function TinyMCE_paste_getControlHTML(control_name){switch(control_name){case "pastetext":var cmd='tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcePasteText\', true);return false;';return '';case "pasteword":var cmd='tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcePasteWord\', true);return false;';return '';case "selectall":var cmd='tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceSelectAll\');return false;';return '';}return '';}function TinyMCE_paste_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mcePasteText":if(user_interface){if((tinyMCE.isMSIE&&!tinyMCE.isOpera)&&!tinyMCE.getParam('paste_use_dialog',false))TinyMCE_paste__insertText(clipboardData.getData("Text"),true);else{var template=new Array();template['file']='../../plugins/paste/pastetext.htm';template['width']=450;template['height']=400;var plain_text="";tinyMCE.openWindow(template,{editor_id:editor_id,plain_text:plain_text,resizable:"yes",scrollbars:"no",inline:"yes",mceDo:'insert'});}}else TinyMCE_paste__insertText(value['html'],value['linebreaks']);return true;case "mcePasteWord":if(user_interface){if((tinyMCE.isMSIE&&!tinyMCE.isOpera)&&!tinyMCE.getParam('paste_use_dialog',false)){var html=TinyMCE_paste__clipboardHTML();if(html&&html.length>0)TinyMCE_paste__insertWordContent(html);}else{var template=new Array();template['file']='../../plugins/paste/pasteword.htm';template['width']=450;template['height']=400;var plain_text="";tinyMCE.openWindow(template,{editor_id:editor_id,plain_text:plain_text,resizable:"yes",scrollbars:"no",inline:"yes",mceDo:'insert'});}}else TinyMCE_paste__insertWordContent(value);return true;case "mceSelectAll":tinyMCE.execInstanceCommand(editor_id,'selectall');return true;}return false;}function TinyMCE_paste__insertText(content,bLinebreaks){if(content&&content.length>0){if(bLinebreaks){if(tinyMCE.getParam("paste_create_paragraphs",true)){var rl=tinyMCE.getParam("paste_replace_list",'\u2122,TM,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(',');for(var i=0;i

    ","gi");content=tinyMCE.regexpReplace(content,"\r\r","

    ","gi");content=tinyMCE.regexpReplace(content,"\n\n","

    ","gi");if((pos=content.indexOf('

    '))!=-1){tinyMCE.execCommand("Delete");var node=tinyMCE.selectedInstance.getFocusElement();var breakElms=new Array();do{if(node.nodeType==1){if(node.nodeName=="TD"||node.nodeName=="BODY")break;breakElms[breakElms.length]=node;}}while(node=node.parentNode);var before="",after="

    ";before+=content.substring(0,pos);for(var i=0;i";after+="<"+breakElms[(breakElms.length-1)-i].nodeName+">";}before+="

    ";content=before+content.substring(pos+7)+after;}}if(tinyMCE.getParam("paste_create_linebreaks",true)){content=tinyMCE.regexpReplace(content,"\r\n","
    ","gi");content=tinyMCE.regexpReplace(content,"\r","
    ","gi");content=tinyMCE.regexpReplace(content,"\n","
    ","gi");}}tinyMCE.execCommand("mceInsertRawHTML",false,content);}}function TinyMCE_paste__insertWordContent(content){if(content&&content.length>0){var bull=String.fromCharCode(8226);var middot=String.fromCharCode(183);var rl=tinyMCE.getParam("paste_replace_list",'\u2122,TM,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(',');for(var i=0;i(.*?)<\/p>','gi'),'

    $1

    ');}content=content.replace(new RegExp('tab-stops: list [0-9]+.0pt">','gi'),'">'+"--list--");content=content.replace(new RegExp(bull+"(.*?)
    ","gi"),"

    "+middot+"$1

    ");content=content.replace(new RegExp('','gi'),""+bull);content=content.replace(/<\/o:p>/gi,"");content=content.replace(new RegExp('
    ]*>/gi,"");content=content.replace(new RegExp('<(\\w[^>]*) style="([^"]*)"([^>]*)','gi'),"<$1$3");content=content.replace(/<\/?font[^>]*>/gi,"");switch(tinyMCE.getParam("paste_strip_class_attributes","all")){case "all":content=content.replace(/<(\w[^>]*)class=([^|>]*)([^>]*)/gi,"<$1$3");break;case "mso":content=content.replace(new RegExp('<(\\w[^>]*) class="?mso([^ |>]*)([^>]*)','gi'),"<$1$3");break;}content=content.replace(new RegExp('href="?'+TinyMCE_paste__reEscape(""+document.location)+'','gi'),'href="'+tinyMCE.settings['document_base_url']);content=content.replace(/<(\w[^>]*)lang=([^|>]*)([^>]*)/gi,"<$1$3");content=content.replace(/<\\?\?xml[^>]*>/gi,"");content=content.replace(/<\/?\w+:[^>]*>/gi,"");content=content.replace(/--page break--\s*

     <\/p>/gi,"");content=content.replace(/--page break--/gi,"");if(!tinyMCE.settings['force_p_newlines']){content=content.replace('','','gi');content=content.replace('

    ','

    ','gi');}if(!tinyMCE.isMSIE&&!tinyMCE.settings['force_p_newlines']){content=content.replace(/<\/?p[^>]*>/gi,"");}content=content.replace(/<\/?div[^>]*>/gi,"");if(tinyMCE.getParam("paste_convert_middot_lists",true)){var div=document.createElement("div");div.innerHTML=content;var className=tinyMCE.getParam("paste_unindented_list_class","unIndentedList");while(TinyMCE_paste_convertMiddots(div,"--list--"));while(TinyMCE_paste_convertMiddots(div,middot,className));while(TinyMCE_paste_convertMiddots(div,bull));content=div.innerHTML;}if(tinyMCE.getParam("paste_convert_headers_to_strong",false)){content=content.replace(/ <\/h[1-6]>/gi,'

      

    ');content=content.replace(//gi,'

    ');content=content.replace(/<\/h[1-6]>/gi,'

    ');content=content.replace(/ <\/b>/gi,'  ');content=content.replace(/^( )*/gi,'');}content=content.replace(/--list--/gi,"");tinyMCE.execCommand("mceInsertContent",false,content);tinyMCE.execCommand("mceCleanup");}}function TinyMCE_paste__reEscape(s){var l="?.\\*[](){}+^$:";var o="";for(var i=0;i0)TinyMCE_PastePlugin._insertWordContent(html);}else{var template=new Array();template['file']='../../plugins/paste/pasteword.htm';template['width']=450;template['height']=400;var plain_text="";tinyMCE.openWindow(template,{editor_id:editor_id,plain_text:plain_text,resizable:"yes",scrollbars:"no",inline:"yes",mceDo:'insert'});}}else TinyMCE_PastePlugin._insertWordContent(value);return true;case"mceSelectAll":tinyMCE.execInstanceCommand(editor_id,'selectall');return true;}return false;},_handlePasteEvent:function(e){switch(e.type){case"paste":var html=TinyMCE_PastePlugin._clipboardHTML();var r,inst=tinyMCE.selectedInstance;if(inst&&(r=inst.getRng())&&r.text.length>0)tinyMCE.execCommand('delete');if(html&&html.length>0)tinyMCE.execCommand('mcePasteWord',false,html);tinyMCE.cancelEvent(e);return false;}return true;},_insertText:function(content,bLinebreaks){if(content&&content.length>0){if(bLinebreaks){if(tinyMCE.getParam("paste_create_paragraphs",true)){var rl=tinyMCE.getParam("paste_replace_list",'\u2122,TM,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(',');for(var i=0;i

    ","gi");content=tinyMCE.regexpReplace(content,"\r\r","

    ","gi");content=tinyMCE.regexpReplace(content,"\n\n","

    ","gi");if((pos=content.indexOf('

    '))!=-1){tinyMCE.execCommand("Delete");var node=tinyMCE.selectedInstance.getFocusElement();var breakElms=new Array();do{if(node.nodeType==1){if(node.nodeName=="TD"||node.nodeName=="BODY")break;breakElms[breakElms.length]=node;}}while(node=node.parentNode);var before="",after="

    ";before+=content.substring(0,pos);for(var i=0;i";after+="<"+breakElms[(breakElms.length-1)-i].nodeName+">";}before+="

    ";content=before+content.substring(pos+7)+after;}}if(tinyMCE.getParam("paste_create_linebreaks",true)){content=tinyMCE.regexpReplace(content,"\r\n","
    ","gi");content=tinyMCE.regexpReplace(content,"\r","
    ","gi");content=tinyMCE.regexpReplace(content,"\n","
    ","gi");}}tinyMCE.execCommand("mceInsertRawHTML",false,content);}},_insertWordContent:function(content){if(content&&content.length>0){var bull=String.fromCharCode(8226);var middot=String.fromCharCode(183);var cb;if((cb=tinyMCE.getParam("paste_insert_word_content_callback",""))!="")content=eval(cb+"('before', content)");var rl=tinyMCE.getParam("paste_replace_list",'\u2122,TM,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(',');for(var i=0;i(.*?)<\/p>','gi'),'

    $1

    ');}content=content.replace(new RegExp('tab-stops: list [0-9]+.0pt">','gi'),'">'+"--list--");content=content.replace(new RegExp(bull+"(.*?)
    ","gi"),"

    "+middot+"$1

    ");content=content.replace(new RegExp('','gi'),""+bull);content=content.replace(/<\/o:p>/gi,"");content=content.replace(new RegExp('
    ]*>/gi,"");if(tinyMCE.getParam("paste_remove_styles",true))content=content.replace(new RegExp('<(\\w[^>]*) style="([^"]*)"([^>]*)','gi'),"<$1$3");content=content.replace(/<\/?font[^>]*>/gi,"");switch(tinyMCE.getParam("paste_strip_class_attributes","all")){case"all":content=content.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi,"<$1$3");break;case"mso":content=content.replace(new RegExp('<(\\w[^>]*) class="?mso([^ |>]*)([^>]*)','gi'),"<$1$3");break;}content=content.replace(new RegExp('href="?'+TinyMCE_PastePlugin._reEscape(""+document.location)+'','gi'),'href="'+tinyMCE.settings['document_base_url']);content=content.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi,"<$1$3");content=content.replace(/<\\?\?xml[^>]*>/gi,"");content=content.replace(/<\/?\w+:[^>]*>/gi,"");content=content.replace(/-- page break --\s*

     <\/p>/gi,"");content=content.replace(/-- page break --/gi,"");if(!tinyMCE.settings['force_p_newlines']){content=content.replace('','','gi');content=content.replace('

    ','

    ','gi');}if(!tinyMCE.isMSIE&&!tinyMCE.settings['force_p_newlines']){content=content.replace(/<\/?p[^>]*>/gi,"");}content=content.replace(/<\/?div[^>]*>/gi,"");if(tinyMCE.getParam("paste_convert_middot_lists",true)){var div=document.createElement("div");div.innerHTML=content;var className=tinyMCE.getParam("paste_unindented_list_class","unIndentedList");while(TinyMCE_PastePlugin._convertMiddots(div,"--list--"));while(TinyMCE_PastePlugin._convertMiddots(div,middot,className));while(TinyMCE_PastePlugin._convertMiddots(div,bull));content=div.innerHTML;}if(tinyMCE.getParam("paste_convert_headers_to_strong",false)){content=content.replace(/ <\/h[1-6]>/gi,'

      

    ');content=content.replace(//gi,'

    ');content=content.replace(/<\/h[1-6]>/gi,'

    ');content=content.replace(/ <\/b>/gi,'  ');content=content.replace(/^( )*/gi,'');}content=content.replace(/--list--/gi,"");if((cb=tinyMCE.getParam("paste_insert_word_content_callback",""))!="")content=eval(cb+"('after', content)");tinyMCE.execCommand("mceInsertContent",false,content);window.setTimeout('tinyMCE.execCommand("mceCleanup");',1);}},_reEscape:function(s){var l="?.\\*[](){}+^$:";var o="";for(var i=0;i 0) - tinyMCE.execCommand('mcePasteWord', false, html); - - tinyMCE.cancelEvent(e); - return false; - } - - return true; -} - -function TinyMCE_paste_getControlHTML(control_name) { - switch (control_name) { - case "pastetext": - var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcePasteText\', true);return false;'; - return ''; - - case "pasteword": - var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcePasteWord\', true);return false;'; - return ''; - - case "selectall": - var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceSelectAll\');return false;'; - return ''; - } - - return ''; -} - -function TinyMCE_paste_execCommand(editor_id, element, command, user_interface, value) { - switch (command) { - case "mcePasteText": - if (user_interface) { - if ((tinyMCE.isMSIE && !tinyMCE.isOpera) && !tinyMCE.getParam('paste_use_dialog', false)) - TinyMCE_paste__insertText(clipboardData.getData("Text"), true); - else { - var template = new Array(); - template['file'] = '../../plugins/paste/pastetext.htm'; // Relative to theme - template['width'] = 450; - template['height'] = 400; - var plain_text = ""; - tinyMCE.openWindow(template, {editor_id : editor_id, plain_text: plain_text, resizable : "yes", scrollbars : "no", inline : "yes", mceDo : 'insert'}); - } - } else - TinyMCE_paste__insertText(value['html'], value['linebreaks']); - - return true; - - case "mcePasteWord": - if (user_interface) { - if ((tinyMCE.isMSIE && !tinyMCE.isOpera) && !tinyMCE.getParam('paste_use_dialog', false)) { - var html = TinyMCE_paste__clipboardHTML(); - - if (html && html.length > 0) - TinyMCE_paste__insertWordContent(html); - } else { - var template = new Array(); - template['file'] = '../../plugins/paste/pasteword.htm'; // Relative to theme - template['width'] = 450; - template['height'] = 400; - var plain_text = ""; - tinyMCE.openWindow(template, {editor_id : editor_id, plain_text: plain_text, resizable : "yes", scrollbars : "no", inline : "yes", mceDo : 'insert'}); - } - } else - TinyMCE_paste__insertWordContent(value); - - return true; - - case "mceSelectAll": - tinyMCE.execInstanceCommand(editor_id, 'selectall'); - return true; - - } - - // Pass to next handler in chain - return false; -} - -function TinyMCE_paste__insertText(content, bLinebreaks) { - if (content && content.length > 0) { - if (bLinebreaks) { - // Special paragraph treatment - if (tinyMCE.getParam("paste_create_paragraphs", true)) { - var rl = tinyMCE.getParam("paste_replace_list", '\u2122,TM,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(','); - for (var i=0; i

    ", "gi"); - content = tinyMCE.regexpReplace(content, "\r\r", "

    ", "gi"); - content = tinyMCE.regexpReplace(content, "\n\n", "

    ", "gi"); - - // Has paragraphs - if ((pos = content.indexOf('

    ')) != -1) { - tinyMCE.execCommand("Delete"); - - var node = tinyMCE.selectedInstance.getFocusElement(); - - // Get list of elements to break - var breakElms = new Array(); - - do { - if (node.nodeType == 1) { - // Don't break tables and break at body - if (node.nodeName == "TD" || node.nodeName == "BODY") - break; - - breakElms[breakElms.length] = node; - } - } while(node = node.parentNode); - - var before = "", after = "

    "; - before += content.substring(0, pos); - - for (var i=0; i"; - after += "<" + breakElms[(breakElms.length-1)-i].nodeName + ">"; - } - - before += "

    "; - content = before + content.substring(pos+7) + after; - } - } - - if (tinyMCE.getParam("paste_create_linebreaks", true)) { - content = tinyMCE.regexpReplace(content, "\r\n", "
    ", "gi"); - content = tinyMCE.regexpReplace(content, "\r", "
    ", "gi"); - content = tinyMCE.regexpReplace(content, "\n", "
    ", "gi"); - } + case "selectall": + return tinyMCE.getButtonHTML(cn, 'lang_selectall_desc', '{$pluginurl}/images/selectall.gif', 'mceSelectAll', true); } - - tinyMCE.execCommand("mceInsertRawHTML", false, content); - } -} -function TinyMCE_paste__insertWordContent(content) { - if (content && content.length > 0) { - // Cleanup Word content - var bull = String.fromCharCode(8226); - var middot = String.fromCharCode(183); + return ''; + }, - var rl = tinyMCE.getParam("paste_replace_list", '\u2122,TM,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(','); - for (var i=0; i(.*?)<\/p>', 'gi'), '

    $1

    '); + return true; + + case "mcePasteWord": + if (user_interface) { + if ((tinyMCE.isMSIE && !tinyMCE.isOpera) && !tinyMCE.getParam('paste_use_dialog', false)) { + var html = TinyMCE_PastePlugin._clipboardHTML(); + + if (html && html.length > 0) + TinyMCE_PastePlugin._insertWordContent(html); + } else { + var template = new Array(); + template['file'] = '../../plugins/paste/pasteword.htm'; // Relative to theme + template['width'] = 450; + template['height'] = 400; + var plain_text = ""; + tinyMCE.openWindow(template, {editor_id : editor_id, plain_text: plain_text, resizable : "yes", scrollbars : "no", inline : "yes", mceDo : 'insert'}); + } + } else + TinyMCE_PastePlugin._insertWordContent(value); + + return true; + + case "mceSelectAll": + tinyMCE.execInstanceCommand(editor_id, 'selectall'); + return true; + + } + + // Pass to next handler in chain + return false; + }, + + // Private plugin internal methods + + _handlePasteEvent : function(e) { + switch (e.type) { + case "paste": + var html = TinyMCE_PastePlugin._clipboardHTML(); + var r, inst = tinyMCE.selectedInstance; + + // Removes italic, strong etc, the if was needed due to bug #1437114 + if (inst && (r = inst.getRng()) && r.text.length > 0) + tinyMCE.execCommand('delete'); + + if (html && html.length > 0) + tinyMCE.execCommand('mcePasteWord', false, html); + + tinyMCE.cancelEvent(e); + return false; } - content = content.replace(new RegExp('tab-stops: list [0-9]+.0pt">', 'gi'), '">' + "--list--"); - content = content.replace(new RegExp(bull + "(.*?)
    ", "gi"), "

    " + middot + "$1

    "); - content = content.replace(new RegExp('', 'gi'), "" + bull); // Covert to bull list - content = content.replace(/<\/o:p>/gi, ""); - content = content.replace(new RegExp('
    ]*>/gi, ""); - content = content.replace(new RegExp('<(\\w[^>]*) style="([^"]*)"([^>]*)', 'gi'), "<$1$3"); - content = content.replace(/<\/?font[^>]*>/gi, ""); + return true; + }, - // Strips class attributes. - switch (tinyMCE.getParam("paste_strip_class_attributes", "all")) { - case "all": - content = content.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3"); - break; + _insertText : function(content, bLinebreaks) { + if (content && content.length > 0) { + if (bLinebreaks) { + // Special paragraph treatment + if (tinyMCE.getParam("paste_create_paragraphs", true)) { + var rl = tinyMCE.getParam("paste_replace_list", '\u2122,TM,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(','); + for (var i=0; i]*) class="?mso([^ |>]*)([^>]*)', 'gi'), "<$1$3"); - break; + content = tinyMCE.regexpReplace(content, "\r\n\r\n", "

    ", "gi"); + content = tinyMCE.regexpReplace(content, "\r\r", "

    ", "gi"); + content = tinyMCE.regexpReplace(content, "\n\n", "

    ", "gi"); + + // Has paragraphs + if ((pos = content.indexOf('

    ')) != -1) { + tinyMCE.execCommand("Delete"); + + var node = tinyMCE.selectedInstance.getFocusElement(); + + // Get list of elements to break + var breakElms = new Array(); + + do { + if (node.nodeType == 1) { + // Don't break tables and break at body + if (node.nodeName == "TD" || node.nodeName == "BODY") + break; + + breakElms[breakElms.length] = node; + } + } while(node = node.parentNode); + + var before = "", after = "

    "; + before += content.substring(0, pos); + + for (var i=0; i"; + after += "<" + breakElms[(breakElms.length-1)-i].nodeName + ">"; + } + + before += "

    "; + content = before + content.substring(pos+7) + after; + } + } + + if (tinyMCE.getParam("paste_create_linebreaks", true)) { + content = tinyMCE.regexpReplace(content, "\r\n", "
    ", "gi"); + content = tinyMCE.regexpReplace(content, "\r", "
    ", "gi"); + content = tinyMCE.regexpReplace(content, "\n", "
    ", "gi"); + } + } + + tinyMCE.execCommand("mceInsertRawHTML", false, content); } + }, - content = content.replace(new RegExp('href="?' + TinyMCE_paste__reEscape("" + document.location) + '', 'gi'), 'href="' + tinyMCE.settings['document_base_url']); - content = content.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3"); - content = content.replace(/<\\?\?xml[^>]*>/gi, ""); - content = content.replace(/<\/?\w+:[^>]*>/gi, ""); - content = content.replace(/-- page break --\s*

     <\/p>/gi, ""); // Remove pagebreaks - content = content.replace(/-- page break --/gi, ""); // Remove pagebreaks + _insertWordContent : function(content) { + if (content && content.length > 0) { + // Cleanup Word content + var bull = String.fromCharCode(8226); + var middot = String.fromCharCode(183); + var cb; -// content = content.replace(/\/? */gi, "");   -// content = content.replace(/

     <\/p>/gi, ''); + if ((cb = tinyMCE.getParam("paste_insert_word_content_callback", "")) != "") + content = eval(cb + "('before', content)"); - if (!tinyMCE.settings['force_p_newlines']) { - content = content.replace('', '' ,'gi'); - content = content.replace('

    ', '

    ' ,'gi'); - } + var rl = tinyMCE.getParam("paste_replace_list", '\u2122,TM,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(','); + for (var i=0; i]*>/gi, ""); - } + if (tinyMCE.getParam("paste_convert_headers_to_strong", false)) { + content = content.replace(new RegExp('

    (.*?)<\/p>', 'gi'), '

    $1

    '); + } - content = content.replace(/<\/?div[^>]*>/gi, ""); + content = content.replace(new RegExp('tab-stops: list [0-9]+.0pt">', 'gi'), '">' + "--list--"); + content = content.replace(new RegExp(bull + "(.*?)
    ", "gi"), "

    " + middot + "$1

    "); + content = content.replace(new RegExp('', 'gi'), "" + bull); // Covert to bull list + content = content.replace(/<\/o:p>/gi, ""); + content = content.replace(new RegExp('
    ]*>/gi, ""); - // Convert all middot paragraphs to li elements - var className = tinyMCE.getParam("paste_unindented_list_class", "unIndentedList"); + if (tinyMCE.getParam("paste_remove_styles", true)) + content = content.replace(new RegExp('<(\\w[^>]*) style="([^"]*)"([^>]*)', 'gi'), "<$1$3"); - while (TinyMCE_paste_convertMiddots(div, "--list--")) ; // bull - while (TinyMCE_paste_convertMiddots(div, middot, className)) ; // Middot - while (TinyMCE_paste_convertMiddots(div, bull)) ; // bull + content = content.replace(/<\/?font[^>]*>/gi, ""); - content = div.innerHTML; - } - - // Replace all headers with strong and fix some other issues - if (tinyMCE.getParam("paste_convert_headers_to_strong", false)) { - content = content.replace(/ <\/h[1-6]>/gi, '

      

    '); - content = content.replace(//gi, '

    '); - content = content.replace(/<\/h[1-6]>/gi, '

    '); - content = content.replace(/ <\/b>/gi, '  '); - content = content.replace(/^( )*/gi, ''); - } - - content = content.replace(/--list--/gi, ""); // Remove --list-- - - // Insert cleaned content - tinyMCE.execCommand("mceInsertContent", false, content); - tinyMCE.execCommand("mceCleanup"); // Do normal cleanup - } -} - -function TinyMCE_paste__reEscape(s) { - var l = "?.\\*[](){}+^$:"; - var o = ""; - - for (var i=0; i]*) class=([^ |>]*)([^>]*)/gi, "<$1$3"); break; - var cp = np.nextSibling; - var li = document.createElement("li"); - li.innerHTML = np.innerHTML.replace(new RegExp('' + mdot + '|' + bull + '|--list--| ', "gi"), ''); - np.parentNode.removeChild(np); - ul.appendChild(li); - np = cp; + case "mso": + content = content.replace(new RegExp('<(\\w[^>]*) class="?mso([^ |>]*)([^>]*)', 'gi'), "<$1$3"); + break; } - p.parentNode.replaceChild(ul, p); + content = content.replace(new RegExp('href="?' + TinyMCE_PastePlugin._reEscape("" + document.location) + '', 'gi'), 'href="' + tinyMCE.settings['document_base_url']); + content = content.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3"); + content = content.replace(/<\\?\?xml[^>]*>/gi, ""); + content = content.replace(/<\/?\w+:[^>]*>/gi, ""); + content = content.replace(/-- page break --\s*

     <\/p>/gi, ""); // Remove pagebreaks + content = content.replace(/-- page break --/gi, ""); // Remove pagebreaks - return true; + // content = content.replace(/\/? */gi, "");   + // content = content.replace(/

     <\/p>/gi, ''); + + if (!tinyMCE.settings['force_p_newlines']) { + content = content.replace('', '' ,'gi'); + content = content.replace('

    ', '

    ' ,'gi'); + } + + if (!tinyMCE.isMSIE && !tinyMCE.settings['force_p_newlines']) { + content = content.replace(/<\/?p[^>]*>/gi, ""); + } + + content = content.replace(/<\/?div[^>]*>/gi, ""); + + // Convert all middlot lists to UL lists + if (tinyMCE.getParam("paste_convert_middot_lists", true)) { + var div = document.createElement("div"); + div.innerHTML = content; + + // Convert all middot paragraphs to li elements + var className = tinyMCE.getParam("paste_unindented_list_class", "unIndentedList"); + + while (TinyMCE_PastePlugin._convertMiddots(div, "--list--")) ; // bull + while (TinyMCE_PastePlugin._convertMiddots(div, middot, className)) ; // Middot + while (TinyMCE_PastePlugin._convertMiddots(div, bull)) ; // bull + + content = div.innerHTML; + } + + // Replace all headers with strong and fix some other issues + if (tinyMCE.getParam("paste_convert_headers_to_strong", false)) { + content = content.replace(/ <\/h[1-6]>/gi, '

      

    '); + content = content.replace(//gi, '

    '); + content = content.replace(/<\/h[1-6]>/gi, '

    '); + content = content.replace(/ <\/b>/gi, '  '); + content = content.replace(/^( )*/gi, ''); + } + + content = content.replace(/--list--/gi, ""); // Remove --list-- + + if ((cb = tinyMCE.getParam("paste_insert_word_content_callback", "")) != "") + content = eval(cb + "('after', content)"); + + // Insert cleaned content + tinyMCE.execCommand("mceInsertContent", false, content); + window.setTimeout('tinyMCE.execCommand("mceCleanup");', 1); // Do normal cleanup detached from this thread } - } + }, - return false; -} + _reEscape : function(s) { + var l = "?.\\*[](){}+^$:"; + var o = ""; -function TinyMCE_paste__clipboardHTML() { - var div = document.getElementById('_TinyMCE_clipboardHTML'); + for (var i=0; i';}return "";}function TinyMCE_preview_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mcePreview":var previewPage=tinyMCE.getParam("plugin_preview_pageurl",null);var previewWidth=tinyMCE.getParam("plugin_preview_width","550");var previewHeight=tinyMCE.getParam("plugin_preview_height","600");if(previewPage){var template=new Array();template['file']=previewPage;template['width']=previewWidth;template['height']=previewHeight;tinyMCE.openWindow(template,{editor_id:editor_id,resizable:"yes",scrollbars:"yes",inline:"yes",content:tinyMCE.getContent(),content_css:tinyMCE.getParam("content_css")});}else{var win=window.open("","mcePreview","menubar=no,toolbar=no,scrollbars=yes,resizable=yes,left=20,top=20,width="+previewWidth+",height="+previewHeight);var html="";html+=tinyMCE.getParam('doctype');html+='';html+='';html+=''+tinyMCE.getLang('lang_preview_desc')+'';html+='';html+='';html+='';html+='';html+='';html+=tinyMCE.getContent();html+='';html+='';win.document.write(html);win.document.close();}return true;}return false;} \ No newline at end of file +tinyMCE.importPluginLanguagePack('preview','en,tr,cs,de,el,fr_ca,it,ko,pt,sv,zh_cn,fa,fr,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,zh_tw,zh_tw_utf8,sk');var TinyMCE_PreviewPlugin={getInfo:function(){return{longname:'Preview',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_preview.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},getControlHTML:function(cn){switch(cn){case"preview":return tinyMCE.getButtonHTML(cn,'lang_preview_desc','{$pluginurl}/images/preview.gif','mcePreview');}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mcePreview":var previewPage=tinyMCE.getParam("plugin_preview_pageurl",null);var previewWidth=tinyMCE.getParam("plugin_preview_width","550");var previewHeight=tinyMCE.getParam("plugin_preview_height","600");if(previewPage){var template=new Array();template['file']=previewPage;template['width']=previewWidth;template['height']=previewHeight;tinyMCE.openWindow(template,{editor_id:editor_id,resizable:"yes",scrollbars:"yes",inline:"yes",content:tinyMCE.getContent(),content_css:tinyMCE.getParam("content_css")});}else{var win=window.open("","mcePreview","menubar=no,toolbar=no,scrollbars=yes,resizable=yes,left=20,top=20,width="+previewWidth+",height="+previewHeight);var html="";var c=tinyMCE.getContent();var pos=c.indexOf('',pos);pos2=c.lastIndexOf('');c=c.substring(pos+1,pos2);}html+=tinyMCE.getParam('doctype');html+='';html+='';html+=''+tinyMCE.getLang('lang_preview_desc')+'';html+='';html+='';html+='';html+='';html+='';html+=c;html+='';html+='';win.document.write(html);win.document.close();}return true;}return false;}};tinyMCE.addPlugin("preview",TinyMCE_PreviewPlugin); \ No newline at end of file diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/preview/editor_plugin_src.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/preview/editor_plugin_src.js index 028b2f68a..cd7e5e47b 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/preview/editor_plugin_src.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/preview/editor_plugin_src.js @@ -1,72 +1,92 @@ -/* Import plugin specific language pack */ -tinyMCE.importPluginLanguagePack('preview', 'cs,de,el,en,fr_ca,it,ko,pt,sv,zh_cn,fa,fr,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,zh_tw,zh_tw_utf8,sk'); +/** + * $RCSfile: editor_plugin_src.js,v $ + * $Revision: 1.23 $ + * $Date: 2006/03/20 12:03:44 $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved. + */ -function TinyMCE_preview_getInfo() { - return { - longname : 'Preview', - author : 'Moxiecode Systems', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_preview.html', - version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion - }; +/* Import plugin specific language pack */ +tinyMCE.importPluginLanguagePack('preview', 'en,tr,cs,de,el,fr_ca,it,ko,pt,sv,zh_cn,fa,fr,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,zh_tw,zh_tw_utf8,sk'); + +var TinyMCE_PreviewPlugin = { + getInfo : function() { + return { + longname : 'Preview', + author : 'Moxiecode Systems', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_preview.html', + version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion + }; + }, + + /** + * Returns the HTML contents of the preview control. + */ + getControlHTML : function(cn) { + switch (cn) { + case "preview": + return tinyMCE.getButtonHTML(cn, 'lang_preview_desc', '{$pluginurl}/images/preview.gif', 'mcePreview'); + } + + return ""; + }, + + /** + * Executes the mcePreview command. + */ + execCommand : function(editor_id, element, command, user_interface, value) { + // Handle commands + switch (command) { + case "mcePreview": + var previewPage = tinyMCE.getParam("plugin_preview_pageurl", null); + var previewWidth = tinyMCE.getParam("plugin_preview_width", "550"); + var previewHeight = tinyMCE.getParam("plugin_preview_height", "600"); + + // Use a custom preview page + if (previewPage) { + var template = new Array(); + + template['file'] = previewPage; + template['width'] = previewWidth; + template['height'] = previewHeight; + + tinyMCE.openWindow(template, {editor_id : editor_id, resizable : "yes", scrollbars : "yes", inline : "yes", content : tinyMCE.getContent(), content_css : tinyMCE.getParam("content_css")}); + } else { + var win = window.open("", "mcePreview", "menubar=no,toolbar=no,scrollbars=yes,resizable=yes,left=20,top=20,width=" + previewWidth + ",height=" + previewHeight); + var html = ""; + var c = tinyMCE.getContent(); + var pos = c.indexOf('', pos); + pos2 = c.lastIndexOf(''); + c = c.substring(pos + 1, pos2); + } + + html += tinyMCE.getParam('doctype'); + html += ''; + html += ''; + html += '' + tinyMCE.getLang('lang_preview_desc') + ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += c; + html += ''; + html += ''; + + win.document.write(html); + win.document.close(); + } + + return true; + } + + return false; + } }; -/** - * Returns the HTML contents of the preview control. - */ -function TinyMCE_preview_getControlHTML(control_name) { - switch (control_name) { - case "preview": - var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcePreview\');return false;'; - return ''; - } - - return ""; -} - -/** - * Executes the mcePreview command. - */ -function TinyMCE_preview_execCommand(editor_id, element, command, user_interface, value) { - // Handle commands - switch (command) { - case "mcePreview": - var previewPage = tinyMCE.getParam("plugin_preview_pageurl", null); - var previewWidth = tinyMCE.getParam("plugin_preview_width", "550"); - var previewHeight = tinyMCE.getParam("plugin_preview_height", "600"); - - // Use a custom preview page - if (previewPage) { - var template = new Array(); - - template['file'] = previewPage; - template['width'] = previewWidth; - template['height'] = previewHeight; - - tinyMCE.openWindow(template, {editor_id : editor_id, resizable : "yes", scrollbars : "yes", inline : "yes", content : tinyMCE.getContent(), content_css : tinyMCE.getParam("content_css")}); - } else { - var win = window.open("", "mcePreview", "menubar=no,toolbar=no,scrollbars=yes,resizable=yes,left=20,top=20,width=" + previewWidth + ",height=" + previewHeight); - var html = ""; - - html += tinyMCE.getParam('doctype'); - html += ''; - html += ''; - html += '' + tinyMCE.getLang('lang_preview_desc') + ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += tinyMCE.getContent(); - html += ''; - html += ''; - - win.document.write(html); - win.document.close(); - } - - return true; - } - - return false; -} +tinyMCE.addPlugin("preview", TinyMCE_PreviewPlugin); diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/preview/langs/cs.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/preview/langs/cs.js index 3cd7d4e8f..c852107c9 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/preview/langs/cs.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/preview/langs/cs.js @@ -2,7 +2,7 @@ * Czech lang variables * encoding: utf-8 * - * $Id: cs.js,v 1.4 2005/10/18 13:59:43 spocke Exp $ + * $Id: cs.js,v 1.5 2006/01/11 14:25:49 spocke Exp $ */ tinyMCE.addToLang('',{ diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/preview/langs/zh_cn.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/preview/langs/zh_cn.js index b5b6d0696..ff49c4091 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/preview/langs/zh_cn.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/preview/langs/zh_cn.js @@ -1,4 +1,5 @@ -// Simplified Chinese lang variables contributed by cube316 (cube316@etang.com) +// Simplified Chinese lang variables contributed by TinyMCE_China_Team ( tinymce_china {AT} yahoogroups {DOT} com ). +// visit our homepage at: http://www.cube316.net/tinymce/ for more information. tinyMCE.addToLang('',{ preview_desc : 'Ô¤ÀÀ' diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/print/editor_plugin.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/print/editor_plugin.js index 4f565e554..5ea391cb8 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/print/editor_plugin.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/print/editor_plugin.js @@ -1 +1 @@ -tinyMCE.importPluginLanguagePack('print','en,sv,zh_cn,fa,fr_ca,fr,de,pl,pt_br,cs,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,es,cy,is,zh_tw,zh_tw_utf8,sk');function TinyMCE_print_getInfo(){return{longname:'Print',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_print.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};};function TinyMCE_print_getControlHTML(control_name){switch(control_name){case "print":var cmd='tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcePrint\',true);return false;';return '';}return "";}function TinyMCE_print_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mcePrint":tinyMCE.getInstanceById(editor_id).contentWindow.print();return true;}return false;} \ No newline at end of file +tinyMCE.importPluginLanguagePack('print','en,tr,sv,zh_cn,fa,fr_ca,fr,de,pl,pt_br,cs,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,es,cy,is,zh_tw,zh_tw_utf8,sk');var TinyMCE_PrintPlugin={getInfo:function(){return{longname:'Print',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_print.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},getControlHTML:function(cn){switch(cn){case"print":return tinyMCE.getButtonHTML(cn,'lang_print_desc','{$pluginurl}/images/print.gif','mcePrint');}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mcePrint":tinyMCE.getInstanceById(editor_id).contentWindow.print();return true;}return false;}};tinyMCE.addPlugin("print",TinyMCE_PrintPlugin); \ No newline at end of file diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/print/editor_plugin_src.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/print/editor_plugin_src.js index d2188cd37..aa2d4eea4 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/print/editor_plugin_src.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/print/editor_plugin_src.js @@ -1,37 +1,49 @@ -/* Import theme specific language pack */ -tinyMCE.importPluginLanguagePack('print', 'en,sv,zh_cn,fa,fr_ca,fr,de,pl,pt_br,cs,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,es,cy,is,zh_tw,zh_tw_utf8,sk'); +/** + * $RCSfile: editor_plugin_src.js,v $ + * $Revision: 1.19 $ + * $Date: 2006/02/10 16:29:40 $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved. + */ -function TinyMCE_print_getInfo() { - return { - longname : 'Print', - author : 'Moxiecode Systems', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_print.html', - version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion - }; +/* Import theme specific language pack */ +tinyMCE.importPluginLanguagePack('print', 'en,tr,sv,zh_cn,fa,fr_ca,fr,de,pl,pt_br,cs,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,es,cy,is,zh_tw,zh_tw_utf8,sk'); + +var TinyMCE_PrintPlugin = { + getInfo : function() { + return { + longname : 'Print', + author : 'Moxiecode Systems', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_print.html', + version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion + }; + }, + + getControlHTML : function(cn) { + switch (cn) { + case "print": + return tinyMCE.getButtonHTML(cn, 'lang_print_desc', '{$pluginurl}/images/print.gif', 'mcePrint'); + } + + return ""; + }, + + /** + * Executes the search/replace commands. + */ + execCommand : function(editor_id, element, command, user_interface, value) { + // Handle commands + switch (command) { + case "mcePrint": + tinyMCE.getInstanceById(editor_id).contentWindow.print(); + return true; + } + + // Pass to next handler in chain + return false; + } }; -function TinyMCE_print_getControlHTML(control_name) { - switch (control_name) { - case "print": - var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcePrint\',true);return false;'; - return ''; - } - - return ""; -} - -/** - * Executes the search/replace commands. - */ -function TinyMCE_print_execCommand(editor_id, element, command, user_interface, value) { - // Handle commands - switch (command) { - case "mcePrint": - tinyMCE.getInstanceById(editor_id).contentWindow.print(); - return true; - } - - // Pass to next handler in chain - return false; -} +tinyMCE.addPlugin("print", TinyMCE_PrintPlugin); diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/print/langs/zh_cn.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/print/langs/zh_cn.js index 957512c88..c0a7aba56 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/print/langs/zh_cn.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/print/langs/zh_cn.js @@ -1,5 +1,5 @@ -// Simplified Chinese lang variables contributed by cube316 (cube316@gmail.com) -//Çë·ÃÎÊ http://www.cube316.net/ ÒÔ»ñÈ¡TinyMCEµÄÖÐÎÄÖ§³Ö +// Simplified Chinese lang variables contributed by TinyMCE_China_Team ( tinymce_china {AT} yahoogroups {DOT} com ). +// visit our homepage at: http://www.cube316.net/tinymce/ for more information. tinyMCE.addToLang('',{ print_desc : '´òÓ¡' diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/save/editor_plugin.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/save/editor_plugin.js index 61153794d..d299c2322 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/save/editor_plugin.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/save/editor_plugin.js @@ -1 +1 @@ -tinyMCE.importPluginLanguagePack('save','en,sv,zh_cn,cs,fa,fr_ca,fr,de,pl,pt_br,nl,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,da,es,cy,is,zh_tw,zh_tw_utf8,sk');function TinyMCE_save_getInfo(){return{longname:'Save',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_save.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};};function TinyMCE_save_getControlHTML(control_name){switch(control_name){case "save":var cmd='tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceSave\');return false;';return '';}return "";}function TinyMCE_save_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mceSave":var formObj=tinyMCE.selectedInstance.formElement.form;if(formObj){tinyMCE.triggerSave();for(var i=0;i'; - } - - return ""; -} - -/** - * Executes the save command. - */ -function TinyMCE_save_execCommand(editor_id, element, command, user_interface, value) { - // Handle commands - switch (command) { - case "mceSave": - var formObj = tinyMCE.selectedInstance.formElement.form; - - if (formObj) { - tinyMCE.triggerSave(); - - // Disable all UI form elements that TinyMCE created - for (var i=0; i';case "replace":var cmd='tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceSearchReplace\',true);return false;';return '';}return "";}function TinyMCE_searchreplace_execCommand(editor_id,element,command,user_interface,value){function defValue(key,default_value){value[key]=typeof(value[key])=="undefined"?default_value:value[key];}function replaceSel(search_str,str){if(!tinyMCE.isMSIE){var sel=instance.contentWindow.getSelection();var rng=sel.getRangeAt(0);}else{var rng=instance.contentWindow.document.selection.createRange();}if(!tinyMCE.isMSIE){var doc=instance.contentWindow.document;if(str.indexOf(search_str)==-1){rng.deleteContents();rng.insertNode(rng.createContextualFragment(str));rng.collapse(false);}else{doc.execCommand("insertimage",false,"#mce_temp_url#");var elm=tinyMCE.getElementByAttributeValue(doc.body,"img","src","#mce_temp_url#");elm.parentNode.replaceChild(doc.createTextNode(str),elm);}}else{if(rng.item)rng.item(0).outerHTML=str;else rng.pasteHTML(str);}}var instance=tinyMCE.getInstanceById(editor_id);if(!value)value=new Array();defValue("editor_id",editor_id);defValue("searchstring","");defValue("replacestring",null);defValue("replacemode","none");defValue("casesensitive",false);defValue("backwards",false);defValue("wrap",false);defValue("wholeword",false);defValue("inline","yes");switch(command){case "mceResetSearch":tinyMCE.lastSearchRng=null;return true;case "mceSearch":if(user_interface){var template=new Array();if(value['replacestring']!=null){template['file']='../../plugins/searchreplace/replace.htm';template['width']=320;template['height']=120+(tinyMCE.isNS7?20:0);template['width']+=tinyMCE.getLang('lang_searchreplace_replace_delta_width',0);template['height']+=tinyMCE.getLang('lang_searchreplace_replace_delta_height',0);}else{template['file']='../../plugins/searchreplace/search.htm';template['width']=310;template['height']=105+(tinyMCE.isNS7?25:0);template['width']+=tinyMCE.getLang('lang_searchreplace_search_delta_width',0);template['height']+=tinyMCE.getLang('lang_searchreplace_replace_delta_height',0);}tinyMCE.openWindow(template,value);}else{var win=tinyMCE.getInstanceById(editor_id).contentWindow;var doc=tinyMCE.getInstanceById(editor_id).contentWindow.document;var body=tinyMCE.getInstanceById(editor_id).contentWindow.document.body;if(body.innerHTML==""){alert(tinyMCE.getLang('lang_searchreplace_notfound'));return true;}if(value['replacemode']=="current"){replaceSel(value['string'],value['replacestring']);value['replacemode']="none";tinyMCE.execInstanceCommand(editor_id,'mceSearch',user_interface,value,false);return true;}if(tinyMCE.isMSIE){var rng=tinyMCE.lastSearchRng?tinyMCE.lastSearchRng:doc.selection.createRange();var flags=0;if(value['wholeword'])flags=flags|2;if(value['casesensitive'])flags=flags|4;if(!rng.findText){alert('This operation is currently not supported by this browser.');return true;}if(value['replacemode']=="all"){while(rng.findText(value['string'],value['backwards']?-1:1,flags)){rng.scrollIntoView();rng.select();rng.collapse(false);replaceSel(value['string'],value['replacestring']);}alert(tinyMCE.getLang('lang_searchreplace_allreplaced'));return true;}if(rng.findText(value['string'],value['backwards']?-1:1,flags)){rng.scrollIntoView();rng.select();rng.collapse(value['backwards']);tinyMCE.lastSearchRng=rng;}else alert(tinyMCE.getLang('lang_searchreplace_notfound'));}else{if(value['replacemode']=="all"){while(win.find(value['string'],value['casesensitive'],value['backwards'],value['wrap'],value['wholeword'],false,false))replaceSel(value['string'],value['replacestring']);alert(tinyMCE.getLang('lang_searchreplace_allreplaced'));return true;}if(!win.find(value['string'],value['casesensitive'],value['backwards'],value['wrap'],value['wholeword'],false,false))alert(tinyMCE.getLang('lang_searchreplace_notfound'));}}return true;case "mceSearchReplace":value['replacestring']="";tinyMCE.execInstanceCommand(editor_id,'mceSearch',user_interface,value,false);return true;}return false;}function TinyMCE_searchreplace_handleNodeChange(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){return true;} \ No newline at end of file +tinyMCE.importPluginLanguagePack('searchreplace','en,tr,sv,zh_cn,fa,fr_ca,fr,de,pl,pt_br,cs,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,zh_tw,zh_tw_utf8,sk');var TinyMCE_SearchReplacePlugin={getInfo:function(){return{longname:'Search/Replace',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_searchreplace.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},initInstance:function(inst){inst.addShortcut('ctrl','f','lang_searchreplace_search_desc','mceSearch',true);},getControlHTML:function(cn){switch(cn){case"search":return tinyMCE.getButtonHTML(cn,'lang_searchreplace_search_desc','{$pluginurl}/images/search.gif','mceSearch',true);case"replace":return tinyMCE.getButtonHTML(cn,'lang_searchreplace_replace_desc','{$pluginurl}/images/replace.gif','mceSearchReplace',true);}return"";},execCommand:function(editor_id,element,command,user_interface,value){var instance=tinyMCE.getInstanceById(editor_id);function defValue(key,default_value){value[key]=typeof(value[key])=="undefined"?default_value:value[key];}function replaceSel(search_str,str,back){instance.execCommand('mceInsertContent',false,str);}if(!value)value=new Array();defValue("editor_id",editor_id);defValue("searchstring","");defValue("replacestring",null);defValue("replacemode","none");defValue("casesensitive",false);defValue("backwards",false);defValue("wrap",false);defValue("wholeword",false);defValue("inline","yes");switch(command){case"mceResetSearch":tinyMCE.lastSearchRng=null;return true;case"mceSearch":if(user_interface){var template=new Array();if(value['replacestring']!=null){template['file']='../../plugins/searchreplace/replace.htm';template['width']=320;template['height']=100+(tinyMCE.isNS7?20:0);template['width']+=tinyMCE.getLang('lang_searchreplace_replace_delta_width',0);template['height']+=tinyMCE.getLang('lang_searchreplace_replace_delta_height',0);}else{template['file']='../../plugins/searchreplace/search.htm';template['width']=310;template['height']=105+(tinyMCE.isNS7?25:0);template['width']+=tinyMCE.getLang('lang_searchreplace_search_delta_width',0);template['height']+=tinyMCE.getLang('lang_searchreplace_replace_delta_height',0);}instance.execCommand('SelectAll');if(tinyMCE.isMSIE){var r=instance.selection.getRng();r.collapse(true);r.select();}else instance.selection.getSel().collapseToStart();tinyMCE.openWindow(template,value);}else{var win=tinyMCE.getInstanceById(editor_id).contentWindow;var doc=tinyMCE.getInstanceById(editor_id).contentWindow.document;var body=tinyMCE.getInstanceById(editor_id).contentWindow.document.body;if(body.innerHTML==""){alert(tinyMCE.getLang('lang_searchreplace_notfound'));return true;}if(value['replacemode']=="current"){replaceSel(value['string'],value['replacestring'],value['backwards']);value['replacemode']="none";tinyMCE.execInstanceCommand(editor_id,'mceSearch',user_interface,value,false);return true;}if(tinyMCE.isMSIE){var rng=tinyMCE.lastSearchRng?tinyMCE.lastSearchRng:doc.selection.createRange();var flags=0;if(value['wholeword'])flags=flags|2;if(value['casesensitive'])flags=flags|4;if(!rng.findText){alert('This operation is currently not supported by this browser.');return true;}if(value['replacemode']=="all"){while(rng.findText(value['string'],value['backwards']?-1:1,flags)){rng.scrollIntoView();rng.select();rng.collapse(false);replaceSel(value['string'],value['replacestring'],value['backwards']);}alert(tinyMCE.getLang('lang_searchreplace_allreplaced'));return true;}if(rng.findText(value['string'],value['backwards']?-1:1,flags)){rng.scrollIntoView();rng.select();rng.collapse(value['backwards']);tinyMCE.lastSearchRng=rng;}else alert(tinyMCE.getLang('lang_searchreplace_notfound'));}else{if(value['replacemode']=="all"){while(win.find(value['string'],value['casesensitive'],value['backwards'],value['wrap'],value['wholeword'],false,false))replaceSel(value['string'],value['replacestring'],value['backwards']);alert(tinyMCE.getLang('lang_searchreplace_allreplaced'));return true;}if(!win.find(value['string'],value['casesensitive'],value['backwards'],value['wrap'],value['wholeword'],false,false))alert(tinyMCE.getLang('lang_searchreplace_notfound'));}}return true;case"mceSearchReplace":value['replacestring']="";tinyMCE.execInstanceCommand(editor_id,'mceSearch',user_interface,value,false);return true;}return false;}};tinyMCE.addPlugin("searchreplace",TinyMCE_SearchReplacePlugin); \ No newline at end of file diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js index 7a7dde7a8..eed96db9e 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js @@ -1,195 +1,185 @@ -/* Import theme specific language pack */ -tinyMCE.importPluginLanguagePack('searchreplace', 'en,sv,zh_cn,fa,fr_ca,fr,de,pl,pt_br,cs,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,zh_tw,zh_tw_utf8,sk'); - -function TinyMCE_searchreplace_getInfo() { - return { - longname : 'Search/Replace', - author : 'Moxiecode Systems', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_searchreplace.html', - version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion - }; -}; - -function TinyMCE_searchreplace_getControlHTML(control_name) { - switch (control_name) { - case "search": - var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceSearch\',true);return false;'; - return ''; - - case "replace": - var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceSearchReplace\',true);return false;'; - return ''; - } - - return ""; -} - /** - * Executes the search/replace commands. + * $RCSfile: editor_plugin_src.js,v $ + * $Revision: 1.27 $ + * $Date: 2006/02/13 15:09:28 $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved. */ -function TinyMCE_searchreplace_execCommand(editor_id, element, command, user_interface, value) { - function defValue(key, default_value) { - value[key] = typeof(value[key]) == "undefined" ? default_value : value[key]; - } - function replaceSel(search_str, str) { - // Get current selection - if (!tinyMCE.isMSIE) { - var sel = instance.contentWindow.getSelection(); - var rng = sel.getRangeAt(0); - } else { - var rng = instance.contentWindow.document.selection.createRange(); +/* Import theme specific language pack */ +tinyMCE.importPluginLanguagePack('searchreplace', 'en,tr,sv,zh_cn,fa,fr_ca,fr,de,pl,pt_br,cs,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,zh_tw,zh_tw_utf8,sk'); + +var TinyMCE_SearchReplacePlugin = { + getInfo : function() { + return { + longname : 'Search/Replace', + author : 'Moxiecode Systems', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_searchreplace.html', + version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion + }; + }, + + initInstance : function(inst) { + inst.addShortcut('ctrl', 'f', 'lang_searchreplace_search_desc', 'mceSearch', true); + }, + + getControlHTML : function(cn) { + switch (cn) { + case "search": + return tinyMCE.getButtonHTML(cn, 'lang_searchreplace_search_desc', '{$pluginurl}/images/search.gif', 'mceSearch', true); + case "replace": + return tinyMCE.getButtonHTML(cn, 'lang_searchreplace_replace_desc', '{$pluginurl}/images/replace.gif', 'mceSearchReplace', true); + } + return ""; + }, + + /** + * Executes the search/replace commands. + */ + execCommand : function(editor_id, element, command, user_interface, value) { + var instance = tinyMCE.getInstanceById(editor_id); + + function defValue(key, default_value) { + value[key] = typeof(value[key]) == "undefined" ? default_value : value[key]; } - // Replace current one - if (!tinyMCE.isMSIE) { - var doc = instance.contentWindow.document; - - // This way works when the replace doesn't contain the search string - if (str.indexOf(search_str) == -1) { - rng.deleteContents(); - rng.insertNode(rng.createContextualFragment(str)); - rng.collapse(false); - } else { - // Insert content ugly way! Needed to move selection to after replace item - doc.execCommand("insertimage", false, "#mce_temp_url#"); - var elm = tinyMCE.getElementByAttributeValue(doc.body, "img", "src", "#mce_temp_url#"); - elm.parentNode.replaceChild(doc.createTextNode(str), elm); - } - } else { - if (rng.item) - rng.item(0).outerHTML = str; - else - rng.pasteHTML(str); + function replaceSel(search_str, str, back) { + instance.execCommand('mceInsertContent', false, str); } - } - var instance = tinyMCE.getInstanceById(editor_id); + if (!value) + value = new Array(); - if (!value) - value = new Array(); + // Setup defualt values + defValue("editor_id", editor_id); + defValue("searchstring", ""); + defValue("replacestring", null); + defValue("replacemode", "none"); + defValue("casesensitive", false); + defValue("backwards", false); + defValue("wrap", false); + defValue("wholeword", false); + defValue("inline", "yes"); - // Setup defualt values - defValue("editor_id", editor_id); - defValue("searchstring", ""); - defValue("replacestring", null); - defValue("replacemode", "none"); - defValue("casesensitive", false); - defValue("backwards", false); - defValue("wrap", false); - defValue("wholeword", false); - defValue("inline", "yes"); + // Handle commands + switch (command) { + case "mceResetSearch": + tinyMCE.lastSearchRng = null; + return true; - // Handle commands - switch (command) { - case "mceResetSearch": - tinyMCE.lastSearchRng = null; - return true; + case "mceSearch": + if (user_interface) { + // Open search dialog + var template = new Array(); - case "mceSearch": - if (user_interface) { - // Open search dialog - var template = new Array(); + if (value['replacestring'] != null) { + template['file'] = '../../plugins/searchreplace/replace.htm'; // Relative to theme + template['width'] = 320; + template['height'] = 100 + (tinyMCE.isNS7 ? 20 : 0); + template['width'] += tinyMCE.getLang('lang_searchreplace_replace_delta_width', 0); + template['height'] += tinyMCE.getLang('lang_searchreplace_replace_delta_height', 0); + } else { + template['file'] = '../../plugins/searchreplace/search.htm'; // Relative to theme + template['width'] = 310; + template['height'] = 105 + (tinyMCE.isNS7 ? 25 : 0); + template['width'] += tinyMCE.getLang('lang_searchreplace_search_delta_width', 0); + template['height'] += tinyMCE.getLang('lang_searchreplace_replace_delta_height', 0); + } - if (value['replacestring'] != null) { - template['file'] = '../../plugins/searchreplace/replace.htm'; // Relative to theme - template['width'] = 320; - template['height'] = 120 + (tinyMCE.isNS7 ? 20 : 0); - template['width'] += tinyMCE.getLang('lang_searchreplace_replace_delta_width', 0); - template['height'] += tinyMCE.getLang('lang_searchreplace_replace_delta_height', 0); + instance.execCommand('SelectAll'); + + if (tinyMCE.isMSIE) { + var r = instance.selection.getRng(); + r.collapse(true); + r.select(); + } else + instance.selection.getSel().collapseToStart(); + + tinyMCE.openWindow(template, value); } else { - template['file'] = '../../plugins/searchreplace/search.htm'; // Relative to theme - template['width'] = 310; - template['height'] = 105 + (tinyMCE.isNS7 ? 25 : 0); - template['width'] += tinyMCE.getLang('lang_searchreplace_search_delta_width', 0); - template['height'] += tinyMCE.getLang('lang_searchreplace_replace_delta_height', 0); - } + var win = tinyMCE.getInstanceById(editor_id).contentWindow; + var doc = tinyMCE.getInstanceById(editor_id).contentWindow.document; + var body = tinyMCE.getInstanceById(editor_id).contentWindow.document.body; - tinyMCE.openWindow(template, value); - } else { - var win = tinyMCE.getInstanceById(editor_id).contentWindow; - var doc = tinyMCE.getInstanceById(editor_id).contentWindow.document; - var body = tinyMCE.getInstanceById(editor_id).contentWindow.document.body; - - // Whats the point - if (body.innerHTML == "") { - alert(tinyMCE.getLang('lang_searchreplace_notfound')); - return true; - } - - // Handle replace current - if (value['replacemode'] == "current") { - replaceSel(value['string'], value['replacestring']); - - // Search next one - value['replacemode'] = "none"; - tinyMCE.execInstanceCommand(editor_id, 'mceSearch', user_interface, value, false); - - return true; - } - - if (tinyMCE.isMSIE) { - var rng = tinyMCE.lastSearchRng ? tinyMCE.lastSearchRng : doc.selection.createRange(); - var flags = 0; - - if (value['wholeword']) - flags = flags | 2; - - if (value['casesensitive']) - flags = flags | 4; - - if (!rng.findText) { - alert('This operation is currently not supported by this browser.'); + // Whats the point + if (body.innerHTML == "") { + alert(tinyMCE.getLang('lang_searchreplace_notfound')); return true; } - // Handle replace all mode - if (value['replacemode'] == "all") { - while (rng.findText(value['string'], value['backwards'] ? -1 : 1, flags)) { - rng.scrollIntoView(); - rng.select(); - rng.collapse(false); - replaceSel(value['string'], value['replacestring']); + // Handle replace current + if (value['replacemode'] == "current") { + replaceSel(value['string'], value['replacestring'], value['backwards']); + + // Search next one + value['replacemode'] = "none"; + tinyMCE.execInstanceCommand(editor_id, 'mceSearch', user_interface, value, false); + + return true; + } + + if (tinyMCE.isMSIE) { + var rng = tinyMCE.lastSearchRng ? tinyMCE.lastSearchRng : doc.selection.createRange(); + var flags = 0; + + if (value['wholeword']) + flags = flags | 2; + + if (value['casesensitive']) + flags = flags | 4; + + if (!rng.findText) { + alert('This operation is currently not supported by this browser.'); + return true; } - alert(tinyMCE.getLang('lang_searchreplace_allreplaced')); - return true; + // Handle replace all mode + if (value['replacemode'] == "all") { + while (rng.findText(value['string'], value['backwards'] ? -1 : 1, flags)) { + rng.scrollIntoView(); + rng.select(); + rng.collapse(false); + replaceSel(value['string'], value['replacestring'], value['backwards']); + } + + alert(tinyMCE.getLang('lang_searchreplace_allreplaced')); + return true; + } + + if (rng.findText(value['string'], value['backwards'] ? -1 : 1, flags)) { + rng.scrollIntoView(); + rng.select(); + rng.collapse(value['backwards']); + tinyMCE.lastSearchRng = rng; + } else + alert(tinyMCE.getLang('lang_searchreplace_notfound')); + } else { + if (value['replacemode'] == "all") { + while (win.find(value['string'], value['casesensitive'], value['backwards'], value['wrap'], value['wholeword'], false, false)) + replaceSel(value['string'], value['replacestring'], value['backwards']); + + alert(tinyMCE.getLang('lang_searchreplace_allreplaced')); + return true; + } + + if (!win.find(value['string'], value['casesensitive'], value['backwards'], value['wrap'], value['wholeword'], false, false)) + alert(tinyMCE.getLang('lang_searchreplace_notfound')); } - - if (rng.findText(value['string'], value['backwards'] ? -1 : 1, flags)) { - rng.scrollIntoView(); - rng.select(); - rng.collapse(value['backwards']); - tinyMCE.lastSearchRng = rng; - } else - alert(tinyMCE.getLang('lang_searchreplace_notfound')); - } else { - if (value['replacemode'] == "all") { - while (win.find(value['string'], value['casesensitive'], value['backwards'], value['wrap'], value['wholeword'], false, false)) - replaceSel(value['string'], value['replacestring']); - - alert(tinyMCE.getLang('lang_searchreplace_allreplaced')); - return true; - } - - if (!win.find(value['string'], value['casesensitive'], value['backwards'], value['wrap'], value['wholeword'], false, false)) - alert(tinyMCE.getLang('lang_searchreplace_notfound')); } - } - return true; + return true; - case "mceSearchReplace": - value['replacestring'] = ""; + case "mceSearchReplace": + value['replacestring'] = ""; - tinyMCE.execInstanceCommand(editor_id, 'mceSearch', user_interface, value, false); - return true; + tinyMCE.execInstanceCommand(editor_id, 'mceSearch', user_interface, value, false); + return true; + } + + // Pass to next handler in chain + return false; } +}; - // Pass to next handler in chain - return false; -} - -function TinyMCE_searchreplace_handleNodeChange(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) { - return true; -} +tinyMCE.addPlugin("searchreplace", TinyMCE_SearchReplacePlugin); diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/searchreplace/jscripts/replace.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/searchreplace/jscripts/replace.js index ad3c5495c..3cb417813 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/searchreplace/jscripts/replace.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/searchreplace/jscripts/replace.js @@ -6,8 +6,8 @@ function init() { formObj.searchstring.value = tinyMCE.getWindowArg("searchstring"); formObj.replacestring.value = tinyMCE.getWindowArg("replacestring"); formObj.casesensitivebox.checked = tinyMCE.getWindowArg("casesensitive"); - formObj.backwards[0].checked = tinyMCE.getWindowArg("backwards"); - formObj.backwards[1].checked = !tinyMCE.getWindowArg("backwards"); +// formObj.backwards[0].checked = tinyMCE.getWindowArg("backwards"); +// formObj.backwards[1].checked = !tinyMCE.getWindowArg("backwards"); // formObj.wrapatend.checked = tinyMCE.getWindowArg("wrap"); // formObj.wholeword.checked = tinyMCE.getWindowArg("wholeword"); @@ -27,7 +27,7 @@ function searchNext(replacemode) { replacestring : formObj.replacestring.value, replacemode : replacemode, casesensitive : formObj.casesensitivebox.checked, - backwards : formObj.backwards[0].checked + backwards : false // wrap : formObj.wrapatend.checked, // wholeword : formObj.wholeword.checked }, false); diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/searchreplace/langs/cs.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/searchreplace/langs/cs.js index 2034f1144..21047bbf7 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/searchreplace/langs/cs.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/searchreplace/langs/cs.js @@ -2,7 +2,7 @@ * Czech lang variables * encoding: utf-8 * - * $Id: cs.js,v 1.4 2005/10/18 13:59:43 spocke Exp $ + * $Id: cs.js,v 1.5 2006/01/11 14:25:49 spocke Exp $ */ tinyMCE.addToLang('',{ diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/searchreplace/langs/da.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/searchreplace/langs/da.js index 4e9b3dbcc..c3950fd49 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/searchreplace/langs/da.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/searchreplace/langs/da.js @@ -1,20 +1,20 @@ -// DK lang variables contributed by Jan Moelgaard +// DK lang variables contributed by Jan Moelgaard, John Dalsgaard and Bo Frederiksen. tinyMCE.addToLang('',{ -searchreplace_search_desc : 'Søg', -searchreplace_searchnext_desc : 'Søg igen', -searchreplace_replace_desc : 'Søg og erstat', -searchreplace_notfound : 'Søgningen er færdig. Søgeudtrykket kunne ikke findes.', -searchreplace_search_title : 'Søg', -searchreplace_replace_title : 'Søg og erstat', -searchreplace_allreplaced : 'Alle forekomster af søgeudtrykket blev erstattet.', -searchreplace_findwhat : 'Hvad skal vi søge efter', +searchreplace_search_desc : 'Søg', +searchreplace_searchnext_desc : 'Søg igen', +searchreplace_replace_desc : 'Søg og erstat', +searchreplace_notfound : 'Søgningen er færdig. Søgeudtrykket kunne ikke findes.', +searchreplace_search_title : 'Søg', +searchreplace_replace_title : 'Søg og erstat', +searchreplace_allreplaced : 'Alle forekomster af søgeudtrykket blev erstattet.', +searchreplace_findwhat : 'Hvad skal vi søge efter', searchreplace_replacewith : 'Erstat det med', searchreplace_direction : 'Retning', searchreplace_up : 'Op', searchreplace_down : 'Ned', -searchreplace_case : 'Skelne mellem store og små bogstaver', -searchreplace_findnext : 'Søg efter næste', +searchreplace_case : 'Skelne mellem store og små; bogstaver', +searchreplace_findnext : 'Søg efter næste', searchreplace_replace : 'Erstat', searchreplace_replaceall : 'Erstat alle', searchreplace_cancel : 'Fortryd' diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/searchreplace/langs/en.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/searchreplace/langs/en.js index 8218e9c92..32af8282e 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/searchreplace/langs/en.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/searchreplace/langs/en.js @@ -4,10 +4,10 @@ tinyMCE.addToLang('',{ searchreplace_search_desc : 'Find', searchreplace_searchnext_desc : 'Find again', searchreplace_replace_desc : 'Find/Replace', -searchreplace_notfound : 'The search has been compleated. The search string could not be found.', +searchreplace_notfound : 'The search has been completed. The search string could not be found.', searchreplace_search_title : 'Find', searchreplace_replace_title : 'Find/Replace', -searchreplace_allreplaced : 'All occurrences of the search string was replaced.', +searchreplace_allreplaced : 'All occurrences of the search string were replaced.', searchreplace_findwhat : 'Find what', searchreplace_replacewith : 'Replace with', searchreplace_direction : 'Direction', diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/searchreplace/langs/zh_cn.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/searchreplace/langs/zh_cn.js index 28be76c7e..57386790f 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/searchreplace/langs/zh_cn.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/searchreplace/langs/zh_cn.js @@ -1,4 +1,5 @@ -// Simplified Chinese lang variables contributed by tom_cat (thomaswangyang@gmail.com) +// Simplified Chinese lang variables contributed by TinyMCE_China_Team ( tinymce_china {AT} yahoogroups {DOT} com ). +// visit our homepage at: http://www.cube316.net/tinymce/ for more information. tinyMCE.addToLang('',{ searchreplace_search_desc : '²éÕÒ', diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/searchreplace/replace.htm b/www/extras/tinymce2/jscripts/tiny_mce/plugins/searchreplace/replace.htm index e724640f7..0629da334 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/searchreplace/replace.htm +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/searchreplace/replace.htm @@ -17,7 +17,7 @@ - + - + - + - + - + - + - + - + diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/en/style.css b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/en/style.css index 722f537a1..ebc05380e 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/en/style.css +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/en/style.css @@ -3,8 +3,8 @@ body, td, .content { font-family: Verdana, Arial, helvetica, sans-serif; font-si .title { font-family: Verdana, Arial, helvetica, sans-serif; font-size: 16px; font-weight: bold; } .subtitle { font-size: 12px; font-weight: bold; } -.toc_ul, .toc_li { margin-left: 8 px; line-height: 16px; } -.step_ol, .step_li { margin-left: 11 px; line-height: 16px; } +.toc_ul, .toc_li { margin-left: 8px; line-height: 16px; } +.step_ol, .step_li { margin-left: 11px; line-height: 16px; } img { border: #000000 solid 1px; } a:visited { color: #666666; text-decoration: underline; } diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/es/common_buttons.htm b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/es/common_buttons.htm index 458a4fd55..036b7a0d9 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/es/common_buttons.htm +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/es/common_buttons.htm @@ -99,31 +99,31 @@ Pequeña descripción de cada botoón. + - + - + - + - + - + - + diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/es/style.css b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/es/style.css index 722f537a1..ebc05380e 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/es/style.css +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/es/style.css @@ -3,8 +3,8 @@ body, td, .content { font-family: Verdana, Arial, helvetica, sans-serif; font-si .title { font-family: Verdana, Arial, helvetica, sans-serif; font-size: 16px; font-weight: bold; } .subtitle { font-size: 12px; font-weight: bold; } -.toc_ul, .toc_li { margin-left: 8 px; line-height: 16px; } -.step_ol, .step_li { margin-left: 11 px; line-height: 16px; } +.toc_ul, .toc_li { margin-left: 8px; line-height: 16px; } +.step_ol, .step_li { margin-left: 11px; line-height: 16px; } img { border: #000000 solid 1px; } a:visited { color: #666666; text-decoration: underline; } diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/fi/common_buttons.htm b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/fi/common_buttons.htm index 7d423df2d..46d6ed8d2 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/fi/common_buttons.htm +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/fi/common_buttons.htm @@ -99,31 +99,31 @@ Alla on lyhyt selostus kaikista toimintonapeista. + - + - + - + - + - + - + diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/fi/style.css b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/fi/style.css index 722f537a1..ebc05380e 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/fi/style.css +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/fi/style.css @@ -3,8 +3,8 @@ body, td, .content { font-family: Verdana, Arial, helvetica, sans-serif; font-si .title { font-family: Verdana, Arial, helvetica, sans-serif; font-size: 16px; font-weight: bold; } .subtitle { font-size: 12px; font-weight: bold; } -.toc_ul, .toc_li { margin-left: 8 px; line-height: 16px; } -.step_ol, .step_li { margin-left: 11 px; line-height: 16px; } +.toc_ul, .toc_li { margin-left: 8px; line-height: 16px; } +.step_ol, .step_li { margin-left: 11px; line-height: 16px; } img { border: #000000 solid 1px; } a:visited { color: #666666; text-decoration: underline; } diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/fr/common_buttons.htm b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/fr/common_buttons.htm index aa9c23740..3effee0fe 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/fr/common_buttons.htm +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/fr/common_buttons.htm @@ -103,32 +103,32 @@ Ci-dessous une courte description de chacuns des outils. + - + - + - + - + - + - + diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/fr/style.css b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/fr/style.css index 722f537a1..ebc05380e 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/fr/style.css +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/fr/style.css @@ -3,8 +3,8 @@ body, td, .content { font-family: Verdana, Arial, helvetica, sans-serif; font-si .title { font-family: Verdana, Arial, helvetica, sans-serif; font-size: 16px; font-weight: bold; } .subtitle { font-size: 12px; font-weight: bold; } -.toc_ul, .toc_li { margin-left: 8 px; line-height: 16px; } -.step_ol, .step_li { margin-left: 11 px; line-height: 16px; } +.toc_ul, .toc_li { margin-left: 8px; line-height: 16px; } +.step_ol, .step_li { margin-left: 11px; line-height: 16px; } img { border: #000000 solid 1px; } a:visited { color: #666666; text-decoration: underline; } diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/fr_ca/common_buttons.htm b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/fr_ca/common_buttons.htm index aa9c23740..3effee0fe 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/fr_ca/common_buttons.htm +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/fr_ca/common_buttons.htm @@ -103,32 +103,32 @@ Ci-dessous une courte description de chacuns des outils. + - + - + - + - + - + - + diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/fr_ca/style.css b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/fr_ca/style.css index 722f537a1..ebc05380e 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/fr_ca/style.css +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/fr_ca/style.css @@ -3,8 +3,8 @@ body, td, .content { font-family: Verdana, Arial, helvetica, sans-serif; font-si .title { font-family: Verdana, Arial, helvetica, sans-serif; font-size: 16px; font-weight: bold; } .subtitle { font-size: 12px; font-weight: bold; } -.toc_ul, .toc_li { margin-left: 8 px; line-height: 16px; } -.step_ol, .step_li { margin-left: 11 px; line-height: 16px; } +.toc_ul, .toc_li { margin-left: 8px; line-height: 16px; } +.step_ol, .step_li { margin-left: 11px; line-height: 16px; } img { border: #000000 solid 1px; } a:visited { color: #666666; text-decoration: underline; } diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/hu/style.css b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/hu/style.css index 722f537a1..ebc05380e 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/hu/style.css +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/hu/style.css @@ -3,8 +3,8 @@ body, td, .content { font-family: Verdana, Arial, helvetica, sans-serif; font-si .title { font-family: Verdana, Arial, helvetica, sans-serif; font-size: 16px; font-weight: bold; } .subtitle { font-size: 12px; font-weight: bold; } -.toc_ul, .toc_li { margin-left: 8 px; line-height: 16px; } -.step_ol, .step_li { margin-left: 11 px; line-height: 16px; } +.toc_ul, .toc_li { margin-left: 8px; line-height: 16px; } +.step_ol, .step_li { margin-left: 11px; line-height: 16px; } img { border: #000000 solid 1px; } a:visited { color: #666666; text-decoration: underline; } diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/it/common_buttons.htm b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/it/common_buttons.htm index 7dc7a7906..5cd4bd939 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/it/common_buttons.htm +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/it/common_buttons.htm @@ -119,31 +119,31 @@ programma office
    - + - + - + - + - + - + - + diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/it/style.css b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/it/style.css index 722f537a1..ebc05380e 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/it/style.css +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/it/style.css @@ -3,8 +3,8 @@ body, td, .content { font-family: Verdana, Arial, helvetica, sans-serif; font-si .title { font-family: Verdana, Arial, helvetica, sans-serif; font-size: 16px; font-weight: bold; } .subtitle { font-size: 12px; font-weight: bold; } -.toc_ul, .toc_li { margin-left: 8 px; line-height: 16px; } -.step_ol, .step_li { margin-left: 11 px; line-height: 16px; } +.toc_ul, .toc_li { margin-left: 8px; line-height: 16px; } +.step_ol, .step_li { margin-left: 11px; line-height: 16px; } img { border: #000000 solid 1px; } a:visited { color: #666666; text-decoration: underline; } diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/nb/common_buttons.htm b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/nb/common_buttons.htm index 09857ea5c..3154e86ca 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/nb/common_buttons.htm +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/nb/common_buttons.htm @@ -107,31 +107,31 @@ Nedenfor finner du en kort beskrivelse av hver knapp/funksjon.
    - + - + - + - + - + - + - + diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/nb/style.css b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/nb/style.css index 722f537a1..ebc05380e 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/nb/style.css +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/nb/style.css @@ -3,8 +3,8 @@ body, td, .content { font-family: Verdana, Arial, helvetica, sans-serif; font-si .title { font-family: Verdana, Arial, helvetica, sans-serif; font-size: 16px; font-weight: bold; } .subtitle { font-size: 12px; font-weight: bold; } -.toc_ul, .toc_li { margin-left: 8 px; line-height: 16px; } -.step_ol, .step_li { margin-left: 11 px; line-height: 16px; } +.toc_ul, .toc_li { margin-left: 8px; line-height: 16px; } +.step_ol, .step_li { margin-left: 11px; line-height: 16px; } img { border: #000000 solid 1px; } a:visited { color: #666666; text-decoration: underline; } diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/nl/common_buttons.htm b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/nl/common_buttons.htm index 5b03318b5..5455df166 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/nl/common_buttons.htm +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/nl/common_buttons.htm @@ -123,31 +123,31 @@ knoppen een beknopte beschrijving.
    diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/table/cell.htm b/www/extras/tinymce2/jscripts/tiny_mce/plugins/table/cell.htm index 699b3b902..7171d4faa 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/table/cell.htm +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/table/cell.htm @@ -75,7 +75,7 @@ - + - + - + - + - + - + - + - + - + - + diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/cs/style.css b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/cs/style.css index f988e2a7b..893487c7f 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/cs/style.css +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/cs/style.css @@ -3,8 +3,8 @@ body, td, .content { font-family: Verdana, Arial, helvetica, sans-serif; font-si .title { font-family: Verdana, Arial, helvetica, sans-serif; font-size: 16px; font-weight: bold; } .subtitle { font-size: 12px; font-weight: bold; } -.toc_ul, .toc_li { margin-left: 8 px; line-height: 16px; } -.step_ol, .step_li { margin-left: 11 px; line-height: 16px; } +.toc_ul, .toc_li { margin-left: 8px; line-height: 16px; } +.step_ol, .step_li { margin-left: 11px; line-height: 16px; } img { border: 0; } a:visited { color: #666666; text-decoration: underline; } diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/da/about.htm b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/da/about.htm index fc228f8c4..4c11aa423 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/da/about.htm +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/da/about.htm @@ -1,31 +1,33 @@ - - -About TinyMCE - - + + + +Om TinyMCE + + + - +
    \ - \ - \ - \ - \ - ';}return "";}function TinyMCE_zoom_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mceZoom":tinyMCE.getInstanceById(editor_id).contentDocument.body.style.zoom=value;tinyMCE.getInstanceById(editor_id).contentDocument.body.style.mozZoom=value;return true;}return false;} \ No newline at end of file +var TinyMCE_ZoomPlugin={getInfo:function(){return{longname:'Zoom',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_zoom.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},getControlHTML:function(control_name){if(!tinyMCE.isMSIE||tinyMCE.isMSIE5_0||tinyMCE.isOpera)return"";switch(control_name){case"zoom":return'';}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceZoom":tinyMCE.getInstanceById(editor_id).contentDocument.body.style.zoom=value;tinyMCE.getInstanceById(editor_id).contentDocument.body.style.mozZoom=value;return true;}return false;}};tinyMCE.addPlugin("zoom",TinyMCE_ZoomPlugin); \ No newline at end of file diff --git a/www/extras/tinymce2/jscripts/tiny_mce/plugins/zoom/editor_plugin_src.js b/www/extras/tinymce2/jscripts/tiny_mce/plugins/zoom/editor_plugin_src.js index 698d70459..8d076cde5 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/plugins/zoom/editor_plugin_src.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/plugins/zoom/editor_plugin_src.js @@ -1,47 +1,58 @@ -/* Import plugin specific language pack */ +/** + * $RCSfile: editor_plugin_src.js,v $ + * $Revision: 1.9 $ + * $Date: 2006/03/03 16:10:41 $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved. + */ -function TinyMCE_zoom_getInfo() { - return { - longname : 'Zoom', - author : 'Moxiecode Systems', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_zoom.html', - version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion - }; +var TinyMCE_ZoomPlugin = { + getInfo : function() { + return { + longname : 'Zoom', + author : 'Moxiecode Systems', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_zoom.html', + version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion + }; + }, + + /** + * Returns the HTML contents of the zoom control. + */ + getControlHTML : function(control_name) { + if (!tinyMCE.isMSIE || tinyMCE.isMSIE5_0 || tinyMCE.isOpera) + return ""; + + switch (control_name) { + case "zoom": + return ''; + } + + return ""; + }, + + /** + * Executes the mceZoom command. + */ + execCommand : function(editor_id, element, command, user_interface, value) { + // Handle commands + switch (command) { + case "mceZoom": + tinyMCE.getInstanceById(editor_id).contentDocument.body.style.zoom = value; + tinyMCE.getInstanceById(editor_id).contentDocument.body.style.mozZoom = value; + return true; + } + + // Pass to next handler in chain + return false; + } }; -/** - * Returns the HTML contents of the zoom control. - */ -function TinyMCE_zoom_getControlHTML(control_name) { - if (!tinyMCE.isMSIE || tinyMCE.isMSIE5_0 || tinyMCE.isOpera) - return ""; - - switch (control_name) { - case "zoom": - return ''; - } - - return ""; -} - -/** - * Executes the mceZoom command. - */ -function TinyMCE_zoom_execCommand(editor_id, element, command, user_interface, value) { - // Handle commands - switch (command) { - case "mceZoom": - tinyMCE.getInstanceById(editor_id).contentDocument.body.style.zoom = value; - tinyMCE.getInstanceById(editor_id).contentDocument.body.style.mozZoom = value; - return true; - } - - // Pass to next handler in chain - return false; -} +tinyMCE.addPlugin("zoom", TinyMCE_ZoomPlugin); diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/about.htm b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/about.htm index d57546bbb..d15ff3a76 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/about.htm +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/about.htm @@ -4,7 +4,6 @@ - @@ -22,7 +21,7 @@

    Version: {$tinymce_version} ({$tinymce_releasedate})

    TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under LGPL by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.

    -

    Copyright © 2005, Moxiecode Systems AB, All rights reserved.

    +

    Copyright © 2003-2006, Moxiecode Systems AB, All rights reserved.

    For more information about this software visit the TinyMCE website.

    diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/color_picker.htm b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/color_picker.htm index 05db9b6bf..3f5a19838 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/color_picker.htm +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/color_picker.htm @@ -5,7 +5,7 @@ - +
    diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/css/editor_content.css b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/css/editor_content.css index 1b41edb8c..11f75dfad 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/css/editor_content.css +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/css/editor_content.css @@ -1,28 +1,13 @@ /* This file contains the CSS data for the editable area(iframe) of TinyMCE */ /* You can extend this CSS by adding your own CSS file with the the content_css option */ +body, td, pre { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; +} + body { background-color: #FFFFFF; - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 10px; - scrollbar-3dlight-color: #F0F0EE; - scrollbar-arrow-color: #676662; - scrollbar-base-color: #F0F0EE; - scrollbar-darkshadow-color: #DDDDDD; - scrollbar-face-color: #E0E0DD; - scrollbar-highlight-color: #F0F0EE; - scrollbar-shadow-color: #F0F0EE; - scrollbar-track-color: #F5F5F5; -} - -td { - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 10px; -} - -pre { - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 10px; } .mceVisualAid { @@ -53,3 +38,16 @@ a { color: green; } */ + +/* MSIE specific */ + +* html body { + scrollbar-3dlight-color: #F0F0EE; + scrollbar-arrow-color: #676662; + scrollbar-base-color: #F0F0EE; + scrollbar-darkshadow-color: #DDDDDD; + scrollbar-face-color: #E0E0DD; + scrollbar-highlight-color: #F0F0EE; + scrollbar-shadow-color: #F0F0EE; + scrollbar-track-color: #F5F5F5; +} diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/css/editor_popup.css b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/css/editor_popup.css index 14f83221a..2bae9158a 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/css/editor_popup.css +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/css/editor_popup.css @@ -35,14 +35,14 @@ input, select, textarea { } .input_noborder { - border: 0px solid #808080; + border: 0; } -#insert { +#insert, .updateButton { font-weight: bold; width: 90px; height: 21px; - border: 0px; + border: 0; background-image: url('../images/insert_button_bg.gif'); cursor: pointer; } @@ -51,7 +51,7 @@ input, select, textarea { font-weight: bold; width: 90px; height: 21px; - border: 0px; + border: 0; background-image: url('../images/cancel_button_bg.gif'); cursor: pointer; } @@ -84,7 +84,7 @@ td.charmap, td.charmapOver { td.charmapOver { background-color: #CCCCCC; - cursor: arrow; + cursor: default; } a.charmap { @@ -120,17 +120,17 @@ input.checkbox { border-bottom: 1px solid; border-right: 1px solid; border-color: #F0F0EE; - cursor: arrow; + cursor: default; } .mceButtonOver { border: 1px solid #0A246A; - cursor: arrow; + cursor: default; background-color: #B6BDD2; } .mceButtonDown { - cursor: arrow; + cursor: default; border: 1px solid #0A246A; background-color: #8592B5; } @@ -144,7 +144,7 @@ input.checkbox { border-bottom: 1px solid; border-right: 1px solid; border-color: #F0F0EE; - cursor: arrow; + cursor: default; } .mceActionPanel { @@ -162,7 +162,7 @@ input.checkbox { .tabs ul { margin: 0; - padding: 0px 0px 0; + padding: 0 0 0; list-style: none; } @@ -170,7 +170,7 @@ input.checkbox { float: left; background: url("../images/xp/tab_bg.gif") no-repeat left top; margin: 0; - margin-left: 0px; + margin-left: 0; margin-right: 2px; padding: 0 0 0 10px; line-height: 18px; @@ -185,7 +185,7 @@ input.checkbox { float: left; display: block; background: url("../images/xp/tab_end.gif") no-repeat right top; - padding: 0px 10px 0px 0px; + padding: 0px 10px 0 0; } .tabs .current span { @@ -235,8 +235,8 @@ fieldset { border: 1px solid #919B9C; font-family: Verdana, Arial; font-size: 10px; - padding: 0px; - margin: 0px; + padding: 0; + margin: 0; padding: 4px; } @@ -295,8 +295,8 @@ a:hover { h1, h2, h3, h4 { color: #2B6FB6; - margin: 0px; - padding: 0px; + margin: 0; + padding: 0; padding-top: 5px; } @@ -304,6 +304,14 @@ h3 { font-size: 14px; } +#link .panel_wrapper, #link div.current { + height: 125px; +} + +#image .panel_wrapper, #image div.current { + height: 190px; +} + /* Disables the advanced tab in the table plugin. */ /* #table #advanced_tab { diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/css/editor_ui.css b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/css/editor_ui.css index 77cc4b1c3..04fccc72c 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/css/editor_ui.css +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/css/editor_ui.css @@ -1,65 +1,14 @@ /* This file contains the CSS data for the editor UI of TinyMCE instances */ .mceToolbarTop a, .mceToolbarTop a:visited, .mceToolbarTop a:hover, .mceToolbarBottom a, .mceToolbarBottom a:visited, .mceToolbarBottom a:hover { - border: 0px; margin: 0px; padding: 0px; background: transparent; -} - -.mceButtonNormal, .mceButtonOver, .mceButtonDown, .mceSeparator, .mceSeparatorLine, .mceButtonDisabled, .mceButtonSelected { - border: 0px; margin: 0px; padding: 0px; background: transparent; - margin-top: 1px; - margin-left: 1px; - padding: 0px; -} - -.mceButtonNormal { - border: 1px solid #F0F0EE !important; - cursor: arrow; -} - -.mceButtonOver { - border: 1px solid #0A246A !important; - cursor: arrow; - background-color: #B6BDD2; -} - -.mceButtonDown { - cursor: arrow; - border: 1px solid #0A246A !important; - background-color: #8592B5; -} - -.mceButtonSelected { - border: 1px solid #C0C0BB !important; - cursor: arrow; -} - -.mceButtonDisabled { - filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30); - -moz-opacity:0.3; - opacity: 0.3; - border: 1px solid #F0F0EE !important; - cursor: arrow; -} - -.mceSeparator { - border-top: 1px solid buttonhighlight; - border-left: 1px solid buttonhighlight; - border-bottom: 1px solid buttonshadow; - border-right: 1px solid buttonshadow; - margin-right: 2px; - margin-left: 2px; + border: 0; margin: 0; padding: 0; background: transparent; } .mceSeparatorLine { - margin:2px; + border: 0; + padding: 0; margin-left: 4px; - background-color: #F0F0EE; - border-top: 1px solid buttonshadow; - border-left: 1px solid buttonshadow; - border-bottom: 1px solid buttonhighlight; - border-right: 1px solid buttonhighlight; - width: 0px; - height: 15px; + margin-right: 2px; } .mceSelectList { @@ -67,10 +16,10 @@ font-size: 7pt !important; font-weight: normal; margin-top: 3px; - padding: 0px; + padding: 0; display: inline; vertical-align: top; - background-color: #F0F0EE + background-color: #F0F0EE; } .mceLabel, .mceLabelDisabled { @@ -90,15 +39,15 @@ .mceEditor { background: #F0F0EE; border: 1px solid #cccccc; - padding: 0px; - margin: 0px; + padding: 0; + margin: 0; } .mceEditorArea { font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; background: #FFFFFF; - padding: 0px; - margin: 0px; + padding: 0; + margin: 0; } .mceToolbarTop, .mceToolbarBottom { @@ -109,6 +58,7 @@ .mceToolbarTop { border-bottom: 1px solid #cccccc; + padding-bottom: 1px; } .mceToolbarBottom { @@ -168,6 +118,231 @@ height: 10px; display: none; border: 1px dotted gray; - margin: 0px; - padding: 0px; + margin: 0; + padding: 0; +} + +/* Button CSS rules */ + +a.mceButtonDisabled img, a.mceButtonNormal img, a.mceButtonSelected img { + width: 20px; + height: 20px; + cursor: default; + margin-top: 1px; + margin-left: 1px; +} + +a.mceButtonDisabled img { + border: 0 !important; +} + +a.mceButtonNormal img, a.mceButtonSelected img { + border: 1px solid #F0F0EE !important; +} + +a.mceButtonSelected img { + border: 1px solid #6779AA !important; + background-color: #D4D5D8; +} + +a.mceButtonNormal img:hover, a.mceButtonSelected img:hover { + border: 1px solid #0A246A !important; + cursor: default; + background-color: #B6BDD2; +} + +a.mceButtonDisabled img { + -moz-opacity:0.3; + opacity: 0.3; + border: 1px solid #F0F0EE !important; + cursor: default; +} + +a.mceTiledButton img { + background-image: url('../images/buttons.gif'); + background-repeat: no-repeat; +} + +/* MSIE specific rules */ + +* html a.mceButtonNormal img, * html a.mceButtonSelected img, * html a.mceButtonDisabled img { + border: 0 !important; + margin-top: 2px; + margin-bottom: 1px; +} + +* html a.mceButtonDisabled img { + filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30); + border: 0 !important; +} + +* html a.mceButtonDisabled { + border: 1px solid #F0F0EE !important; +} + +* html a.mceButtonNormal, * html a.mceButtonSelected { + border: 1px solid #F0F0EE !important; + cursor: default; +} + +* html a.mceButtonSelected { + border: 1px solid #6779AA !important; + background-color: #D4D5D8; +} + +* html a.mceButtonNormal:hover, * html a.mceButtonSelected:hover { + border: 1px solid #0A246A !important; + cursor: default; + background-color: #B6BDD2; +} + +* html .mceSelectList { + margin-top: 2px; +} + +/* Menu button CSS rules */ + +span.mceMenuButton img, span.mceMenuButtonSelected img { + border: 1px solid #F0F0EE; + margin-left: 1px; +} + +span.mceMenuButtonSelected img { + border: 1px solid #6779AA; + background-color: #B6BDD2; +} + +span.mceMenuButtonSelected img.mceMenuButton { + border: 1px solid #F0F0EE; + background-color: transparent; +} + +span.mceMenuButton img.mceMenuButton, span.mceMenuButtonSelected img.mceMenuButton { + border-left: 0; + margin-left: 0; +} + +span.mceMenuButton:hover img, span.mceMenuButtonSelected:hover img { + border: 1px solid #0A246A; + background-color: #B6BDD2; +} + +span.mceMenuButton:hover img.mceMenuButton, span.mceMenuButtonSelected:hover img.mceMenuButton { + border-left: 0; +} + +span.mceMenuButtonFocus img { + border: 1px solid gray; + border-right: 0; + margin-left: 1px; + background-color: #F5F4F2; +} + +span.mceMenuButtonFocus img.mceMenuButton { + border: 1px solid gray; + border-left: 1px solid #F5F4F2; + margin-left: 0; +} + +/* Menu button MSIE specific rules */ + +* html span.mceMenuButton, * html span.mceMenuButtonFocus { + position: relative; + left: 0; + top: 0; +} + +* html span.mceMenuButton img, * html span.mceMenuButtonSelected img, * html span.mceMenuButtonFocus img { + position: relative; + top: 1px; +} + +* html span.mceMenuHover img { + border: 1px solid #0A246A; + background-color: #B6BDD2; +} + +* html span.mceMenuButtonSelected.mceMenuHover img.mceMenuButton { + border: 1px solid #0A246A; + background-color: #B6BDD2; + border-left: 0; +} + +/* Menu */ + +.mceMenu { + position: absolute; + left: 0; + top: 0; + display: none; + z-index: 100; + background-color: white; + border: 1px solid gray; + font-weight: normal; +} + +.mceMenu a, .mceMenuTitle, .mceMenuDisabled { + display: block; + width: 100%; + text-decoration: none; + background-color: white; + font-family: Tahoma, Verdana, Arial, Helvetica; + font-size: 11px; + line-height: 20px; + color: black; +} + +.mceMenu a:hover { + background-color: #B6BDD2; + color: black; +} + +.mceMenu span { + padding-left: 10px; + padding-right: 10px; + display: block; + line-height: 20px; +} + +.mceMenuSeparator { + border-bottom: 1px solid gray; + background-color: gray; + height: 1px; +} + +.mceMenuTitle span { + padding-left: 5px; +} + +.mceMenuTitle { + background-color: #DDDDDD; + font-weight: bold; +} + +.mceMenuDisabled { + color: gray; +} + +span.mceMenuSelectedItem { + background-image: url('../images/menu_check.gif'); + background-repeat: no-repeat; + background-position: 5px 8px; + padding-left: 20px; +} + +span.mceMenuCheckItem { + padding-left: 20px; +} + +span.mceMenuLine { + display: block; + position: absolute; + left: 0; + top: -1px; + background-color: #F5F4F2; + width: 30px; + height: 1px; + overflow: hidden; + padding-left: 0; + padding-right: 0; } diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/cs/common_buttons.htm b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/cs/common_buttons.htm index c096703b4..56e5bf377 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/cs/common_buttons.htm +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/cs/common_buttons.htm @@ -114,31 +114,31 @@ N
    Otevøe editor s HTML zdrojem.
    Do aktuální pozice vlo¾í novou 2x2 tabulku.
    Pøidá øádek pøed aktuální.
    Pøidá øádek pod aktuální.
    Odstraní øádek.
    Pøidá sloupec pøed aktuální.
    Pøidá sloupec za aktuální.
    Odstraní aktuální sloupec.
    - + -
    -
    -TinyMCE er et kompakt WYSIWYG editeringsmodul, der kan anvendes i browsere som MS Internet -Explorer eller Mozilla. Modulet gør det muligt for dig at redigere HTML-indhold -på en mere brugervenlig måde. Den er forsynet med de samme funktioner, som man -finder i de fleste tekstbehandlingssystemer og skulle ikke være svær at anvende.
    -
    -
    +
    +
    +TinyMCE er et kompakt WYSIWYG editeringsmodul, der kan anvendes i browsere som MS Internet +Explorer eller Mozilla. Modulet gør det muligt for dig at redigere HTML-indhold +på en mere brugervenlig måde. Den er forsynet med de samme funktioner, som man +finder i de fleste tekstbehandlingssystemer og skulle ikke være svær at anvende.
    +
    +
    - + -
    - - +
    + + diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/da/common_buttons.htm b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/da/common_buttons.htm index 297a22c95..fbaf0321c 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/da/common_buttons.htm +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/da/common_buttons.htm @@ -1,162 +1,164 @@ - - -Common buttons - - + + + +De mest almindelige knapper + + + - + - + - + -
    -
    -Herunder finder du en beskrivelse af de enkelte knapper.
    -
    +
    +
    +Herunder finder du en beskrivelse af de enkelte knapper.
    +
    - + - + - + - + - + - + - + - + - - + + - - + + - + - + - + - + - - + - + - + - + - - + - + - + - + - + - + - + - + - + - + - - + + - + - + - +
    Bold text iconFed tekst ikon Fed tekst (Ctrl+B).
    Italic text iconKursiv ikon Kursiv (Ctrl+I).
    Underline text icon.Understreg ikon. Understregning (Ctrl+U).
    Strikethrough text icon.Gennemstreg ikon. Gennemstregning.
    Align left icon.Juster til venstre ikon. Juster til venstre.
    Align center icon.Centrer ikon. Centrer.
    Align right icon.Juster til højre ikon. Juster til højre.
    Align full icon.Lige højre margen ikon. Lige højre margen.
    Unordered list/bullet list icon.Uordnet list med bullets.Punktopstillet liste ikon.Punktopstillet liste.
    Ordered list/numbered list icon.Ordnet liste med talNummeret liste ikon.Nummeret liste
    Outdent/decrease indentation icon.Flyt tekst til venstre ikon. Flyt tekst til venstre.
    Indent/increase indentation icon.Flyt tekst til højre ikon. Flyt tekst til højre.
    Undo the last operation.Fortryd sidste valg ikon. Fortryd sidste valg (Ctrl+Z).
    Redo the last operation icon.Gentag sidste valg ikon. Gentag sidste valg (Ctrl+Y).
    Insert a new link icon.Indsæt nyt link - læs mere om denne funktion i afsnittet Indsættelse + Indsæt nyt link ikon.Indsæt nyt link - læs mere om denne funktion i afsnittet Indsættelse af link.
    Unlinks the current selection icon.Fjern link ikon. Fjern aktuelt valgte link(s).
    Insert a new anchor icon.Nyt bogmærke ikon. Indsæt nyt bogmærke - læs mere om denne funktion i afsnittet om Bogmærker.
    Insert a new image icon.Nyt billede ikon. Indsæt nyt billede - læs mere om denne funktion i afsnittet om Billedbehandling.
    Cleanup code icon.Ryd op i koden / fjern uønsket formatering. Denne funktion er brugbar, + Ryd op i koden ikon.Ryd op i koden / fjern uønsket formatering. Denne funktion er brugbar, når man indsætter tekst f. eks. fra et office-produkt.
    Show help icon.Vis dette hjælpevindue ikon. Viser dette hjælpevindue.
    Source code editor icon.Rediger HTML-kode ikon. Åbner editoren til redigering af HTML-kode.
    Insert table icon.Ny tabel ikon. Indsætter en ny tabel, hvor cursoren aktuelt er anbragt.
    Adds a row above icon.Tilføj række over ikon. Tilføjer en række over den aktuelle.
    Adds a row under icon.Tilføj række under ikon. Tilføjer en række under den aktuelle.
    Remove row icon.Fjern en række ikon. Fjerner en række.
    Add column before icon.Tilføj kolonne før ikon. Tilføjer en kolonne før den aktuelle.
    Add column after icon.Tilføj kolonne efter ikon. Tilføjer en kolonne efter den aktuelle.
    Remove column icon.Fjern kolonne ikon. Fjerner den aktuelle kolonne.
    Insert horizontal ruler icon.Indsætter en vandret streg Indsæt vandret streg ikon.Indsætter en vandret streg.
    Remove formatting icon.Fjern formatering ikon. Fjerner al formatering fra den aktuelt valgte tekst.
    Subscript icon.Sænket skrift ikon. Sætter det valgte som sænket skrift.
    Superscript icon.Hævet skrift ikon. Sætter det valgte som hævet skrift.
    -
    -
    +
    +
    - + - - + + diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/da/create_accessible_content.htm b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/da/create_accessible_content.htm index b855eb713..719704584 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/da/create_accessible_content.htm +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/da/create_accessible_content.htm @@ -1,76 +1,78 @@ - - -Insert table button - - + + + +Skabe tilgængeligt indhold + + + - + - + -
    -

    TinyMCE kan producere HTML, der vil være tilgængeligt for alle brugere, også -dem med handicaps, som anvender forskellige hjælpeteknikker. Den kan også skabe -indhold, der er tilgængeligt for brugere, som anvender tekstbaserede browsere +


    +

    TinyMCE kan producere HTML, der vil være tilgængeligt for alle brugere, også +dem med handicaps, som anvender forskellige hjælpeteknikker. Den kan også skabe +indhold, der er tilgængeligt for brugere, som anvender tekstbaserede browsere eller dem, der browser uden at vise billederne frem på siderne. 

    Ting du selv kan gøre, for at gøre dine tekste tilgængelige:

      -
    1. Lav en billedbeskrivelse: Blinde brugere eller andre, som -ikke er i stand til at se billeder, er helt afhængige af billedbeskrivelsen -eller alt-teksten, som erstatter selve billedet. Hvis et billede ingen betydning -har - dvs. hvis det blot fungerer som dekoration eller som et blankt område, så -lad billedbeskrivelsen stå tom.  Så vil TinyMCE indsætte et tomt alt-felt, +
    2. Lav en billedbeskrivelse: Blinde brugere eller andre, som +ikke er i stand til at se billeder, er helt afhængige af billedbeskrivelsen +eller alt-teksten, som erstatter selve billedet. Hvis et billede ingen betydning +har - dvs. hvis det blot fungerer som dekoration eller som et blankt område, så +lad billedbeskrivelsen stå tom.  Så vil TinyMCE indsætte et tomt alt-felt, der vil tvinge hjælpeprogrammerne til at ignorere billedet.

    3. -
    4. Tilføj udstrækning til en tabels overskriftsceller: I den -dialog, som gør det muligt at styre en tabels attributter, bør man angive en -overskrifts udstrækning. Det vil fungere sådan, at overskriften automatisk -knyttes til alle værdier i tabellen, hvilket gør det nemmere for blinde brugere +
    5. Tilføj udstrækning til en tabels overskriftsceller: I den +dialog, som gør det muligt at styre en tabels attributter, bør man angive en +overskrifts udstrækning. Det vil fungere sådan, at overskriften automatisk +knyttes til alle værdier i tabellen, hvilket gør det nemmere for blinde brugere at forstå, hvad indholdet i den enkelte celle betyder. 

    6. -
    7. Strukturer indholdet med fornuftige overskrifter: Vælg -standardformaterede overskrifter (som f. eks. H1-6) for at lave overskrifter til -dit indhold - går det i stedet for at lave dine egne standarder. Blinde brugere -anvender en læser, der kan genkende disse standardformater og på den måde lave -en indholdsfortegnelse over siden. På den måde kan en blind bruger lettere -bevæge sig rundt på siden og springe fra afsnit til afsnit.
      +
    8. Strukturer indholdet med fornuftige overskrifter: Vælg +standardformaterede overskrifter (som f. eks. H1-6) for at lave overskrifter til +dit indhold - går det i stedet for at lave dine egne standarder. Blinde brugere +anvender en læser, der kan genkende disse standardformater og på den måde lave +en indholdsfortegnelse over siden. På den måde kan en blind bruger lettere +bevæge sig rundt på siden og springe fra afsnit til afsnit.
       
    9. -
    10. Husk at lave alternativt indhold: Lav en alternativ side -der repræsenterer ikke-HTML-formateret indhold - så som Flash, Java applets -eller indlejrede videosekvenser. Denne kan laves som et stykke statisk grafik -kombineret med en beskrivelse af billedet og en beskrivelse af det indhold, som  -ville være dukket op, hvis man havde set siden på normal vis. En alternativ -HTML-side kan også laves, hvorefter man så kan lægge et link på til den ved -siden af Falsh-referencen eller referencen til Java appletten. På denne måde -sikrer du, at indholdet også er tilgængeligt for folk, som bruger -hjælpeteknologier, som ikke er i stand til at vise eller afvikle dit indhold +
    11. Husk at lave alternativt indhold: Lav en alternativ side +der repræsenterer ikke-HTML-formateret indhold - så som Flash, Java applets +eller indlejrede videosekvenser. Denne kan laves som et stykke statisk grafik +kombineret med en beskrivelse af billedet og en beskrivelse af det indhold, som  +ville være dukket op, hvis man havde set siden på normal vis. En alternativ +HTML-side kan også laves, hvorefter man så kan lægge et link på til den ved +siden af Falsh-referencen eller referencen til Java appletten. På denne måde +sikrer du, at indholdet også er tilgængeligt for folk, som bruger +hjælpeteknologier, som ikke er i stand til at vise eller afvikle dit indhold eller som mangler den relevante player eller plugin.

    12. -
    13. Kontroller tilgængeligheden: Når AChecker plugin'en er -installeret sammen med TinyMCE, kan du blot trykke på den relevante knap for at +
    14. Kontroller tilgængeligheden: Når AChecker plugin'en er +installeret sammen med TinyMCE, kan du blot trykke på den relevante knap for at blive adviseret om mulige tilgængelighedsproblemer.

    -

    Besøg ACheckers -hjemmeside for at se yderligere informationer om, hvordan man skaber +

    Besøg ACheckers +hjemmeside for at se yderligere informationer om, hvordan man skaber indhold, som alle brugere kan tilgå.

    -
    +
    - + -
    - - +
    + + diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/da/index.htm b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/da/index.htm index 1671fe41b..00b5e5fd4 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/da/index.htm +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/da/index.htm @@ -1,18 +1,20 @@ - - -Help Index - - - + + + +Indholdsfortegnelse + + + + - + -
    -
    -Klik på et link herunder for at springe til en hjælpetekst. +
    +
    +Klik på et link herunder for at springe til en hjælpetekst. -
    - - +
    + + diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/da/insert_anchor_button.htm b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/da/insert_anchor_button.htm index 3bc9d2951..611cb96a8 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/da/insert_anchor_button.htm +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/da/insert_anchor_button.htm @@ -1,33 +1,35 @@ - - -Insert anchor button - - + + + +Indsæt bogmærke + + + - + - + -
    -
    -Denne knap åbner et nyt vindue, som rummer bogmærkefunktionen.
    -
    -Anchor dialog/window
    -
    -Der er kun et enkelt felt i dette vindue - i det skriver du navnet på dit -bogmærke. Husk at to bogmærker ikke kan hedde det samme.
    -
    -
    +
    +
    +Denne knap åbner et nyt vindue, som rummer bogmærkefunktionen.
    +
    +Anchor dialog/window
    +
    +Der er kun et enkelt felt i dette vindue - i det skriver du navnet på dit +bogmærke. Husk at to bogmærker ikke kan hedde det samme.
    +
    +
    - + -
    - - +
    + + diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/da/insert_image_button.htm b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/da/insert_image_button.htm index ed7c81f70..4c66712fe 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/da/insert_image_button.htm +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/da/insert_image_button.htm @@ -1,28 +1,30 @@ - - -Insert image button - - + + + +Indsæt billeder + + + - + - + -
    -
    -Knappen "Indsæt billede" åbner et vindue, der ser ud som nedenfor.
    -
    -Insert image dialog/window
    -
    -Her indskriver man ganske enkelt adressen på det billede, man vil linke til samt -en billedbeskrivelse. Denne beskrivelse bliver derefter vist som den alternative -tekstbeskrivelse af billedet.
    -
    -Feltbeskrivelser:
    +
    +
    +Knappen "Indsæt billede" åbner et vindue, der ser ud som nedenfor.
    +
    +Insert image dialog/window
    +
    +Her indskriver man ganske enkelt adressen på det billede, man vil linke til samt +en billedbeskrivelse. Denne beskrivelse bliver derefter vist som den alternative +tekstbeskrivelse af billedet.
    +
    +Feltbeskrivelser:
    @@ -38,7 +40,7 @@ tekstbeskrivelse af billedet.
    - @@ -54,14 +56,14 @@ tekstbeskrivelse af billedet.
    Image URL
    AlignmentBilledets justering - brugbar når der skal sættes tekst på plads omkring + Billedets justering - brugbar når der skal sættes tekst på plads omkring et billede.
    Horisontal margen - brugbart når billedet skal placeres i en tekst.
    -
    -
    +
    +
    - + -
    - - +
    + + diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/da/insert_link_button.htm b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/da/insert_link_button.htm index 3c3444173..e32a00b8f 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/da/insert_link_button.htm +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/da/insert_link_button.htm @@ -1,34 +1,36 @@ - - -Insert link button - - + + + +Indsæt link + + + - + - + -
    -
    -Denne knap åbner et nyt vindue, som rummer linkfunktionen.
    -
    -Insert link dialog/window
    -
    -Der er to felter i dette vindue. I det første skal man indskrive adressen på -linket - i det andet det "target", som linket skal pege på - dvs. hvordan linket -åbnes, når brugeren trykker på det.
    -
    -
    +
    +
    +Denne knap åbner et nyt vindue, som rummer linkfunktionen.
    +
    +Insert link dialog/window
    +
    +Der er to felter i dette vindue. I det første skal man indskrive adressen på +linket - i det andet det "target", som linket skal pege på - dvs. hvordan linket +åbnes, når brugeren trykker på det.
    +
    +
    - + -
    - - +
    + + diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/da/insert_table_button.htm b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/da/insert_table_button.htm index 9fc990141..bbe9a518f 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/da/insert_table_button.htm +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/da/insert_table_button.htm @@ -1,25 +1,27 @@ - - -Insert table button - - + + + +Indsæt tabel + + + - + - + -
    -
    -Trykker man på indsæt tabel knappen åbnes det vindue, som du kan se herunder. I -dette vindue kan du oprette nye tabeller.
    -
    -
    -
    -Feltbeskrivelser:
    +
    +
    +Trykker man på indsæt tabel knappen åbnes det vindue, som du kan se herunder. I +dette vindue kan du oprette nye tabeller.
    +
    +
    +
    +Feltbeskrivelser:
    @@ -58,15 +60,15 @@ dette vindue kan du oprette nye tabeller.
    Kolonner Style eller stylesheet klasse for tabellen.
    -
    -
    -
    +
    +
    +
    - + -
    - - +
    + + diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/da/style.css b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/da/style.css index 722f537a1..161fcdb66 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/da/style.css +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/da/style.css @@ -3,8 +3,8 @@ body, td, .content { font-family: Verdana, Arial, helvetica, sans-serif; font-si .title { font-family: Verdana, Arial, helvetica, sans-serif; font-size: 16px; font-weight: bold; } .subtitle { font-size: 12px; font-weight: bold; } -.toc_ul, .toc_li { margin-left: 8 px; line-height: 16px; } -.step_ol, .step_li { margin-left: 11 px; line-height: 16px; } +.toc_ul, .toc_li { margin-left: 8px; line-height: 16px; } +.step_ol, .step_li { margin-left: 11px; line-height: 16px; } img { border: #000000 solid 1px; } a:visited { color: #666666; text-decoration: underline; } @@ -24,5 +24,5 @@ a { color: #666666; text-decoration: underline; } .codecontent a:hover { color: #666666; text-decoration: none; font-weight: bold } .codecontent a { color: #666666; text-decoration: none; font-weight: bold } -hr { height: 1px; } +hr { height: 1px; border:none;} diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/de/style.css b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/de/style.css index 722f537a1..ebc05380e 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/de/style.css +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/de/style.css @@ -3,8 +3,8 @@ body, td, .content { font-family: Verdana, Arial, helvetica, sans-serif; font-si .title { font-family: Verdana, Arial, helvetica, sans-serif; font-size: 16px; font-weight: bold; } .subtitle { font-size: 12px; font-weight: bold; } -.toc_ul, .toc_li { margin-left: 8 px; line-height: 16px; } -.step_ol, .step_li { margin-left: 11 px; line-height: 16px; } +.toc_ul, .toc_li { margin-left: 8px; line-height: 16px; } +.step_ol, .step_li { margin-left: 11px; line-height: 16px; } img { border: #000000 solid 1px; } a:visited { color: #666666; text-decoration: underline; } diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/en/common_buttons.htm b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/en/common_buttons.htm index a3bab47d1..518b28551 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/en/common_buttons.htm +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/en/common_buttons.htm @@ -106,31 +106,31 @@ Below is a short description about each button.
    Opens HTML source code editor.
    Insert table icon.Insert table icon. Inserts a new table at the current location.
    Adds a row above icon.Adds a row above icon. Adds a row above the current one.
    Adds a row under icon.Adds a row under icon. Adds a row under the current one.
    Remove row icon.Remove row icon. Removes the row.
    Add column before icon.Add column before icon. Adds a column before the current one.
    Add column after icon.Add column after icon. Adds a column after the current one.
    Remove column icon.Remove column icon. Removes the current column.
    Inserta una nueva tabla de 2x2.
    Añade una fila encima.
    Añade una fila debajo.
    Elimina una fila.
    Añade una columna antes de la actual .
    Añade una columna después de la actual.
    Elimina la columna actual.
    Lisää tualu. Lue lisää tästä toiminnosta lisää taulu -osiosta.
    Lisää rivi valitun rivin edelle.
    Lisää rivi valitun rivin jälkeen.
    Poista valittu rivi.
    Lisää saraka valitun sarakkeen jälkeen.
    Lisää sarake valitun sarakkeen edelle.
    Poistaa valitun sarakkeen.
    Insère un nouveau tableau à la position actuelle. Allez à la page Outil d'ajout de tableau pour plus de détails.
    Ajoute une ligne au tableau avant la ligne courante.
    Ajoute une ligne au tableau après la ligne courante.
    Supprime la ligne courante.
    Ajoute une colonne au tableau avant la colonne courante.
    Ajoute une colonne au tableau après la colonne courante.
    Supprime la colonne courante.
    Insère un nouveau tableau à la position actuelle. Allez à la page Outil d'ajout de tableau pour plus de détails.
    Ajoute une ligne au tableau avant la ligne courante.
    Ajoute une ligne au tableau après la ligne courante.
    Supprime la ligne courante.
    Ajoute une colonne au tableau avant la colonne courante.
    Ajoute une colonne au tableau après la colonne courante.
    Supprime la colonne courante.
    Apre l'editor del sorgente HTML.
    Inserisce una nuova tabella 2x2 alla posizione corrente.
    Aggiunge una riga sopra quella corrente.
    Aggiunge una roga sotto quella corrente.
    Rimuove la riga corrente.
    Aggiunge una colonna prima di quella corrente.
    Aggiunge una colonna dopo quella corrente.
    Rimuove la colonna corrente.
    Åpner en HTML-kodeeditor.
    Lager en ny tabell (2x2).
    Lager en rad ovenfor den nåværende raden.
    Lager en rad under den nåværende raden.
    Tar bort en rad.
    Lager en kolonne før den nåværende kolonnen.
    Lager en kolonne etter den nåværende kolonnen.
    Tar bort en kolonne.
    - + - + - + - + - + - + - + diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/nl/style.css b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/nl/style.css index f36b6297f..0ec1a75e7 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/nl/style.css +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/nl/style.css @@ -3,8 +3,8 @@ body, td, .content { font-family: Verdana, Arial, helvetica, sans-serif; font-si .title { font-family: Verdana, Arial, helvetica, sans-serif; font-size: 16px; font-weight: bold; } .subtitle { font-size: 12px; font-weight: bold; } -.toc_ul, .toc_li { margin-left: 8 px; line-height: 16px; } -.step_ol, .step_li { margin-left: 11 px; line-height: 16px; } +.toc_ul, .toc_li { margin-left: 8px; line-height: 16px; } +.step_ol, .step_li { margin-left: 11px; line-height: 16px; } img { border: #000000 solid 1px; } a:visited { color: #666666; text-decoration: underline; } diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/nn/common_buttons.htm b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/nn/common_buttons.htm index 2907a280a..92d57950b 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/nn/common_buttons.htm +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/nn/common_buttons.htm @@ -107,31 +107,31 @@ Nedanfor finner du ein kort beskrivelse av kvar knapp/funksjon.
    - + - + - + - + - + - + - + diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/nn/style.css b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/nn/style.css index 722f537a1..ebc05380e 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/nn/style.css +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/nn/style.css @@ -3,8 +3,8 @@ body, td, .content { font-family: Verdana, Arial, helvetica, sans-serif; font-si .title { font-family: Verdana, Arial, helvetica, sans-serif; font-size: 16px; font-weight: bold; } .subtitle { font-size: 12px; font-weight: bold; } -.toc_ul, .toc_li { margin-left: 8 px; line-height: 16px; } -.step_ol, .step_li { margin-left: 11 px; line-height: 16px; } +.toc_ul, .toc_li { margin-left: 8px; line-height: 16px; } +.step_ol, .step_li { margin-left: 11px; line-height: 16px; } img { border: #000000 solid 1px; } a:visited { color: #666666; text-decoration: underline; } diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/pl/common_buttons.htm b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/pl/common_buttons.htm index 00a0b04d1..5a31a37d2 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/pl/common_buttons.htm +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/pl/common_buttons.htm @@ -108,31 +108,31 @@ Poni - + - + - + - + - + - + - + diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/pl/style.css b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/pl/style.css index 722f537a1..ebc05380e 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/pl/style.css +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/pl/style.css @@ -3,8 +3,8 @@ body, td, .content { font-family: Verdana, Arial, helvetica, sans-serif; font-si .title { font-family: Verdana, Arial, helvetica, sans-serif; font-size: 16px; font-weight: bold; } .subtitle { font-size: 12px; font-weight: bold; } -.toc_ul, .toc_li { margin-left: 8 px; line-height: 16px; } -.step_ol, .step_li { margin-left: 11 px; line-height: 16px; } +.toc_ul, .toc_li { margin-left: 8px; line-height: 16px; } +.step_ol, .step_li { margin-left: 11px; line-height: 16px; } img { border: #000000 solid 1px; } a:visited { color: #666666; text-decoration: underline; } diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/sk/common_buttons.htm b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/sk/common_buttons.htm index 7f9b7a8f0..d81b65f31 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/sk/common_buttons.htm +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/sk/common_buttons.htm @@ -114,31 +114,31 @@ Nižšie je popísané každé tlaÄitko. - + - + - + - + - + - + - + diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/sk/style.css b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/sk/style.css index f988e2a7b..893487c7f 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/sk/style.css +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/sk/style.css @@ -3,8 +3,8 @@ body, td, .content { font-family: Verdana, Arial, helvetica, sans-serif; font-si .title { font-family: Verdana, Arial, helvetica, sans-serif; font-size: 16px; font-weight: bold; } .subtitle { font-size: 12px; font-weight: bold; } -.toc_ul, .toc_li { margin-left: 8 px; line-height: 16px; } -.step_ol, .step_li { margin-left: 11 px; line-height: 16px; } +.toc_ul, .toc_li { margin-left: 8px; line-height: 16px; } +.step_ol, .step_li { margin-left: 11px; line-height: 16px; } img { border: 0; } a:visited { color: #666666; text-decoration: underline; } diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/sv/common_buttons.htm b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/sv/common_buttons.htm index d256fa5b7..8bf2bbef9 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/sv/common_buttons.htm +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/sv/common_buttons.htm @@ -107,31 +107,31 @@ Nedan finner du en kort beskrivning av varje knapp/funktion.
    - + - + - + - + - + - + - + diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/sv/style.css b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/sv/style.css index 722f537a1..ebc05380e 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/sv/style.css +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/sv/style.css @@ -3,8 +3,8 @@ body, td, .content { font-family: Verdana, Arial, helvetica, sans-serif; font-si .title { font-family: Verdana, Arial, helvetica, sans-serif; font-size: 16px; font-weight: bold; } .subtitle { font-size: 12px; font-weight: bold; } -.toc_ul, .toc_li { margin-left: 8 px; line-height: 16px; } -.step_ol, .step_li { margin-left: 11 px; line-height: 16px; } +.toc_ul, .toc_li { margin-left: 8px; line-height: 16px; } +.step_ol, .step_li { margin-left: 11px; line-height: 16px; } img { border: #000000 solid 1px; } a:visited { color: #666666; text-decoration: underline; } diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/zh_cn/common_buttons.htm b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/zh_cn/common_buttons.htm index 167a830d3..5df5e6653 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/zh_cn/common_buttons.htm +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/zh_cn/common_buttons.htm @@ -104,31 +104,31 @@ - + - + - + - + - + - + - + diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/zh_cn/style.css b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/zh_cn/style.css index 722f537a1..ebc05380e 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/zh_cn/style.css +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/docs/zh_cn/style.css @@ -3,8 +3,8 @@ body, td, .content { font-family: Verdana, Arial, helvetica, sans-serif; font-si .title { font-family: Verdana, Arial, helvetica, sans-serif; font-size: 16px; font-weight: bold; } .subtitle { font-size: 12px; font-weight: bold; } -.toc_ul, .toc_li { margin-left: 8 px; line-height: 16px; } -.step_ol, .step_li { margin-left: 11 px; line-height: 16px; } +.toc_ul, .toc_li { margin-left: 8px; line-height: 16px; } +.step_ol, .step_li { margin-left: 11px; line-height: 16px; } img { border: #000000 solid 1px; } a:visited { color: #666666; text-decoration: underline; } diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/editor_template.js b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/editor_template.js index 1b1d9a255..1309eb493 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/editor_template.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/editor_template.js @@ -1,12 +1,12 @@ -tinyMCE.importThemeLanguagePack('advanced');var TinyMCE_advanced_autoImportCSSClasses=true;var TinyMCE_advanced_resizer=new Object();var TinyMCE_advanced_buttons=[['bold','{$lang_bold_img}','{$lang_bold_desc}','Bold'],['italic','{$lang_italic_img}','{$lang_italic_desc}','Italic'],['underline','{$lang_underline_img}','{$lang_underline_desc}','Underline'],['strikethrough','strikethrough.gif','{$lang_striketrough_desc}','Strikethrough'],['justifyleft','justifyleft.gif','{$lang_justifyleft_desc}','JustifyLeft'],['justifycenter','justifycenter.gif','{$lang_justifycenter_desc}','JustifyCenter'],['justifyright','justifyright.gif','{$lang_justifyright_desc}','JustifyRight'],['justifyfull','justifyfull.gif','{$lang_justifyfull_desc}','JustifyFull'],['bullist','bullist.gif','{$lang_bullist_desc}','InsertUnorderedList'],['numlist','numlist.gif','{$lang_numlist_desc}','InsertOrderedList'],['outdent','outdent.gif','{$lang_outdent_desc}','Outdent'],['indent','indent.gif','{$lang_indent_desc}','Indent'],['cut','cut.gif','{$lang_cut_desc}','Cut'],['copy','copy.gif','{$lang_copy_desc}','Copy'],['paste','paste.gif','{$lang_paste_desc}','Paste'],['undo','undo.gif','{$lang_undo_desc}','Undo'],['redo','redo.gif','{$lang_redo_desc}','Redo'],['link','link.gif','{$lang_link_desc}','mceLink',true],['unlink','unlink.gif','{$lang_unlink_desc}','unlink'],['image','image.gif','{$lang_image_desc}','mceImage',true],['cleanup','cleanup.gif','{$lang_cleanup_desc}','mceCleanup'],['help','help.gif','{$lang_help_desc}','mceHelp'],['code','code.gif','{$lang_theme_code_desc}','mceCodeEditor'],['hr','hr.gif','{$lang_theme_hr_desc}','inserthorizontalrule'],['removeformat','removeformat.gif','{$lang_theme_removeformat_desc}','removeformat'],['sub','sub.gif','{$lang_theme_sub_desc}','subscript'],['sup','sup.gif','{$lang_theme_sup_desc}','superscript'],['forecolor','forecolor.gif','{$lang_theme_forecolor_desc}','mceForeColor',true],['backcolor','backcolor.gif','{$lang_theme_backcolor_desc}','mceBackColor',true],['charmap','charmap.gif','{$lang_theme_charmap_desc}','mceCharMap'],['visualaid','visualaid.gif','{$lang_theme_visualaid_desc}','mceToggleVisualAid'],['anchor','anchor.gif','{$lang_theme_anchor_desc}','mceInsertAnchor'],['newdocument','newdocument.gif','{$lang_newdocument_desc}','mceNewDocument']];function TinyMCE_advanced_getControlHTML(button_name){var buttonTileMap=new Array('anchor.gif','backcolor.gif','bullist.gif','justifycenter.gif','charmap.gif','cleanup.gif','code.gif','copy.gif','custom_1.gif','cut.gif','forecolor.gif','justifyfull.gif','help.gif','hr.gif','image.gif','indent.gif','justifyleft.gif','link.gif','numlist.gif','outdent.gif','paste.gif','redo.gif','removeformat.gif','justifyright.gif','strikethrough.gif','sub.gif','sup.gif','undo.gif','unlink.gif','visualaid.gif');for(var i=0;i4?but[4]:false)+(but.length>5?',\''+but[5]+'\'':'')+')';return '';}}}var cmd='tinyMCE.execInstanceCommand(\'{$editor_id}\',\''+but[3]+'\','+(but.length>4?but[4]:false)+(but.length>5?',\''+but[5]+'\'':'')+')';return '';}}switch(button_name){case "formatselect":var html='';return html;case "styleselect":return '';case "fontselect":var fontHTML='';return fontHTML;case "fontsizeselect":return '';case "|":case "separator":return '';case "spacer":return '';case "rowseparator":return '
    ';}return "";}function TinyMCE_advanced_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mceForeColor":var template=new Array();var elm=tinyMCE.selectedInstance.getFocusElement();var inputColor=tinyMCE.getAttrib(elm,"color");if(inputColor=='')inputColor=elm.style.color;if(!inputColor)inputColor="#000000";template['file']='color_picker.htm';template['width']=220;template['height']=190;tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes",command:"forecolor",input_color:inputColor});return true;case "mceBackColor":var template=new Array();var elm=tinyMCE.selectedInstance.getFocusElement();var inputColor=elm.style.backgroundColor;if(!inputColor)inputColor="#000000";template['file']='color_picker.htm';template['width']=220;template['height']=190;template['width']+=tinyMCE.getLang('lang_theme_advanced_backcolor_delta_width',0);template['height']+=tinyMCE.getLang('lang_theme_advanced_backcolor_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes",command:"HiliteColor",input_color:inputColor});return true;case "mceColorPicker":if(user_interface){var template=new Array();var inputColor=value['document'].getElementById(value['element_id']).value;template['file']='color_picker.htm';template['width']=220;template['height']=190;template['close_previous']="no";template['width']+=tinyMCE.getLang('lang_theme_advanced_colorpicker_delta_width',0);template['height']+=tinyMCE.getLang('lang_theme_advanced_colorpicker_delta_height',0);if(typeof(value['store_selection'])=="undefined")value['store_selection']=true;tinyMCE.lastColorPickerValue=value;tinyMCE.openWindow(template,{editor_id:editor_id,mce_store_selection:value['store_selection'],inline:"yes",command:"mceColorPicker",input_color:inputColor});}else{var savedVal=tinyMCE.lastColorPickerValue;var elm=savedVal['document'].getElementById(savedVal['element_id']);elm.value=value;eval('elm.onchange();');}return true;case "mceCodeEditor":var template=new Array();template['file']='source_editor.htm';template['width']=parseInt(tinyMCE.getParam("theme_advanced_source_editor_width",500));template['height']=parseInt(tinyMCE.getParam("theme_advanced_source_editor_height",400));tinyMCE.openWindow(template,{editor_id:editor_id,resizable:"yes",scrollbars:"no",inline:"yes"});return true;case "mceCharMap":var template=new Array();template['file']='charmap.htm';template['width']=550+(tinyMCE.isOpera?40:0);template['height']=250;template['width']+=tinyMCE.getLang('lang_theme_advanced_charmap_delta_width',0);template['height']+=tinyMCE.getLang('lang_theme_advanced_charmap_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});return true;case "mceInsertAnchor":var template=new Array();template['file']='anchor.htm';template['width']=320;template['height']=90+(tinyMCE.isNS7?30:0);template['width']+=tinyMCE.getLang('lang_theme_advanced_anchor_delta_width',0);template['height']+=tinyMCE.getLang('lang_theme_advanced_anchor_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});return true;case "mceNewDocument":if(confirm(tinyMCE.getLang('lang_newdocument')))tinyMCE.execInstanceCommand(editor_id,'mceSetContent',false,'');return true;}return false;}function TinyMCE_advanced_getEditorTemplate(settings,editorId){function removeFromArray(in_array,remove_array){var outArray=new Array();for(var i=0;i 

    ';var layoutManager=tinyMCE.getParam("theme_advanced_layout_manager","SimpleLayout");var styleSelectHTML='';if(settings['theme_advanced_styles']){var stylesAr=settings['theme_advanced_styles'].split(';');for(var i=0;i'+key+'';}TinyMCE_advanced_autoImportCSSClasses=false;}switch(layoutManager){case "SimpleLayout":var toolbarHTML="";var toolbarLocation=tinyMCE.getParam("theme_advanced_toolbar_location","bottom");var toolbarAlign=tinyMCE.getParam("theme_advanced_toolbar_align","center");var pathLocation=tinyMCE.getParam("theme_advanced_path_location","none");var statusbarLocation=tinyMCE.getParam("theme_advanced_statusbar_location",pathLocation);var defVals={theme_advanced_buttons1:"bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,separator,outdent,indent,separator,undo,redo,separator,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,separator,sub,sup,separator,charmap"};toolbarHTML+='';for(var i=1;i<100;i++){var def=defVals["theme_advanced_buttons"+i];var buttons=tinyMCE.getParam("theme_advanced_buttons"+i,def==null?'':def,true,',');if(buttons.length==0)break;buttons=removeFromArray(buttons,tinyMCE.getParam("theme_advanced_disable","",true,','));buttons=addToArray(buttons,tinyMCE.getParam("theme_advanced_buttons"+i+"_add","",true,','));buttons=addToArray(tinyMCE.getParam("theme_advanced_buttons"+i+"_add_before","",true,','),buttons);for(var b=0;b0){toolbarHTML+="
    ";deltaHeight-=23;}}toolbarHTML+='';template['html']='
    Voegt een nieuwe tabel met 2 rijen en kolommen in op de huidige positie in te tekst.
    Voegt een nieuwe rij toe aan de tabel boven de huidige.
    Voegt een nieuwe rij toe aan de tabel onder de huidige.
    Verwijdert de huidige rij uit de tabel.
    Voegt een nieuwe kolom toe aan de tabel voor de huidige.
    Voegt een nieuwe kolom toe aan de tabel achter de huidige.
    Verwijdert de huidige kolom uit de tabel.
    Åpner ein HTML-kodeeditor.
    Lager ein ny tabell (2x2).
    Lager ei rad ovenfor den noverande raden.
    Lager ei rad under den noverande raden.
    Tar bort ei rad.
    Lager ei kolonne før den noverande kolonnen.
    Lager ei kolonne etter den noverande kolonnen.
    Tar bort ei kolonne.
    Otwarcie edytora kodu HTML.
    Wstawienie nowej tabeli 2x2 w bie¿±cej pozycji.
    Wstawienie wiersza ponad aktualnie zaznaczonym.
    Wstawienie wiersz poni¿ej aktualnie zaznaczonego.
    Usuniêcie wiersza.
    Wstawienie kolumny przed aktualnie zaznaczon±.
    Wstawienie kolumny za aktualnie zaznaczon±.
    Usuniêcie kolumny.
    Otevorý editor s HTML zdrojom.
    Do aktuálnej pozície vloží novú 2x2 tabulku.
    Pridá riadok pred akruálny.
    Pridá riadok po aktuálny.
    Odstráni riadok.
    Pridá stĺpec pred aktuálny.
    Pridá stĺpec za aktuálny.
    Odstráni aktuálny stĺpec.
    Öppnar en HTML-käkodseditor .
    Skapar en ny tabell (2x2) .
    Skapar en rad ovanför den nuvarande raden .
    Skapar en rad under den nuvarande raden .
    Tar bort en rad.
    Skapar en kolumn före den nuvarande kolumnen.
    Skapar en kolumn efter den nuvarande kolumnen.
    Tar bort en kolumn.
    ´ò¿ªHTML´úÂë±à¼­Æ÷
    ÔÚµ±Ç°Î»ÖòåÈëÒ»ÕÅ2¡Á2µÄ±í¸ñ
    ÔÚµ±Ç°ÐеÄÇ°Ãæ²åÈëÐÂÐÐ
    ÔÚµ±Ç°ÐеĺóÃæ²åÈëÐÂÐÐ
    ɾ³ýµ±Ç°ÐÐ
    ÔÚµ±Ç°ÁеÄÇ°Ãæ²åÈëÐÂÁÐ
    ÔÚµ±Ç°ÁеĺóÃæ²åÈëÐÂÁÐ
    ɾ³ýµ±Ç°ÁÐ
    ';if(toolbarLocation=="top"){template['html']+='';}if(statusbarLocation=="top"){template['html']+='';deltaHeight-=23;}template['html']+='';if(toolbarLocation=="bottom"){template['html']+='';}if(toolbarLocation=="external"){var bod=document.body;var elm=document.createElement("div");toolbarHTML=tinyMCE.replaceVars(toolbarHTML,tinyMCE.settings);toolbarHTML=tinyMCE.replaceVars(toolbarHTML,tinyMCELang);toolbarHTML=tinyMCE.replaceVar(toolbarHTML,'style_select_options',styleSelectHTML);toolbarHTML=tinyMCE.replaceVar(toolbarHTML,"editor_id",editorId);toolbarHTML=tinyMCE.applyTemplate(toolbarHTML);elm.className="mceToolbarExternal";elm.id=editorId+"_toolbar";elm.innerHTML='
    '+toolbarHTML+'
    '+statusbarHTML+'
    '+toolbarHTML+'
    '+toolbarHTML+'
    ';bod.appendChild(elm);deltaHeight=0;tinyMCE.getInstanceById(editorId).toolbarElement=elm;}else{tinyMCE.getInstanceById(editorId).toolbarElement=null;}if(statusbarLocation=="bottom"){template['html']+=''+statusbarHTML+'';deltaHeight-=23;}template['html']+='';break;case "RowLayout":template['html']='';var containers=tinyMCE.getParam("theme_advanced_containers","",true,",");var defaultContainerCSS=tinyMCE.getParam("theme_advanced_containers_default_class","container");var defaultContainerAlign=tinyMCE.getParam("theme_advanced_containers_default_align","center");for(var i=0;i';}else if(containers[i]=="mceElementpath"||containers[i]=="mceStatusbar"){var pathClass="mceStatusbar";if(i==containers.length-1){pathClass="mceStatusbarBottom";}else if(i==0){pathClass="mceStatusbar";}else{deltaHeight-=2;}template['html']+='';deltaHeight-=22;}else{var curContainer=tinyMCE.getParam("theme_advanced_container_"+containers[i],"",true,',');var curContainerHTML="";var curAlign=tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_align",defaultContainerAlign);var curCSS=tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_class",defaultContainerCSS);for(var j=0;j0){curContainerHTML+="
    ";deltaHeight-=23;}template['html']+='
    ';}}template['html']+='
    \ - \ -
    '+statusbarHTML+'
    '+curContainerHTML+'
    ';break;case "BorderLayout":break;case "CustomLayout":var customLayout=tinyMCE.getParam("theme_advanced_custom_layout","");if(customLayout!=""&&eval("typeof("+customLayout+")")!="undefined"){template=eval(customLayout+"(template);");}break;default:alert('UNDEFINED LAYOUT MANAGER! PLEASE CHECK YOUR TINYMCE CONFIG!');break;}if(resizing)template['html']+='';template['html']=tinyMCE.replaceVar(template['html'],'style_select_options',styleSelectHTML);template['delta_width']=0;template['delta_height']=deltaHeight;return template;}function TinyMCE_advanced_setResizing(e,editor_id,state){e=typeof(e)=="undefined"?window.event:e;var resizer=TinyMCE_advanced_resizer;var editorContainer=document.getElementById(editor_id+'_parent');var editorArea=document.getElementById(editor_id+'_parent').firstChild;var resizeBox=document.getElementById(editor_id+'_resize_box');var inst=tinyMCE.getInstanceById(editor_id);if(state){var width=editorArea.clientWidth;var height=editorArea.clientHeight;resizeBox.style.width=width+"px";resizeBox.style.height=height+"px";resizer.iframeWidth=inst.iframeElement.clientWidth;resizer.iframeHeight=inst.iframeElement.clientHeight;editorArea.style.display="none";resizeBox.style.display="block";if(!resizer.eventHandlers){if(tinyMCE.isMSIE)tinyMCE.addEvent(document,"mousemove",TinyMCE_advanced_resizeEventHandler);else tinyMCE.addEvent(window,"mousemove",TinyMCE_advanced_resizeEventHandler);tinyMCE.addEvent(document,"mouseup",TinyMCE_advanced_resizeEventHandler);resizer.eventHandlers=true;}resizer.resizing=true;resizer.downX=e.screenX;resizer.downY=e.screenY;resizer.width=parseInt(resizeBox.style.width);resizer.height=parseInt(resizeBox.style.height);resizer.editorId=editor_id;resizer.resizeBox=resizeBox;resizer.horizontal=tinyMCE.getParam("theme_advanced_resize_horizontal",true);}else{resizer.resizing=false;resizeBox.style.display="none";editorArea.style.display=tinyMCE.isMSIE?"block":"table";tinyMCE.execCommand('mceResetDesignMode');}}function TinyMCE_advanced_initInstance(inst){if(tinyMCE.getParam("theme_advanced_resizing",false)){if(tinyMCE.getParam("theme_advanced_resizing_use_cookie",true)){var w=TinyMCE_advanced_getCookie("TinyMCE_"+inst.editorId+"_width");var h=TinyMCE_advanced_getCookie("TinyMCE_"+inst.editorId+"_height");TinyMCE_advanced_resizeTo(inst,w,h,tinyMCE.getParam("theme_advanced_resize_horizontal",true));}}}function TinyMCE_advanced_setCookie(name,value,expires,path,domain,secure){var curCookie=name+"="+escape(value)+((expires)?"; expires="+expires.toGMTString():"")+((path)?"; path="+escape(path):"")+((domain)?"; domain="+domain:"")+((secure)?"; secure":"");document.cookie=curCookie;}function TinyMCE_advanced_getCookie(name){var dc=document.cookie;var prefix=name+"=";var begin=dc.indexOf("; "+prefix);if(begin==-1){begin=dc.indexOf(prefix);if(begin!=0)return null;}else begin+=2;var end=document.cookie.indexOf(";",begin);if(end==-1)end=dc.length;return unescape(dc.substring(begin+prefix.length,end));}function TinyMCE_advanced_resizeTo(inst,w,h,set_w){var editorContainer=document.getElementById(inst.editorId+'_parent');var tableElm=editorContainer.firstChild;var iframe=inst.iframeElement;if(w==null||w=="null"){set_w=false;w=0;}if(h==null||h=="null")return;w=parseInt(w);h=parseInt(h);if(tinyMCE.isGecko){w+=2;h+=2;}var dx=w-tableElm.clientWidth;var dy=h-tableElm.clientHeight;w=w<1?30:w;h=h<1?30:h;if(set_w)tableElm.style.width=w+"px";tableElm.style.height=h+"px";iw=iframe.clientWidth+dx;ih=iframe.clientHeight+dy;iw=iw<1?30:iw;ih=ih<1?30:ih;if(tinyMCE.isGecko){iw-=2;ih-=2;}if(set_w)iframe.style.width=iw+"px";iframe.style.height=ih+"px";if(set_w){var tableBodyElm=tableElm.firstChild;var minIframeWidth=tableBodyElm.scrollWidth;if(inst.iframeElement.clientWidth=0;i--){var nodeName=path[i].nodeName.toLowerCase();var nodeData="";if(nodeName=="b"){nodeName="strong";}if(nodeName=="i"){nodeName="em";}if(nodeName=="span"){var cn=tinyMCE.getAttrib(path[i],"class");if(cn!=""&&cn.indexOf('mceItem')==-1)nodeData+="class: "+cn+" ";var st=tinyMCE.getAttrib(path[i],"style");if(st!=""){st=tinyMCE.serializeStyle(tinyMCE.parseStyle(st));nodeData+="style: "+st+" ";}}if(nodeName=="font"){if(tinyMCE.getParam("convert_fonts_to_spans"))nodeName="span";var face=tinyMCE.getAttrib(path[i],"face");if(face!="")nodeData+="font: "+face+" ";var size=tinyMCE.getAttrib(path[i],"size");if(size!="")nodeData+="size: "+size+" ";var color=tinyMCE.getAttrib(path[i],"color");if(color!="")nodeData+="color: "+color+" ";}if(getAttrib(path[i],'id')!=""){nodeData+="id: "+path[i].getAttribute('id')+" ";}var className=tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i],"class"),false);if(className!=""&&className.indexOf('mceItem')==-1)nodeData+="class: "+className+" ";if(getAttrib(path[i],'src')!=""){var src=tinyMCE.getAttrib(path[i],"mce_src");if(src=="")src=tinyMCE.getAttrib(path[i],"src");nodeData+="src: "+src+" ";}if(getAttrib(path[i],'href')!=""){var href=tinyMCE.getAttrib(path[i],"mce_href");if(href=="")href=tinyMCE.getAttrib(path[i],"href");nodeData+="href: "+href+" ";}if(nodeName=="img"&&tinyMCE.getAttrib(path[i],"class").indexOf('mceItemFlash')!=-1){nodeName="flash";nodeData="src: "+path[i].getAttribute('title');}if(nodeName=="a"&&(anchor=tinyMCE.getAttrib(path[i],"name"))!=""){nodeName="a";nodeName+="#"+anchor;nodeData="";}if(getAttrib(path[i],'name').indexOf("mce_")!=0){var className=tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i],"class"),false);if(className!=""&&className.indexOf('mceItem')==-1){nodeName+="."+className;}}var cmd='tinyMCE.execInstanceCommand(\''+editor_id+'\',\'mceSelectNodeDepth\',false,\''+i+'\');';html+=''+nodeName+'';if(i>0){html+=" » ";}}pathElm.innerHTML=''+tinyMCE.getLang('lang_theme_path')+": "+html+' ';}tinyMCE.switchClassSticky(editor_id+'_justifyleft','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_justifyright','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_justifycenter','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_justifyfull','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_bold','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_italic','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_underline','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_strikethrough','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_bullist','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_numlist','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_sub','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_sup','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_anchor','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_link','mceButtonDisabled',true);tinyMCE.switchClassSticky(editor_id+'_unlink','mceButtonDisabled',true);tinyMCE.switchClassSticky(editor_id+'_outdent','mceButtonDisabled',true);tinyMCE.switchClassSticky(editor_id+'_image','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_hr','mceButtonNormal');if(node.nodeName=="A"&&tinyMCE.getAttrib(node,"class").indexOf('mceItemAnchor')!=-1)tinyMCE.switchClassSticky(editor_id+'_anchor','mceButtonSelected');var anchorLink=tinyMCE.getParentElement(node,"a","href");if(anchorLink||any_selection){tinyMCE.switchClassSticky(editor_id+'_link',anchorLink?'mceButtonSelected':'mceButtonNormal',false);tinyMCE.switchClassSticky(editor_id+'_unlink',anchorLink?'mceButtonSelected':'mceButtonNormal',false);}tinyMCE.switchClassSticky(editor_id+'_visualaid',visual_aid?'mceButtonSelected':'mceButtonNormal',false);if(undo_levels!=-1){tinyMCE.switchClassSticky(editor_id+'_undo','mceButtonDisabled',true);tinyMCE.switchClassSticky(editor_id+'_redo','mceButtonDisabled',true);}if(tinyMCE.getParentElement(node,"li,blockquote")){tinyMCE.switchClassSticky(editor_id+'_outdent','mceButtonNormal',false);}if(undo_index!=-1&&(undo_index0)){tinyMCE.switchClassSticky(editor_id+'_redo','mceButtonNormal',false);}if(undo_index!=-1&&(undo_index>0&&undo_levels>0)){tinyMCE.switchClassSticky(editor_id+'_undo','mceButtonNormal',false);}var selectElm=document.getElementById(editor_id+"_styleSelect");if(selectElm){TinyMCE_advanced_setupCSSClasses(editor_id);classNode=node;breakOut=false;var index=0;do{if(classNode&&classNode.className){for(var i=0;i");else selectByValue(selectElm,"");}var selectElm=document.getElementById(editor_id+"_fontNameSelect");if(selectElm){if(!tinyMCE.isSafari&&!(tinyMCE.isMSIE&&!tinyMCE.isOpera)){var face=inst.queryCommandValue('FontName');face=face==null||face==""?"":face;selectByValue(selectElm,face,face!="");}else{var elm=tinyMCE.getParentElement(node,"font","face");if(elm){var family=tinyMCE.getAttrib(elm,"face");if(family=='')family=''+elm.style.fontFamily;if(!selectByValue(selectElm,family,family!=""))selectByValue(selectElm,"");}else selectByValue(selectElm,"");}}var selectElm=document.getElementById(editor_id+"_fontSizeSelect");if(selectElm){if(!tinyMCE.isSafari&&!tinyMCE.isOpera){var size=inst.queryCommandValue('FontSize');selectByValue(selectElm,size==null||size==""?"0":size);}else{var elm=tinyMCE.getParentElement(node,"font","size");if(elm){var size=tinyMCE.getAttrib(elm,"size");if(size==''){var sizes=new Array('','8px','10px','12px','14px','18px','24px','36px');size=''+elm.style.fontSize;for(var i=0;i0){selectElm.setAttribute('cssImported','true');}}}; \ No newline at end of file +tinyMCE.importThemeLanguagePack('advanced');var TinyMCE_AdvancedTheme={_autoImportCSSClasses:true,_resizer:{},_buttons:[['bold','{$lang_bold_img}','lang_bold_desc','Bold'],['italic','{$lang_italic_img}','lang_italic_desc','Italic'],['underline','{$lang_underline_img}','lang_underline_desc','Underline'],['strikethrough','strikethrough.gif','lang_striketrough_desc','Strikethrough'],['justifyleft','justifyleft.gif','lang_justifyleft_desc','JustifyLeft'],['justifycenter','justifycenter.gif','lang_justifycenter_desc','JustifyCenter'],['justifyright','justifyright.gif','lang_justifyright_desc','JustifyRight'],['justifyfull','justifyfull.gif','lang_justifyfull_desc','JustifyFull'],['bullist','bullist.gif','lang_bullist_desc','InsertUnorderedList'],['numlist','numlist.gif','lang_numlist_desc','InsertOrderedList'],['outdent','outdent.gif','lang_outdent_desc','Outdent'],['indent','indent.gif','lang_indent_desc','Indent'],['cut','cut.gif','lang_cut_desc','Cut'],['copy','copy.gif','lang_copy_desc','Copy'],['paste','paste.gif','lang_paste_desc','Paste'],['undo','undo.gif','lang_undo_desc','Undo'],['redo','redo.gif','lang_redo_desc','Redo'],['link','link.gif','lang_link_desc','mceLink',true],['unlink','unlink.gif','lang_unlink_desc','unlink'],['image','image.gif','lang_image_desc','mceImage',true],['cleanup','cleanup.gif','lang_cleanup_desc','mceCleanup'],['help','help.gif','lang_help_desc','mceHelp'],['code','code.gif','lang_theme_code_desc','mceCodeEditor'],['hr','hr.gif','lang_theme_hr_desc','inserthorizontalrule'],['removeformat','removeformat.gif','lang_theme_removeformat_desc','removeformat'],['sub','sub.gif','lang_theme_sub_desc','subscript'],['sup','sup.gif','lang_theme_sup_desc','superscript'],['forecolor','forecolor.gif','lang_theme_forecolor_desc','mceForeColor',true],['backcolor','backcolor.gif','lang_theme_backcolor_desc','mceBackColor',true],['charmap','charmap.gif','lang_theme_charmap_desc','mceCharMap'],['visualaid','visualaid.gif','lang_theme_visualaid_desc','mceToggleVisualAid'],['anchor','anchor.gif','lang_theme_anchor_desc','mceInsertAnchor'],['newdocument','newdocument.gif','lang_newdocument_desc','mceNewDocument']],_buttonMap:'anchor,backcolor,bold,bullist,charmap,cleanup,code,copy,cut,forecolor,help,hr,image,indent,italic,justifycenter,justifyfull,justifyleft,justifyright,link,newdocument,numlist,outdent,paste,redo,removeformat,strikethrough,sub,sup,underline,undo,unlink,visualaid,advhr,ltr,rtl,emotions,flash,fullpage,fullscreen,iespell,insertdate,inserttime,pastetext,pasteword,selectall,preview,print,save,replace,search,table,cell_props,delete_col,delete_row,col_after,col_before,row_after,row_before,merge_cells,row_props,split_cells',getControlHTML:function(button_name){var i,x;for(i=0;i4?but[4]:false),(but.length>5?but[5]:null));}switch(button_name){case"formatselect":var html='';return html;case"styleselect":return'';case"fontselect":var fontHTML='';return fontHTML;case"fontsizeselect":return'';case"|":case"separator":return'';case"spacer":return'';case"rowseparator":return'
    ';}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceLink":var inst=tinyMCE.getInstanceById(editor_id);var doc=inst.getDoc();var selectedText="";if(tinyMCE.isMSIE){var rng=doc.selection.createRange();selectedText=rng.text;}else selectedText=inst.getSel().toString();if(!tinyMCE.linkElement){if((tinyMCE.selectedElement.nodeName.toLowerCase()!="img")&&(selectedText.length<=0))return true;}var href="",target="",title="",onclick="",action="insert",style_class="";if(tinyMCE.selectedElement.nodeName.toLowerCase()=="a")tinyMCE.linkElement=tinyMCE.selectedElement;if(tinyMCE.linkElement!=null&&tinyMCE.getAttrib(tinyMCE.linkElement,'href')=="")tinyMCE.linkElement=null;if(tinyMCE.linkElement){href=tinyMCE.getAttrib(tinyMCE.linkElement,'href');target=tinyMCE.getAttrib(tinyMCE.linkElement,'target');title=tinyMCE.getAttrib(tinyMCE.linkElement,'title');onclick=tinyMCE.getAttrib(tinyMCE.linkElement,'onclick');style_class=tinyMCE.getAttrib(tinyMCE.linkElement,'class');if(onclick=="")onclick=tinyMCE.getAttrib(tinyMCE.linkElement,'onclick');onclick=tinyMCE.cleanupEventStr(onclick);href=eval(tinyMCE.settings['urlconverter_callback']+"(href, tinyMCE.linkElement, true);");mceRealHref=tinyMCE.getAttrib(tinyMCE.linkElement,'mce_href');if(mceRealHref!=""){href=mceRealHref;if(tinyMCE.getParam('convert_urls'))href=eval(tinyMCE.settings['urlconverter_callback']+"(href, tinyMCE.linkElement, true);");}action="update";}var template=new Array();template['file']='link.htm';template['width']=310;template['height']=200;template['width']+=tinyMCE.getLang('lang_insert_link_delta_width',0);template['height']+=tinyMCE.getLang('lang_insert_link_delta_height',0);if(inst.settings['insertlink_callback']){var returnVal=eval(inst.settings['insertlink_callback']+"(href, target, title, onclick, action, style_class);");if(returnVal&&returnVal['href'])TinyMCE_AdvancedTheme._insertLink(returnVal['href'],returnVal['target'],returnVal['title'],returnVal['onclick'],returnVal['style_class']);}else{tinyMCE.openWindow(template,{href:href,target:target,title:title,onclick:onclick,action:action,className:style_class,inline:"yes"});}return true;case"mceImage":var src="",alt="",border="",hspace="",vspace="",width="",height="",align="";var title="",onmouseover="",onmouseout="",action="insert";var img=tinyMCE.imgElement;var inst=tinyMCE.getInstanceById(editor_id);if(tinyMCE.selectedElement!=null&&tinyMCE.selectedElement.nodeName.toLowerCase()=="img"){img=tinyMCE.selectedElement;tinyMCE.imgElement=img;}if(img){if(tinyMCE.getAttrib(img,'name').indexOf('mce_')==0)return true;src=tinyMCE.getAttrib(img,'src');alt=tinyMCE.getAttrib(img,'alt');if(alt=="")alt=tinyMCE.getAttrib(img,'title');if(tinyMCE.isGecko){var w=img.style.width;if(w!=null&&w!="")img.setAttribute("width",w);var h=img.style.height;if(h!=null&&h!="")img.setAttribute("height",h);}border=tinyMCE.getAttrib(img,'border');hspace=tinyMCE.getAttrib(img,'hspace');vspace=tinyMCE.getAttrib(img,'vspace');width=tinyMCE.getAttrib(img,'width');height=tinyMCE.getAttrib(img,'height');align=tinyMCE.getAttrib(img,'align');onmouseover=tinyMCE.getAttrib(img,'onmouseover');onmouseout=tinyMCE.getAttrib(img,'onmouseout');title=tinyMCE.getAttrib(img,'title');if(tinyMCE.isMSIE){width=img.attributes['width'].specified?width:"";height=img.attributes['height'].specified?height:"";}src=eval(tinyMCE.settings['urlconverter_callback']+"(src, img, true);");mceRealSrc=tinyMCE.getAttrib(img,'mce_src');if(mceRealSrc!=""){src=mceRealSrc;if(tinyMCE.getParam('convert_urls'))src=eval(tinyMCE.settings['urlconverter_callback']+"(src, img, true);");}action="update";}var template=new Array();template['file']='image.htm?src={$src}';template['width']=355;template['height']=265+(tinyMCE.isMSIE?25:0);template['width']+=tinyMCE.getLang('lang_insert_image_delta_width',0);template['height']+=tinyMCE.getLang('lang_insert_image_delta_height',0);if(inst.settings['insertimage_callback']){var returnVal=eval(inst.settings['insertimage_callback']+"(src, alt, border, hspace, vspace, width, height, align, title, onmouseover, onmouseout, action);");if(returnVal&&returnVal['src'])TinyMCE_AdvancedTheme._insertImage(returnVal['src'],returnVal['alt'],returnVal['border'],returnVal['hspace'],returnVal['vspace'],returnVal['width'],returnVal['height'],returnVal['align'],returnVal['title'],returnVal['onmouseover'],returnVal['onmouseout']);}else tinyMCE.openWindow(template,{src:src,alt:alt,border:border,hspace:hspace,vspace:vspace,width:width,height:height,align:align,title:title,onmouseover:onmouseover,onmouseout:onmouseout,action:action,inline:"yes"});return true;case"mceForeColor":var template=new Array();var elm=tinyMCE.selectedInstance.getFocusElement();var inputColor=tinyMCE.getAttrib(elm,"color");if(inputColor=='')inputColor=elm.style.color;if(!inputColor)inputColor="#000000";template['file']='color_picker.htm';template['width']=220;template['height']=190;tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes",command:"forecolor",input_color:inputColor});return true;case"mceBackColor":var template=new Array();var elm=tinyMCE.selectedInstance.getFocusElement();var inputColor=elm.style.backgroundColor;if(!inputColor)inputColor="#000000";template['file']='color_picker.htm';template['width']=220;template['height']=190;template['width']+=tinyMCE.getLang('lang_theme_advanced_backcolor_delta_width',0);template['height']+=tinyMCE.getLang('lang_theme_advanced_backcolor_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes",command:"HiliteColor",input_color:inputColor});return true;case"mceColorPicker":if(user_interface){var template=new Array();var inputColor=value['document'].getElementById(value['element_id']).value;template['file']='color_picker.htm';template['width']=220;template['height']=190;template['close_previous']="no";template['width']+=tinyMCE.getLang('lang_theme_advanced_colorpicker_delta_width',0);template['height']+=tinyMCE.getLang('lang_theme_advanced_colorpicker_delta_height',0);if(typeof(value['store_selection'])=="undefined")value['store_selection']=true;tinyMCE.lastColorPickerValue=value;tinyMCE.openWindow(template,{editor_id:editor_id,mce_store_selection:value['store_selection'],inline:"yes",command:"mceColorPicker",input_color:inputColor});}else{var savedVal=tinyMCE.lastColorPickerValue;var elm=savedVal['document'].getElementById(savedVal['element_id']);elm.value=value;if(elm.onchange!=null&&elm.onchange!='')eval('elm.onchange();');}return true;case"mceCodeEditor":var template=new Array();template['file']='source_editor.htm';template['width']=parseInt(tinyMCE.getParam("theme_advanced_source_editor_width",720));template['height']=parseInt(tinyMCE.getParam("theme_advanced_source_editor_height",580));tinyMCE.openWindow(template,{editor_id:editor_id,resizable:"yes",scrollbars:"no",inline:"yes"});return true;case"mceCharMap":var template=new Array();template['file']='charmap.htm';template['width']=550+(tinyMCE.isOpera?40:0);template['height']=250;template['width']+=tinyMCE.getLang('lang_theme_advanced_charmap_delta_width',0);template['height']+=tinyMCE.getLang('lang_theme_advanced_charmap_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});return true;case"mceInsertAnchor":var template=new Array();template['file']='anchor.htm';template['width']=320;template['height']=90+(tinyMCE.isNS7?30:0);template['width']+=tinyMCE.getLang('lang_theme_advanced_anchor_delta_width',0);template['height']+=tinyMCE.getLang('lang_theme_advanced_anchor_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});return true;case"mceNewDocument":if(confirm(tinyMCE.getLang('lang_newdocument')))tinyMCE.execInstanceCommand(editor_id,'mceSetContent',false,' ');return true;}return false;},getEditorTemplate:function(settings,editorId){function removeFromArray(in_array,remove_array){var outArray=new Array();for(var i=0;i 

    ';var layoutManager=tinyMCE.getParam("theme_advanced_layout_manager","SimpleLayout");var styleSelectHTML='';if(settings['theme_advanced_styles']){var stylesAr=settings['theme_advanced_styles'].split(';');for(var i=0;i'+key+'';}TinyMCE_AdvancedTheme._autoImportCSSClasses=false;}switch(layoutManager){case"SimpleLayout":var toolbarHTML="";var toolbarLocation=tinyMCE.getParam("theme_advanced_toolbar_location","bottom");var toolbarAlign=tinyMCE.getParam("theme_advanced_toolbar_align","center");var pathLocation=tinyMCE.getParam("theme_advanced_path_location","none");var statusbarLocation=tinyMCE.getParam("theme_advanced_statusbar_location",pathLocation);var defVals={theme_advanced_buttons1:"bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,separator,outdent,indent,separator,undo,redo,separator,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,separator,sub,sup,separator,charmap"};toolbarHTML+='0){toolbarHTML+="
    ";deltaHeight-=23;}}toolbarHTML+='
    ';template['html']='';if(toolbarLocation=="top"){template['html']+='';}if(statusbarLocation=="top"){template['html']+='';deltaHeight-=23;}template['html']+='';if(toolbarLocation=="bottom"){template['html']+='';}if(toolbarLocation=="external"){var bod=document.body;var elm=document.createElement("div");toolbarHTML=tinyMCE.replaceVar(toolbarHTML,'style_select_options',styleSelectHTML);toolbarHTML=tinyMCE.applyTemplate(toolbarHTML,{editor_id:editorId});elm.className="mceToolbarExternal";elm.id=editorId+"_toolbar";elm.innerHTML='
    '+toolbarHTML+'
    '+statusbarHTML+'
    '+toolbarHTML+'
    '+toolbarHTML+'
    ';bod.appendChild(elm);deltaHeight=0;tinyMCE.getInstanceById(editorId).toolbarElement=elm;}else{tinyMCE.getInstanceById(editorId).toolbarElement=null;}if(statusbarLocation=="bottom"){template['html']+=''+statusbarHTML+'';deltaHeight-=23;}template['html']+='';break;case"RowLayout":template['html']='';var containers=tinyMCE.getParam("theme_advanced_containers","",true,",");var defaultContainerCSS=tinyMCE.getParam("theme_advanced_containers_default_class","container");var defaultContainerAlign=tinyMCE.getParam("theme_advanced_containers_default_align","center");for(var i=0;i';}else if(containers[i]=="mceElementpath"||containers[i]=="mceStatusbar"){var pathClass="mceStatusbar";if(i==containers.length-1){pathClass="mceStatusbarBottom";}else if(i==0){pathClass="mceStatusbar";}else{deltaHeight-=2;}template['html']+='';deltaHeight-=22;}else{var curContainer=tinyMCE.getParam("theme_advanced_container_"+containers[i],"",true,',');var curContainerHTML="";var curAlign=tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_align",defaultContainerAlign);var curCSS=tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_class",defaultContainerCSS);for(var j=0;j0){curContainerHTML+="
    ";deltaHeight-=23;}template['html']+='
    ';}}template['html']+='
    \ + \ +
    '+statusbarHTML+'
    '+curContainerHTML+'
    ';break;case"CustomLayout":var customLayout=tinyMCE.getParam("theme_advanced_custom_layout","");if(customLayout!=""&&eval("typeof("+customLayout+")")!="undefined"){template=eval(customLayout+"(template);");}break;}if(resizing)template['html']+='';template['html']=tinyMCE.replaceVar(template['html'],'style_select_options',styleSelectHTML);template['delta_width']=0;template['delta_height']=deltaHeight;return template;},initInstance:function(inst){if(tinyMCE.getParam("theme_advanced_resizing",false)){if(tinyMCE.getParam("theme_advanced_resizing_use_cookie",true)){var w=TinyMCE_AdvancedTheme._getCookie("TinyMCE_"+inst.editorId+"_width");var h=TinyMCE_AdvancedTheme._getCookie("TinyMCE_"+inst.editorId+"_height");TinyMCE_AdvancedTheme._resizeTo(inst,w,h,tinyMCE.getParam("theme_advanced_resize_horizontal",true));}}inst.addShortcut('ctrl','k','lang_link_desc','mceLink');},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection,setup_content){function selectByValue(select_elm,value,first_index){first_index=typeof(first_index)=="undefined"?false:true;if(select_elm){for(var i=0;i=0;i--){var nodeName=path[i].nodeName.toLowerCase();var nodeData="";if(nodeName=="b"){nodeName="strong";}if(nodeName=="i"){nodeName="em";}if(nodeName=="span"){var cn=tinyMCE.getAttrib(path[i],"class");if(cn!=""&&cn.indexOf('mceItem')==-1)nodeData+="class: "+cn+" ";var st=tinyMCE.getAttrib(path[i],"style");if(st!=""){st=tinyMCE.serializeStyle(tinyMCE.parseStyle(st));nodeData+="style: "+st+" ";}}if(nodeName=="font"){if(tinyMCE.getParam("convert_fonts_to_spans"))nodeName="span";var face=tinyMCE.getAttrib(path[i],"face");if(face!="")nodeData+="font: "+face+" ";var size=tinyMCE.getAttrib(path[i],"size");if(size!="")nodeData+="size: "+size+" ";var color=tinyMCE.getAttrib(path[i],"color");if(color!="")nodeData+="color: "+color+" ";}if(getAttrib(path[i],'id')!=""){nodeData+="id: "+path[i].getAttribute('id')+" ";}var className=tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i],"class"),false);if(className!=""&&className.indexOf('mceItem')==-1)nodeData+="class: "+className+" ";if(getAttrib(path[i],'src')!=""){var src=tinyMCE.getAttrib(path[i],"mce_src");if(src=="")src=tinyMCE.getAttrib(path[i],"src");nodeData+="src: "+src+" ";}if(getAttrib(path[i],'href')!=""){var href=tinyMCE.getAttrib(path[i],"mce_href");if(href=="")href=tinyMCE.getAttrib(path[i],"href");nodeData+="href: "+href+" ";}if(nodeName=="img"&&tinyMCE.getAttrib(path[i],"class").indexOf('mceItemFlash')!=-1){nodeName="flash";nodeData="src: "+path[i].getAttribute('title');}if(nodeName=="a"&&(anchor=tinyMCE.getAttrib(path[i],"name"))!=""){nodeName="a";nodeName+="#"+anchor;nodeData="";}if(getAttrib(path[i],'name').indexOf("mce_")!=0){var className=tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i],"class"),false);if(className!=""&&className.indexOf('mceItem')==-1){nodeName+="."+className;}}var cmd='tinyMCE.execInstanceCommand(\''+editor_id+'\',\'mceSelectNodeDepth\',false,\''+i+'\');';html+=''+nodeName+'';if(i>0){html+=" » ";}}pathElm.innerHTML=''+tinyMCE.getLang('lang_theme_path')+": "+html+' ';}tinyMCE.switchClass(editor_id+'_justifyleft','mceButtonNormal');tinyMCE.switchClass(editor_id+'_justifyright','mceButtonNormal');tinyMCE.switchClass(editor_id+'_justifycenter','mceButtonNormal');tinyMCE.switchClass(editor_id+'_justifyfull','mceButtonNormal');tinyMCE.switchClass(editor_id+'_bold','mceButtonNormal');tinyMCE.switchClass(editor_id+'_italic','mceButtonNormal');tinyMCE.switchClass(editor_id+'_underline','mceButtonNormal');tinyMCE.switchClass(editor_id+'_strikethrough','mceButtonNormal');tinyMCE.switchClass(editor_id+'_bullist','mceButtonNormal');tinyMCE.switchClass(editor_id+'_numlist','mceButtonNormal');tinyMCE.switchClass(editor_id+'_sub','mceButtonNormal');tinyMCE.switchClass(editor_id+'_sup','mceButtonNormal');tinyMCE.switchClass(editor_id+'_anchor','mceButtonNormal');tinyMCE.switchClass(editor_id+'_link','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_unlink','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_outdent','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_image','mceButtonNormal');tinyMCE.switchClass(editor_id+'_hr','mceButtonNormal');if(node.nodeName=="A"&&tinyMCE.getAttrib(node,"class").indexOf('mceItemAnchor')!=-1)tinyMCE.switchClass(editor_id+'_anchor','mceButtonSelected');var anchorLink=tinyMCE.getParentElement(node,"a","href");if(anchorLink||any_selection){tinyMCE.switchClass(editor_id+'_link',anchorLink?'mceButtonSelected':'mceButtonNormal');tinyMCE.switchClass(editor_id+'_unlink',anchorLink?'mceButtonSelected':'mceButtonNormal');}tinyMCE.switchClass(editor_id+'_visualaid',visual_aid?'mceButtonSelected':'mceButtonNormal');if(undo_levels!=-1){tinyMCE.switchClass(editor_id+'_undo','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_redo','mceButtonDisabled');}if(tinyMCE.getParentElement(node,"li,blockquote"))tinyMCE.switchClass(editor_id+'_outdent','mceButtonNormal');if(undo_index!=-1&&(undo_index0))tinyMCE.switchClass(editor_id+'_redo','mceButtonNormal');if(undo_index!=-1&&(undo_index>0&&undo_levels>0))tinyMCE.switchClass(editor_id+'_undo','mceButtonNormal');var selectElm=document.getElementById(editor_id+"_styleSelect");if(selectElm){TinyMCE_AdvancedTheme._setupCSSClasses(editor_id);classNode=node;breakOut=false;var index=0;do{if(classNode&&classNode.className){for(var i=0;i");else selectByValue(selectElm,"");}var selectElm=document.getElementById(editor_id+"_fontNameSelect");if(selectElm){if(!tinyMCE.isSafari&&!(tinyMCE.isMSIE&&!tinyMCE.isOpera)){var face=inst.queryCommandValue('FontName');face=face==null||face==""?"":face;selectByValue(selectElm,face,face!="");}else{var elm=tinyMCE.getParentElement(node,"font","face");if(elm){var family=tinyMCE.getAttrib(elm,"face");if(family=='')family=''+elm.style.fontFamily;if(!selectByValue(selectElm,family,family!=""))selectByValue(selectElm,"");}else selectByValue(selectElm,"");}}var selectElm=document.getElementById(editor_id+"_fontSizeSelect");if(selectElm){if(!tinyMCE.isSafari&&!tinyMCE.isOpera){var size=inst.queryCommandValue('FontSize');selectByValue(selectElm,size==null||size==""?"0":size);}else{var elm=tinyMCE.getParentElement(node,"font","size");if(elm){var size=tinyMCE.getAttrib(elm,"size");if(size==''){var sizes=new Array('','8px','10px','12px','14px','18px','24px','36px');size=''+elm.style.fontSize;for(var i=0;i0)selectElm.setAttribute('cssImported','true');}},_setCookie:function(name,value,expires,path,domain,secure){var curCookie=name+"="+escape(value)+((expires)?"; expires="+expires.toGMTString():"")+((path)?"; path="+escape(path):"")+((domain)?"; domain="+domain:"")+((secure)?"; secure":"");document.cookie=curCookie;},_getCookie:function(name){var dc=document.cookie;var prefix=name+"=";var begin=dc.indexOf("; "+prefix);if(begin==-1){begin=dc.indexOf(prefix);if(begin!=0)return null;}else begin+=2;var end=document.cookie.indexOf(";",begin);if(end==-1)end=dc.length;return unescape(dc.substring(begin+prefix.length,end));},_resizeTo:function(inst,w,h,set_w){var editorContainer=document.getElementById(inst.editorId+'_parent');var tableElm=editorContainer.firstChild;var iframe=inst.iframeElement;if(w==null||w=="null"){set_w=false;w=0;}if(h==null||h=="null")return;w=parseInt(w);h=parseInt(h);if(tinyMCE.isGecko){w+=2;h+=2;}var dx=w-tableElm.clientWidth;var dy=h-tableElm.clientHeight;w=w<1?30:w;h=h<1?30:h;if(set_w)tableElm.style.width=w+"px";tableElm.style.height=h+"px";iw=iframe.clientWidth+dx;ih=iframe.clientHeight+dy;iw=iw<1?30:iw;ih=ih<1?30:ih;if(tinyMCE.isGecko){iw-=2;ih-=2;}if(set_w)iframe.style.width=iw+"px";iframe.style.height=ih+"px";if(set_w){var tableBodyElm=tableElm.firstChild;var minIframeWidth=tableBodyElm.scrollWidth;if(inst.iframeElement.clientWidth';tinyMCE.execCommand("mceInsertContent",false,html);}else{if(!tinyMCE.imgElement&&tinyMCE.selectedInstance){if(tinyMCE.isSafari)tinyMCE.execCommand("mceInsertContent",false,'');else tinyMCE.selectedInstance.contentDocument.execCommand("insertimage",false,tinyMCE.uniqueURL);tinyMCE.imgElement=tinyMCE.getElementByAttributeValue(tinyMCE.selectedInstance.contentDocument.body,"img","src",tinyMCE.uniqueURL);}}if(tinyMCE.imgElement){var needsRepaint=false;var msrc=src;src=eval(tinyMCE.settings['urlconverter_callback']+"(src, tinyMCE.imgElement);");if(tinyMCE.getParam('convert_urls'))msrc=src;if(onmouseover&&onmouseover!="")onmouseover="this.src='"+eval(tinyMCE.settings['urlconverter_callback']+"(onmouseover, tinyMCE.imgElement);")+"';";if(onmouseout&&onmouseout!="")onmouseout="this.src='"+eval(tinyMCE.settings['urlconverter_callback']+"(onmouseout, tinyMCE.imgElement);")+"';";if(typeof(title)=="undefined")title=alt;if(width!=tinyMCE.imgElement.getAttribute("width")||height!=tinyMCE.imgElement.getAttribute("height")||align!=tinyMCE.imgElement.getAttribute("align"))needsRepaint=true;tinyMCE.setAttrib(tinyMCE.imgElement,'src',src);tinyMCE.setAttrib(tinyMCE.imgElement,'mce_src',msrc);tinyMCE.setAttrib(tinyMCE.imgElement,'alt',alt);tinyMCE.setAttrib(tinyMCE.imgElement,'title',title);tinyMCE.setAttrib(tinyMCE.imgElement,'align',align);tinyMCE.setAttrib(tinyMCE.imgElement,'border',border,true);tinyMCE.setAttrib(tinyMCE.imgElement,'hspace',hspace,true);tinyMCE.setAttrib(tinyMCE.imgElement,'vspace',vspace,true);tinyMCE.setAttrib(tinyMCE.imgElement,'width',width,true);tinyMCE.setAttrib(tinyMCE.imgElement,'height',height,true);tinyMCE.setAttrib(tinyMCE.imgElement,'onmouseover',onmouseover);tinyMCE.setAttrib(tinyMCE.imgElement,'onmouseout',onmouseout);if(width&&width!="")tinyMCE.imgElement.style.pixelWidth=width;if(height&&height!="")tinyMCE.imgElement.style.pixelHeight=height;if(needsRepaint)tinyMCE.selectedInstance.repaint();}tinyMCE.execCommand('mceEndUndoLevel');},_insertLink:function(href,target,title,onclick,style_class){tinyMCE.execCommand('mceBeginUndoLevel');if(tinyMCE.selectedInstance&&tinyMCE.selectedElement&&tinyMCE.selectedElement.nodeName.toLowerCase()=="img"){var doc=tinyMCE.selectedInstance.getDoc();var linkElement=tinyMCE.getParentElement(tinyMCE.selectedElement,"a");var newLink=false;if(!linkElement){linkElement=doc.createElement("a");newLink=true;}var mhref=href;var thref=eval(tinyMCE.settings['urlconverter_callback']+"(href, linkElement);");mhref=tinyMCE.getParam('convert_urls')?href:mhref;tinyMCE.setAttrib(linkElement,'href',thref);tinyMCE.setAttrib(linkElement,'mce_href',mhref);tinyMCE.setAttrib(linkElement,'target',target);tinyMCE.setAttrib(linkElement,'title',title);tinyMCE.setAttrib(linkElement,'onclick',onclick);tinyMCE.setAttrib(linkElement,'class',style_class);if(newLink){linkElement.appendChild(tinyMCE.selectedElement.cloneNode(true));tinyMCE.selectedElement.parentNode.replaceChild(linkElement,tinyMCE.selectedElement);}return;}if(!tinyMCE.linkElement&&tinyMCE.selectedInstance){if(tinyMCE.isSafari){tinyMCE.execCommand("mceInsertContent",false,''+tinyMCE.selectedInstance.selection.getSelectedHTML()+'');}else tinyMCE.selectedInstance.contentDocument.execCommand("createlink",false,tinyMCE.uniqueURL);tinyMCE.linkElement=tinyMCE.getElementByAttributeValue(tinyMCE.selectedInstance.contentDocument.body,"a","href",tinyMCE.uniqueURL);var elementArray=tinyMCE.getElementsByAttributeValue(tinyMCE.selectedInstance.contentDocument.body,"a","href",tinyMCE.uniqueURL);for(var i=0;i 4 ? but[4] : false) + (but.length > 5 ? ',\'' + but[5] + '\'' : '') + ')'; - return ''; - } - } - } + // Lookup button in button list + for (i=0; i 4 ? but[4] : false) + (but.length > 5 ? ',\'' + but[5] + '\'' : '') + ')'; - return ''; + if (but[0] == button_name) + return tinyMCE.getButtonHTML(but[0], but[2], '{$themeurl}/images/' + but[1], but[3], (but.length > 4 ? but[4] : false), (but.length > 5 ? but[5] : null)); } - } - // Custom controlls other than buttons - switch (button_name) - { - case "formatselect": - var html = ''; + var formats = tinyMCE.getParam("theme_advanced_blockformats", "p,address,pre,h1,h2,h3,h4,h5,h6", true).split(','); + var lookup = [ + ['p', '{$lang_theme_paragraph}'], + ['address', '{$lang_theme_address}'], + ['pre', '{$lang_theme_pre}'], + ['h1', '{$lang_theme_h1}'], + ['h2', '{$lang_theme_h2}'], + ['h3', '{$lang_theme_h3}'], + ['h4', '{$lang_theme_h4}'], + ['h5', '{$lang_theme_h5}'], + ['h6', '{$lang_theme_h6}'] + ]; - html += ''; + html += ''; - // Build format select - for (var i=0; i">' + lookup[x][1] + ''; + // Build format select + for (var i=0; i">' + lookup[x][1] + ''; } } - } - html += ''; - //formatselect - return html; + html += ''; - case "styleselect": - //styleselect - return ''; + return html; - case "fontselect": - var fontHTML = '{$style_select_options}'; + + case "fontselect": + var fontHTML = ''; - return fontHTML; + fontHTML += ''; + return fontHTML; - case "fontsizeselect": - //fontsizeselect - return ''; + case "fontsizeselect": + return ''; - case "|": - case "separator": - return ''; + case "|": + case "separator": + return ''; - case "spacer": - return ''; + case "spacer": + return ''; - case "rowseparator": - return '
    '; - } + case "rowseparator": + return '
    '; + } - return ""; -} + return ""; + }, -/** - * Theme specific exec command handeling. - */ -function TinyMCE_advanced_execCommand(editor_id, element, command, user_interface, value) -{ - switch (command) - { - case "mceForeColor": - var template = new Array(); - var elm = tinyMCE.selectedInstance.getFocusElement(); - var inputColor = tinyMCE.getAttrib(elm, "color"); + /** + * Theme specific execcommand handling. + */ + execCommand : function(editor_id, element, command, user_interface, value) { + switch (command) { + case "mceLink": + var inst = tinyMCE.getInstanceById(editor_id); + var doc = inst.getDoc(); + var selectedText = ""; - if (inputColor == '') - inputColor = elm.style.color; + if (tinyMCE.isMSIE) { + var rng = doc.selection.createRange(); + selectedText = rng.text; + } else + selectedText = inst.getSel().toString(); - if (!inputColor) - inputColor = "#000000"; + if (!tinyMCE.linkElement) { + if ((tinyMCE.selectedElement.nodeName.toLowerCase() != "img") && (selectedText.length <= 0)) + return true; + } - template['file'] = 'color_picker.htm'; - template['width'] = 220; - template['height'] = 190; + var href = "", target = "", title = "", onclick = "", action = "insert", style_class = ""; - tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes", command : "forecolor", input_color : inputColor}); - return true; + if (tinyMCE.selectedElement.nodeName.toLowerCase() == "a") + tinyMCE.linkElement = tinyMCE.selectedElement; - case "mceBackColor": - var template = new Array(); - var elm = tinyMCE.selectedInstance.getFocusElement(); - var inputColor = elm.style.backgroundColor; + // Is anchor not a link + if (tinyMCE.linkElement != null && tinyMCE.getAttrib(tinyMCE.linkElement, 'href') == "") + tinyMCE.linkElement = null; - if (!inputColor) - inputColor = "#000000"; + if (tinyMCE.linkElement) { + href = tinyMCE.getAttrib(tinyMCE.linkElement, 'href'); + target = tinyMCE.getAttrib(tinyMCE.linkElement, 'target'); + title = tinyMCE.getAttrib(tinyMCE.linkElement, 'title'); + onclick = tinyMCE.getAttrib(tinyMCE.linkElement, 'onclick'); + style_class = tinyMCE.getAttrib(tinyMCE.linkElement, 'class'); - template['file'] = 'color_picker.htm'; - template['width'] = 220; - template['height'] = 190; + // Try old onclick to if copy/pasted content + if (onclick == "") + onclick = tinyMCE.getAttrib(tinyMCE.linkElement, 'onclick'); - template['width'] += tinyMCE.getLang('lang_theme_advanced_backcolor_delta_width', 0); - template['height'] += tinyMCE.getLang('lang_theme_advanced_backcolor_delta_height', 0); + onclick = tinyMCE.cleanupEventStr(onclick); - tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes", command : "HiliteColor", input_color : inputColor}); - //mceBackColor - return true; + href = eval(tinyMCE.settings['urlconverter_callback'] + "(href, tinyMCE.linkElement, true);"); + + // Use mce_href if defined + mceRealHref = tinyMCE.getAttrib(tinyMCE.linkElement, 'mce_href'); + if (mceRealHref != "") { + href = mceRealHref; + + if (tinyMCE.getParam('convert_urls')) + href = eval(tinyMCE.settings['urlconverter_callback'] + "(href, tinyMCE.linkElement, true);"); + } + + action = "update"; + } - case "mceColorPicker": - if (user_interface) { var template = new Array(); - var inputColor = value['document'].getElementById(value['element_id']).value; + + template['file'] = 'link.htm'; + template['width'] = 310; + template['height'] = 200; + + // Language specific width and height addons + template['width'] += tinyMCE.getLang('lang_insert_link_delta_width', 0); + template['height'] += tinyMCE.getLang('lang_insert_link_delta_height', 0); + + if (inst.settings['insertlink_callback']) { + var returnVal = eval(inst.settings['insertlink_callback'] + "(href, target, title, onclick, action, style_class);"); + if (returnVal && returnVal['href']) + TinyMCE_AdvancedTheme._insertLink(returnVal['href'], returnVal['target'], returnVal['title'], returnVal['onclick'], returnVal['style_class']); + } else { + tinyMCE.openWindow(template, {href : href, target : target, title : title, onclick : onclick, action : action, className : style_class, inline : "yes"}); + } + + return true; + + case "mceImage": + var src = "", alt = "", border = "", hspace = "", vspace = "", width = "", height = "", align = ""; + var title = "", onmouseover = "", onmouseout = "", action = "insert"; + var img = tinyMCE.imgElement; + var inst = tinyMCE.getInstanceById(editor_id); + + if (tinyMCE.selectedElement != null && tinyMCE.selectedElement.nodeName.toLowerCase() == "img") { + img = tinyMCE.selectedElement; + tinyMCE.imgElement = img; + } + + if (img) { + // Is it a internal MCE visual aid image, then skip this one. + if (tinyMCE.getAttrib(img, 'name').indexOf('mce_') == 0) + return true; + + src = tinyMCE.getAttrib(img, 'src'); + alt = tinyMCE.getAttrib(img, 'alt'); + + // Try polling out the title + if (alt == "") + alt = tinyMCE.getAttrib(img, 'title'); + + // Fix width/height attributes if the styles is specified + if (tinyMCE.isGecko) { + var w = img.style.width; + if (w != null && w != "") + img.setAttribute("width", w); + + var h = img.style.height; + if (h != null && h != "") + img.setAttribute("height", h); + } + + border = tinyMCE.getAttrib(img, 'border'); + hspace = tinyMCE.getAttrib(img, 'hspace'); + vspace = tinyMCE.getAttrib(img, 'vspace'); + width = tinyMCE.getAttrib(img, 'width'); + height = tinyMCE.getAttrib(img, 'height'); + align = tinyMCE.getAttrib(img, 'align'); + onmouseover = tinyMCE.getAttrib(img, 'onmouseover'); + onmouseout = tinyMCE.getAttrib(img, 'onmouseout'); + title = tinyMCE.getAttrib(img, 'title'); + + // Is realy specified? + if (tinyMCE.isMSIE) { + width = img.attributes['width'].specified ? width : ""; + height = img.attributes['height'].specified ? height : ""; + } + + //onmouseover = tinyMCE.getImageSrc(tinyMCE.cleanupEventStr(onmouseover)); + //onmouseout = tinyMCE.getImageSrc(tinyMCE.cleanupEventStr(onmouseout)); + + src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, img, true);"); + + // Use mce_src if defined + mceRealSrc = tinyMCE.getAttrib(img, 'mce_src'); + if (mceRealSrc != "") { + src = mceRealSrc; + + if (tinyMCE.getParam('convert_urls')) + src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, img, true);"); + } + + //if (onmouseover != "") + // onmouseover = eval(tinyMCE.settings['urlconverter_callback'] + "(onmouseover, img, true);"); + + //if (onmouseout != "") + // onmouseout = eval(tinyMCE.settings['urlconverter_callback'] + "(onmouseout, img, true);"); + + action = "update"; + } + + var template = new Array(); + + template['file'] = 'image.htm?src={$src}'; + template['width'] = 355; + template['height'] = 265 + (tinyMCE.isMSIE ? 25 : 0); + + // Language specific width and height addons + template['width'] += tinyMCE.getLang('lang_insert_image_delta_width', 0); + template['height'] += tinyMCE.getLang('lang_insert_image_delta_height', 0); + + if (inst.settings['insertimage_callback']) { + var returnVal = eval(inst.settings['insertimage_callback'] + "(src, alt, border, hspace, vspace, width, height, align, title, onmouseover, onmouseout, action);"); + if (returnVal && returnVal['src']) + TinyMCE_AdvancedTheme._insertImage(returnVal['src'], returnVal['alt'], returnVal['border'], returnVal['hspace'], returnVal['vspace'], returnVal['width'], returnVal['height'], returnVal['align'], returnVal['title'], returnVal['onmouseover'], returnVal['onmouseout']); + } else + tinyMCE.openWindow(template, {src : src, alt : alt, border : border, hspace : hspace, vspace : vspace, width : width, height : height, align : align, title : title, onmouseover : onmouseover, onmouseout : onmouseout, action : action, inline : "yes"}); + + return true; + + case "mceForeColor": + var template = new Array(); + var elm = tinyMCE.selectedInstance.getFocusElement(); + var inputColor = tinyMCE.getAttrib(elm, "color"); + + if (inputColor == '') + inputColor = elm.style.color; + + if (!inputColor) + inputColor = "#000000"; template['file'] = 'color_picker.htm'; template['width'] = 220; template['height'] = 190; - template['close_previous'] = "no"; - - template['width'] += tinyMCE.getLang('lang_theme_advanced_colorpicker_delta_width', 0); - template['height'] += tinyMCE.getLang('lang_theme_advanced_colorpicker_delta_height', 0); - - if (typeof(value['store_selection']) == "undefined") - value['store_selection'] = true; - - tinyMCE.lastColorPickerValue = value; - tinyMCE.openWindow(template, {editor_id : editor_id, mce_store_selection : value['store_selection'], inline : "yes", command : "mceColorPicker", input_color : inputColor}); - } else { - var savedVal = tinyMCE.lastColorPickerValue; - var elm = savedVal['document'].getElementById(savedVal['element_id']); - elm.value = value; - eval('elm.onchange();'); - } - return true; - - case "mceCodeEditor": - var template = new Array(); - - template['file'] = 'source_editor.htm'; - template['width'] = parseInt(tinyMCE.getParam("theme_advanced_source_editor_width", 500)); - template['height'] = parseInt(tinyMCE.getParam("theme_advanced_source_editor_height", 400)); - - tinyMCE.openWindow(template, {editor_id : editor_id, resizable : "yes", scrollbars : "no", inline : "yes"}); - //mceCodeEditor - return true; - - case "mceCharMap": - var template = new Array(); - - template['file'] = 'charmap.htm'; - template['width'] = 550 + (tinyMCE.isOpera ? 40 : 0); - template['height'] = 250; - - template['width'] += tinyMCE.getLang('lang_theme_advanced_charmap_delta_width', 0); - template['height'] += tinyMCE.getLang('lang_theme_advanced_charmap_delta_height', 0); - - tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"}); - //mceCharMap - return true; - - case "mceInsertAnchor": - var template = new Array(); - - template['file'] = 'anchor.htm'; - template['width'] = 320; - template['height'] = 90 + (tinyMCE.isNS7 ? 30 : 0); - - template['width'] += tinyMCE.getLang('lang_theme_advanced_anchor_delta_width', 0); - template['height'] += tinyMCE.getLang('lang_theme_advanced_anchor_delta_height', 0); - - tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"}); - return true; - - case "mceNewDocument": - if (confirm(tinyMCE.getLang('lang_newdocument'))) - tinyMCE.execInstanceCommand(editor_id, 'mceSetContent', false, ''); + tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes", command : "forecolor", input_color : inputColor}); return true; - } - // Default behavior - return false; -} + case "mceBackColor": + var template = new Array(); + var elm = tinyMCE.selectedInstance.getFocusElement(); + var inputColor = elm.style.backgroundColor; -/** - * Editor instance template function. - */ -function TinyMCE_advanced_getEditorTemplate(settings, editorId) -{ - function removeFromArray(in_array, remove_array) - { - var outArray = new Array(); - - for (var i=0; i 

    '; - var layoutManager = tinyMCE.getParam("theme_advanced_layout_manager", "SimpleLayout"); + template['width'] += tinyMCE.getLang('lang_theme_advanced_charmap_delta_width', 0); + template['height'] += tinyMCE.getLang('lang_theme_advanced_charmap_delta_height', 0); - // Setup style select options -- MOVED UP FOR EXTERNAL TOOLBAR COMPATABILITY! - var styleSelectHTML = ''; - if (settings['theme_advanced_styles']) { - var stylesAr = settings['theme_advanced_styles'].split(';'); - - for (var i=0; i' + key + ''; - } + template['file'] = 'anchor.htm'; + template['width'] = 320; + template['height'] = 90 + (tinyMCE.isNS7 ? 30 : 0); - TinyMCE_advanced_autoImportCSSClasses = false; - } + template['width'] += tinyMCE.getLang('lang_theme_advanced_anchor_delta_width', 0); + template['height'] += tinyMCE.getLang('lang_theme_advanced_anchor_delta_height', 0); - switch(layoutManager) { - case "SimpleLayout" : //the default TinyMCE Layout (for backwards compatibility)... - var toolbarHTML = ""; - var toolbarLocation = tinyMCE.getParam("theme_advanced_toolbar_location", "bottom"); - var toolbarAlign = tinyMCE.getParam("theme_advanced_toolbar_align", "center"); - var pathLocation = tinyMCE.getParam("theme_advanced_path_location", "none"); // Compatiblity - var statusbarLocation = tinyMCE.getParam("theme_advanced_statusbar_location", pathLocation); - var defVals = { - theme_advanced_buttons1 : "bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,styleselect,formatselect", - theme_advanced_buttons2 : "bullist,numlist,separator,outdent,indent,separator,undo,redo,separator,link,unlink,anchor,image,cleanup,help,code", - theme_advanced_buttons3 : "hr,removeformat,visualaid,separator,sub,sup,separator,charmap" - }; + tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"}); + return true; - // Add accessibility control - toolbarHTML += ''; + case "mceNewDocument": + if (confirm(tinyMCE.getLang('lang_newdocument'))) + tinyMCE.execInstanceCommand(editor_id, 'mceSetContent', false, ' '); - // Render rows - for (var i=1; i<100; i++) { - var def = defVals["theme_advanced_buttons" + i]; - - var buttons = tinyMCE.getParam("theme_advanced_buttons" + i, def == null ? '' : def, true, ','); - if (buttons.length == 0) - break; - - buttons = removeFromArray(buttons, tinyMCE.getParam("theme_advanced_disable", "", true, ',')); - buttons = addToArray(buttons, tinyMCE.getParam("theme_advanced_buttons" + i + "_add", "", true, ',')); - buttons = addToArray(tinyMCE.getParam("theme_advanced_buttons" + i + "_add_before", "", true, ','), buttons); - - for (var b=0; b 0) { - toolbarHTML += "
    "; - deltaHeight -= 23; - } - } - - // Add accessibility control - toolbarHTML += ''; - - // Setup template html - template['html'] = ''; - - if (toolbarLocation == "top") - { - template['html'] += ''; - } - - if (statusbarLocation == "top") - { - template['html'] += ''; - deltaHeight -= 23; - } - - template['html'] += ''; - - if (toolbarLocation == "bottom") - { - template['html'] += ''; - } - - // External toolbar changes - if (toolbarLocation == "external") - { - var bod = document.body; - var elm = document.createElement ("div"); - - toolbarHTML = tinyMCE.replaceVars(toolbarHTML, tinyMCE.settings); - toolbarHTML = tinyMCE.replaceVars(toolbarHTML, tinyMCELang); - toolbarHTML = tinyMCE.replaceVar(toolbarHTML, 'style_select_options', styleSelectHTML); - toolbarHTML = tinyMCE.replaceVar(toolbarHTML, "editor_id", editorId); - toolbarHTML = tinyMCE.applyTemplate(toolbarHTML); - - elm.className = "mceToolbarExternal"; - elm.id = editorId+"_toolbar"; - elm.innerHTML = '
    ' + toolbarHTML + '
    ' + statusbarHTML + '
    ' + toolbarHTML + '
    '+toolbarHTML+'
    '; - bod.appendChild (elm); - // bod.style.marginTop = elm.offsetHeight + "px"; - - deltaHeight = 0; - tinyMCE.getInstanceById(editorId).toolbarElement = elm; - - //template['html'] = '
    '+toolbarHTML+'
    ' + template["html"]; - } - else - { - tinyMCE.getInstanceById(editorId).toolbarElement = null; - } - - if (statusbarLocation == "bottom") - { - template['html'] += '' + statusbarHTML + ''; - deltaHeight -= 23; - } - - template['html'] += ''; - //"SimpleLayout" - break; - - case "RowLayout" : //Container Layout - containers defined in "theme_advanced_containers" are rendered from top to bottom. - template['html'] = ''; - - var containers = tinyMCE.getParam("theme_advanced_containers", "", true, ","); - var defaultContainerCSS = tinyMCE.getParam("theme_advanced_containers_default_class", "container"); - var defaultContainerAlign = tinyMCE.getParam("theme_advanced_containers_default_align", "center"); - - //Render Containers: - for (var i = 0; i < containers.length; i++) - { - if (containers[i] == "mceEditor") //Exceptions for mceEditor and ... - { - template['html'] += ''; - } - else if (containers[i] == "mceElementpath" || containers[i] == "mceStatusbar") // ... mceElementpath: - { - var pathClass = "mceStatusbar"; - - if (i == containers.length-1) - { - pathClass = "mceStatusbarBottom"; - } - else if (i == 0) - { - pathClass = "mceStatusbar"; - } - else - { - deltaHeight-=2; - } - - template['html'] += ''; - deltaHeight -= 22; - } - else //Render normal Container: - { - var curContainer = tinyMCE.getParam("theme_advanced_container_"+containers[i], "", true, ','); - var curContainerHTML = ""; - var curAlign = tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_align", defaultContainerAlign); - var curCSS = tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_class", defaultContainerCSS); - - for (var j=0; j 0) - { - curContainerHTML += "
    "; - deltaHeight -= 23; - } - - template['html'] += '
    '; - } - } - - template['html'] += '
    \ - \ -
    ' + statusbarHTML + '
    ' + curContainerHTML + '
    '; - //RowLayout - break; - - case "BorderLayout" : //will be like java.awt.BorderLayout of SUN Java... - // Not implemented yet... - break; - - case "CustomLayout" : //User defined layout callback... - var customLayout = tinyMCE.getParam("theme_advanced_custom_layout",""); - - if (customLayout != "" && eval("typeof(" + customLayout + ")") != "undefined") - { - template = eval(customLayout + "(template);"); - } - break; - - default: - alert('UNDEFINED LAYOUT MANAGER! PLEASE CHECK YOUR TINYMCE CONFIG!'); - //CustomLayout - break; - } - - if (resizing) - template['html'] += ''; - - template['html'] = tinyMCE.replaceVar(template['html'], 'style_select_options', styleSelectHTML); - template['delta_width'] = 0; - template['delta_height'] = deltaHeight; - - return template; -} - -/** - * Starts/stops the editor resizing. - */ -function TinyMCE_advanced_setResizing(e, editor_id, state) { - e = typeof(e) == "undefined" ? window.event : e; - - var resizer = TinyMCE_advanced_resizer; - var editorContainer = document.getElementById(editor_id + '_parent'); - var editorArea = document.getElementById(editor_id + '_parent').firstChild; - var resizeBox = document.getElementById(editor_id + '_resize_box'); - var inst = tinyMCE.getInstanceById(editor_id); - - if (state) { - // Place box over editor area - var width = editorArea.clientWidth; - var height = editorArea.clientHeight; - - resizeBox.style.width = width + "px"; - resizeBox.style.height = height + "px"; - - resizer.iframeWidth = inst.iframeElement.clientWidth; - resizer.iframeHeight = inst.iframeElement.clientHeight; - - // Hide editor and show resize box - editorArea.style.display = "none"; - resizeBox.style.display = "block"; - - // Add event handlers, only once - if (!resizer.eventHandlers) { - if (tinyMCE.isMSIE) - tinyMCE.addEvent(document, "mousemove", TinyMCE_advanced_resizeEventHandler); - else - tinyMCE.addEvent(window, "mousemove", TinyMCE_advanced_resizeEventHandler); - - tinyMCE.addEvent(document, "mouseup", TinyMCE_advanced_resizeEventHandler); - - resizer.eventHandlers = true; - } - - resizer.resizing = true; - resizer.downX = e.screenX; - resizer.downY = e.screenY; - resizer.width = parseInt(resizeBox.style.width); - resizer.height = parseInt(resizeBox.style.height); - resizer.editorId = editor_id; - resizer.resizeBox = resizeBox; - resizer.horizontal = tinyMCE.getParam("theme_advanced_resize_horizontal", true); - } else { - resizer.resizing = false; - resizeBox.style.display = "none"; - editorArea.style.display = tinyMCE.isMSIE ? "block" : "table"; - tinyMCE.execCommand('mceResetDesignMode'); - } -} - -function TinyMCE_advanced_initInstance(inst) { - if (tinyMCE.getParam("theme_advanced_resizing", false)) { - if (tinyMCE.getParam("theme_advanced_resizing_use_cookie", true)) { - var w = TinyMCE_advanced_getCookie("TinyMCE_" + inst.editorId + "_width"); - var h = TinyMCE_advanced_getCookie("TinyMCE_" + inst.editorId + "_height"); - - TinyMCE_advanced_resizeTo(inst, w, h, tinyMCE.getParam("theme_advanced_resize_horizontal", true)); - } - } -} - -function TinyMCE_advanced_setCookie(name, value, expires, path, domain, secure) { - var curCookie = name + "=" + escape(value) + - ((expires) ? "; expires=" + expires.toGMTString() : "") + - ((path) ? "; path=" + escape(path) : "") + - ((domain) ? "; domain=" + domain : "") + - ((secure) ? "; secure" : ""); - - document.cookie = curCookie; -} - -function TinyMCE_advanced_getCookie(name) { - var dc = document.cookie; - var prefix = name + "="; - var begin = dc.indexOf("; " + prefix); - - if (begin == -1) { - begin = dc.indexOf(prefix); - - if (begin != 0) - return null; - } else - begin += 2; - - var end = document.cookie.indexOf(";", begin); - - if (end == -1) - end = dc.length; - - return unescape(dc.substring(begin + prefix.length, end)); -} - -function TinyMCE_advanced_resizeTo(inst, w, h, set_w) { - var editorContainer = document.getElementById(inst.editorId + '_parent'); - var tableElm = editorContainer.firstChild; - var iframe = inst.iframeElement; - - if (w == null || w == "null") { - set_w = false; - w = 0; - } - - if (h == null || h == "null") - return; - - w = parseInt(w); - h = parseInt(h); - - if (tinyMCE.isGecko) { - w += 2; - h += 2; - } - - var dx = w - tableElm.clientWidth; - var dy = h - tableElm.clientHeight; - - w = w < 1 ? 30 : w; - h = h < 1 ? 30 : h; - - if (set_w) - tableElm.style.width = w + "px"; - - tableElm.style.height = h + "px"; - - iw = iframe.clientWidth + dx; - ih = iframe.clientHeight + dy; - - iw = iw < 1 ? 30 : iw; - ih = ih < 1 ? 30 : ih; - - if (tinyMCE.isGecko) { - iw -= 2; - ih -= 2; - } - - if (set_w) - iframe.style.width = iw + "px"; - - iframe.style.height = ih + "px"; - - // Is it to small, make it bigger again - if (set_w) { - var tableBodyElm = tableElm.firstChild; - var minIframeWidth = tableBodyElm.scrollWidth; - if (inst.iframeElement.clientWidth < minIframeWidth) { - dx = minIframeWidth - inst.iframeElement.clientWidth; - - inst.iframeElement.style.width = (iw + dx) + "px"; - } - } -} - -/** - * Handles resizing events. - */ -function TinyMCE_advanced_resizeEventHandler(e) { - var resizer = TinyMCE_advanced_resizer; - - // Do nothing - if (!resizer.resizing) - return; - - e = typeof(e) == "undefined" ? window.event : e; - - var dx = e.screenX - resizer.downX; - var dy = e.screenY - resizer.downY; - var resizeBox = resizer.resizeBox; - var editorId = resizer.editorId; - - switch (e.type) { - case "mousemove": - var w, h; - - w = resizer.width + dx; - h = resizer.height + dy; - - w = w < 1 ? 1 : w; - h = h < 1 ? 1 : h; - - if (resizer.horizontal) - resizeBox.style.width = w + "px"; - - resizeBox.style.height = h + "px"; - break; - - case "mouseup": - TinyMCE_advanced_setResizing(e, editorId, false); - TinyMCE_advanced_resizeTo(tinyMCE.getInstanceById(editorId), resizer.width + dx, resizer.height + dy, resizer.horizontal); - - // Expire in a month - if (tinyMCE.getParam("theme_advanced_resizing_use_cookie", true)) { - var expires = new Date(); - expires.setTime(expires.getTime() + 3600000 * 24 * 30); - - // Set the cookies - TinyMCE_advanced_setCookie("TinyMCE_" + editorId + "_width", "" + (resizer.horizontal ? resizer.width + dx : ""), expires); - TinyMCE_advanced_setCookie("TinyMCE_" + editorId + "_height", "" + (resizer.height + dy), expires); - } - break; - } -} - -/** - * Insert link template function. - */ -function TinyMCE_advanced_getInsertLinkTemplate() -{ - var template = new Array(); - - template['file'] = 'link.htm'; - template['width'] = 330; - template['height'] = 170 + (tinyMCE.isMSIE ? 25 : 0); - - // Language specific width and height addons - template['width'] += tinyMCE.getLang('lang_insert_link_delta_width', 0); - template['height'] += tinyMCE.getLang('lang_insert_link_delta_height', 0); - - return template; -}; - -/** - * Insert image template function. - */ -function TinyMCE_advanced_getInsertImageTemplate() { - var template = new Array(); - - template['file'] = 'image.htm?src={$src}'; - template['width'] = 340; - template['height'] = 250 + (tinyMCE.isMSIE ? 25 : 0); - - // Language specific width and height addons - template['width'] += tinyMCE.getLang('lang_insert_image_delta_width', 0); - template['height'] += tinyMCE.getLang('lang_insert_image_delta_height', 0); - - return template; -}; - -/** - * Node change handler. - */ -function TinyMCE_advanced_handleNodeChange(editor_id, node, undo_index, undo_levels, visual_aid, any_selection, setup_content) { - function selectByValue(select_elm, value, first_index) { - first_index = typeof(first_index) == "undefined" ? false : true; - - if (select_elm) { - for (var i=0; i=0; i--) { - var nodeName = path[i].nodeName.toLowerCase(); - var nodeData = ""; - - if (nodeName == "b") { - nodeName = "strong"; - } - - if (nodeName == "i") { - nodeName = "em"; - } - - if (nodeName == "span") { - var cn = tinyMCE.getAttrib(path[i], "class"); - if (cn != "" && cn.indexOf('mceItem') == -1) - nodeData += "class: " + cn + " "; - - var st = tinyMCE.getAttrib(path[i], "style"); - if (st != "") { - st = tinyMCE.serializeStyle(tinyMCE.parseStyle(st)); - nodeData += "style: " + st + " "; + if (!skip) { + outArray[outArray.length] = in_array[i]; } } - if (nodeName == "font") { - if (tinyMCE.getParam("convert_fonts_to_spans")) - nodeName = "span"; - - var face = tinyMCE.getAttrib(path[i], "face"); - if (face != "") - nodeData += "font: " + face + " "; - - var size = tinyMCE.getAttrib(path[i], "size"); - if (size != "") - nodeData += "size: " + size + " "; - - var color = tinyMCE.getAttrib(path[i], "color"); - if (color != "") - nodeData += "color: " + color + " "; - } - - if (getAttrib(path[i], 'id') != "") { - nodeData += "id: " + path[i].getAttribute('id') + " "; - } - - var className = tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i], "class"), false); - if (className != "" && className.indexOf('mceItem') == -1) - nodeData += "class: " + className + " "; - - if (getAttrib(path[i], 'src') != "") { - var src = tinyMCE.getAttrib(path[i], "mce_src"); - - if (src == "") - src = tinyMCE.getAttrib(path[i], "src"); - - nodeData += "src: " + src + " "; - } - - if (getAttrib(path[i], 'href') != "") { - var href = tinyMCE.getAttrib(path[i], "mce_href"); - - if (href == "") - href = tinyMCE.getAttrib(path[i], "href"); - - nodeData += "href: " + href + " "; - } - - if (nodeName == "img" && tinyMCE.getAttrib(path[i], "class").indexOf('mceItemFlash') != -1) { - nodeName = "flash"; - nodeData = "src: " + path[i].getAttribute('title'); - } - - if (nodeName == "a" && (anchor = tinyMCE.getAttrib(path[i], "name")) != "") { - nodeName = "a"; - nodeName += "#" + anchor; - nodeData = ""; - } - - if (getAttrib(path[i], 'name').indexOf("mce_") != 0) { - var className = tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i], "class"), false); - if (className != "" && className.indexOf('mceItem') == -1) { - nodeName += "." + className; - } - } - - var cmd = 'tinyMCE.execInstanceCommand(\'' + editor_id + '\',\'mceSelectNodeDepth\',false,\'' + i + '\');'; - html += '' + nodeName + ''; - - if (i > 0) { - html += " » "; - } + return outArray; } - pathElm.innerHTML = '' + tinyMCE.getLang('lang_theme_path') + ": " + html + ' '; - } + function addToArray(in_array, add_array) { + for (var i=0; i 

    '; + var layoutManager = tinyMCE.getParam("theme_advanced_layout_manager", "SimpleLayout"); - // Get link - var anchorLink = tinyMCE.getParentElement(node, "a", "href"); + // Setup style select options -- MOVED UP FOR EXTERNAL TOOLBAR COMPATABILITY! + var styleSelectHTML = ''; + if (settings['theme_advanced_styles']) { + var stylesAr = settings['theme_advanced_styles'].split(';'); + + for (var i=0; i' + key + ''; + } - if (undo_levels != -1) - { - tinyMCE.switchClassSticky(editor_id + '_undo', 'mceButtonDisabled', true); - tinyMCE.switchClassSticky(editor_id + '_redo', 'mceButtonDisabled', true); - } + TinyMCE_AdvancedTheme._autoImportCSSClasses = false; + } - // Within li, blockquote - if (tinyMCE.getParentElement(node, "li,blockquote")) - { - tinyMCE.switchClassSticky(editor_id + '_outdent', 'mceButtonNormal', false); - } + switch(layoutManager) { + case "SimpleLayout" : //the default TinyMCE Layout (for backwards compatibility)... + var toolbarHTML = ""; + var toolbarLocation = tinyMCE.getParam("theme_advanced_toolbar_location", "bottom"); + var toolbarAlign = tinyMCE.getParam("theme_advanced_toolbar_align", "center"); + var pathLocation = tinyMCE.getParam("theme_advanced_path_location", "none"); // Compatiblity + var statusbarLocation = tinyMCE.getParam("theme_advanced_statusbar_location", pathLocation); + var defVals = { + theme_advanced_buttons1 : "bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,styleselect,formatselect", + theme_advanced_buttons2 : "bullist,numlist,separator,outdent,indent,separator,undo,redo,separator,link,unlink,anchor,image,cleanup,help,code", + theme_advanced_buttons3 : "hr,removeformat,visualaid,separator,sub,sup,separator,charmap" + }; - // Has redo levels - if (undo_index != -1 && (undo_index < undo_levels-1 && undo_levels > 0)) - { - tinyMCE.switchClassSticky(editor_id + '_redo', 'mceButtonNormal', false); - } + // Add accessibility control + toolbarHTML += ' 0 && undo_levels > 0)) - { - tinyMCE.switchClassSticky(editor_id + '_undo', 'mceButtonNormal', false); - } + if (!tinyMCE.getParam("accessibility_focus")) + toolbarHTML += ' onfocus="tinyMCE.getInstanceById(\'' + editorId + '\').getWin().focus();"'; - // Select class in select box - var selectElm = document.getElementById(editor_id + "_styleSelect"); - - if (selectElm) - { - TinyMCE_advanced_setupCSSClasses(editor_id); + toolbarHTML += '>'; - classNode = node; - breakOut = false; - var index = 0; + // Render rows + for (var i=1; i<100; i++) { + var def = defVals["theme_advanced_buttons" + i]; - do - { - if (classNode && classNode.className) - { - for (var i=0; i 0) { + toolbarHTML += "
    "; + deltaHeight -= 23; + } + } + + // Add accessibility control + toolbarHTML += ''; + + // Setup template html + template['html'] = ''; + + if (toolbarLocation == "top") { + template['html'] += ''; + } + + if (statusbarLocation == "top") { + template['html'] += ''; + deltaHeight -= 23; + } + + template['html'] += ''; + + if (toolbarLocation == "bottom") { + template['html'] += ''; + } + + // External toolbar changes + if (toolbarLocation == "external") { + var bod = document.body; + var elm = document.createElement ("div"); + + toolbarHTML = tinyMCE.replaceVar(toolbarHTML, 'style_select_options', styleSelectHTML); + toolbarHTML = tinyMCE.applyTemplate(toolbarHTML, {editor_id : editorId}); + + elm.className = "mceToolbarExternal"; + elm.id = editorId+"_toolbar"; + elm.innerHTML = '
    ' + toolbarHTML + '
    ' + statusbarHTML + '
    ' + toolbarHTML + '
    '+toolbarHTML+'
    '; + bod.appendChild (elm); + // bod.style.marginTop = elm.offsetHeight + "px"; + + deltaHeight = 0; + tinyMCE.getInstanceById(editorId).toolbarElement = elm; + + //template['html'] = '
    '+toolbarHTML+'
    ' + template["html"]; + } else { + tinyMCE.getInstanceById(editorId).toolbarElement = null; + } + + if (statusbarLocation == "bottom") { + template['html'] += '' + statusbarHTML + ''; + deltaHeight -= 23; + } + + template['html'] += ''; + //"SimpleLayout" + break; + + case "RowLayout" : //Container Layout - containers defined in "theme_advanced_containers" are rendered from top to bottom. + template['html'] = ''; + + var containers = tinyMCE.getParam("theme_advanced_containers", "", true, ","); + var defaultContainerCSS = tinyMCE.getParam("theme_advanced_containers_default_class", "container"); + var defaultContainerAlign = tinyMCE.getParam("theme_advanced_containers_default_align", "center"); + + //Render Containers: + for (var i = 0; i < containers.length; i++) + { + if (containers[i] == "mceEditor") //Exceptions for mceEditor and ... + { + template['html'] += ''; + } + else if (containers[i] == "mceElementpath" || containers[i] == "mceStatusbar") // ... mceElementpath: + { + var pathClass = "mceStatusbar"; + + if (i == containers.length-1) + { + pathClass = "mceStatusbarBottom"; + } + else if (i == 0) + { + pathClass = "mceStatusbar"; + } + else + { + deltaHeight-=2; + } + + template['html'] += ''; + deltaHeight -= 22; + } else { // Render normal Container + var curContainer = tinyMCE.getParam("theme_advanced_container_"+containers[i], "", true, ','); + var curContainerHTML = ""; + var curAlign = tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_align", defaultContainerAlign); + var curCSS = tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_class", defaultContainerCSS); + + for (var j=0; j 0) { + curContainerHTML += "
    "; + deltaHeight -= 23; + } + + template['html'] += '
    '; + } + } + + template['html'] += '
    \ + \ +
    ' + statusbarHTML + '
    ' + curContainerHTML + '
    '; + //RowLayout + break; + + case "CustomLayout" : //User defined layout callback... + var customLayout = tinyMCE.getParam("theme_advanced_custom_layout",""); + + if (customLayout != "" && eval("typeof(" + customLayout + ")") != "undefined") { + template = eval(customLayout + "(template);"); + } + break; + } + + if (resizing) + template['html'] += ''; + + template['html'] = tinyMCE.replaceVar(template['html'], 'style_select_options', styleSelectHTML); + template['delta_width'] = 0; + template['delta_height'] = deltaHeight; + + return template; + }, + + initInstance : function(inst) { + if (tinyMCE.getParam("theme_advanced_resizing", false)) { + if (tinyMCE.getParam("theme_advanced_resizing_use_cookie", true)) { + var w = TinyMCE_AdvancedTheme._getCookie("TinyMCE_" + inst.editorId + "_width"); + var h = TinyMCE_AdvancedTheme._getCookie("TinyMCE_" + inst.editorId + "_height"); + + TinyMCE_AdvancedTheme._resizeTo(inst, w, h, tinyMCE.getParam("theme_advanced_resize_horizontal", true)); + } + } + + inst.addShortcut('ctrl', 'k', 'lang_link_desc', 'mceLink'); + }, + + /** + * Node change handler. + */ + handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection, setup_content) { + function selectByValue(select_elm, value, first_index) { + first_index = typeof(first_index) == "undefined" ? false : true; + + if (select_elm) { + for (var i=0; i"); - else - selectByValue(selectElm, ""); - } + // No node provided + if (node == null) + return; - // Select fontselect - var selectElm = document.getElementById(editor_id + "_fontNameSelect"); - if (selectElm) { - if (!tinyMCE.isSafari && !(tinyMCE.isMSIE && !tinyMCE.isOpera)) { - var face = inst.queryCommandValue('FontName'); + // Update path + var pathElm = document.getElementById(editor_id + "_path"); + var inst = tinyMCE.getInstanceById(editor_id); + var doc = inst.getDoc(); - face = face == null || face == "" ? "" : face; + if (pathElm) { + // Get node path + var parentNode = node; + var path = new Array(); + + while (parentNode != null) { + if (parentNode.nodeName.toUpperCase() == "BODY") { + break; + } - selectByValue(selectElm, face, face != ""); - } else { - var elm = tinyMCE.getParentElement(node, "font", "face"); + // Only append element nodes to path + if (parentNode.nodeType == 1 && tinyMCE.getAttrib(parentNode, "class").indexOf('mceItemHidden') == -1) { + path[path.length] = parentNode; + } - if (elm) { - var family = tinyMCE.getAttrib(elm, "face"); + parentNode = parentNode.parentNode; + } - if (family == '') - family = '' + elm.style.fontFamily; + // Setup HTML + var html = ""; + for (var i=path.length-1; i>=0; i--) { + var nodeName = path[i].nodeName.toLowerCase(); + var nodeData = ""; - if (!selectByValue(selectElm, family, family != "")) - selectByValue(selectElm, ""); - } else - selectByValue(selectElm, ""); + if (nodeName == "b") { + nodeName = "strong"; + } + + if (nodeName == "i") { + nodeName = "em"; + } + + if (nodeName == "span") { + var cn = tinyMCE.getAttrib(path[i], "class"); + if (cn != "" && cn.indexOf('mceItem') == -1) + nodeData += "class: " + cn + " "; + + var st = tinyMCE.getAttrib(path[i], "style"); + if (st != "") { + st = tinyMCE.serializeStyle(tinyMCE.parseStyle(st)); + nodeData += "style: " + st + " "; + } + } + + if (nodeName == "font") { + if (tinyMCE.getParam("convert_fonts_to_spans")) + nodeName = "span"; + + var face = tinyMCE.getAttrib(path[i], "face"); + if (face != "") + nodeData += "font: " + face + " "; + + var size = tinyMCE.getAttrib(path[i], "size"); + if (size != "") + nodeData += "size: " + size + " "; + + var color = tinyMCE.getAttrib(path[i], "color"); + if (color != "") + nodeData += "color: " + color + " "; + } + + if (getAttrib(path[i], 'id') != "") { + nodeData += "id: " + path[i].getAttribute('id') + " "; + } + + var className = tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i], "class"), false); + if (className != "" && className.indexOf('mceItem') == -1) + nodeData += "class: " + className + " "; + + if (getAttrib(path[i], 'src') != "") { + var src = tinyMCE.getAttrib(path[i], "mce_src"); + + if (src == "") + src = tinyMCE.getAttrib(path[i], "src"); + + nodeData += "src: " + src + " "; + } + + if (getAttrib(path[i], 'href') != "") { + var href = tinyMCE.getAttrib(path[i], "mce_href"); + + if (href == "") + href = tinyMCE.getAttrib(path[i], "href"); + + nodeData += "href: " + href + " "; + } + + if (nodeName == "img" && tinyMCE.getAttrib(path[i], "class").indexOf('mceItemFlash') != -1) { + nodeName = "flash"; + nodeData = "src: " + path[i].getAttribute('title'); + } + + if (nodeName == "a" && (anchor = tinyMCE.getAttrib(path[i], "name")) != "") { + nodeName = "a"; + nodeName += "#" + anchor; + nodeData = ""; + } + + if (getAttrib(path[i], 'name').indexOf("mce_") != 0) { + var className = tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i], "class"), false); + if (className != "" && className.indexOf('mceItem') == -1) { + nodeName += "." + className; + } + } + + var cmd = 'tinyMCE.execInstanceCommand(\'' + editor_id + '\',\'mceSelectNodeDepth\',false,\'' + i + '\');'; + html += '' + nodeName + ''; + + if (i > 0) { + html += " » "; + } + } + + pathElm.innerHTML = '' + tinyMCE.getLang('lang_theme_path') + ": " + html + ' '; } - } - // Select fontsize - var selectElm = document.getElementById(editor_id + "_fontSizeSelect"); - if (selectElm) { - if (!tinyMCE.isSafari && !tinyMCE.isOpera) { - var size = inst.queryCommandValue('FontSize'); - selectByValue(selectElm, size == null || size == "" ? "0" : size); - } else { - var elm = tinyMCE.getParentElement(node, "font", "size"); - if (elm) { - var size = tinyMCE.getAttrib(elm, "size"); + // Reset old states + tinyMCE.switchClass(editor_id + '_justifyleft', 'mceButtonNormal'); + tinyMCE.switchClass(editor_id + '_justifyright', 'mceButtonNormal'); + tinyMCE.switchClass(editor_id + '_justifycenter', 'mceButtonNormal'); + tinyMCE.switchClass(editor_id + '_justifyfull', 'mceButtonNormal'); + tinyMCE.switchClass(editor_id + '_bold', 'mceButtonNormal'); + tinyMCE.switchClass(editor_id + '_italic', 'mceButtonNormal'); + tinyMCE.switchClass(editor_id + '_underline', 'mceButtonNormal'); + tinyMCE.switchClass(editor_id + '_strikethrough', 'mceButtonNormal'); + tinyMCE.switchClass(editor_id + '_bullist', 'mceButtonNormal'); + tinyMCE.switchClass(editor_id + '_numlist', 'mceButtonNormal'); + tinyMCE.switchClass(editor_id + '_sub', 'mceButtonNormal'); + tinyMCE.switchClass(editor_id + '_sup', 'mceButtonNormal'); + tinyMCE.switchClass(editor_id + '_anchor', 'mceButtonNormal'); + tinyMCE.switchClass(editor_id + '_link', 'mceButtonDisabled'); + tinyMCE.switchClass(editor_id + '_unlink', 'mceButtonDisabled'); + tinyMCE.switchClass(editor_id + '_outdent', 'mceButtonDisabled'); + tinyMCE.switchClass(editor_id + '_image', 'mceButtonNormal'); + tinyMCE.switchClass(editor_id + '_hr', 'mceButtonNormal'); - if (size == '') { - var sizes = new Array('', '8px', '10px', '12px', '14px', '18px', '24px', '36px'); + if (node.nodeName == "A" && tinyMCE.getAttrib(node, "class").indexOf('mceItemAnchor') != -1) + tinyMCE.switchClass(editor_id + '_anchor', 'mceButtonSelected'); - size = '' + elm.style.fontSize; + // Get link + var anchorLink = tinyMCE.getParentElement(node, "a", "href"); - for (var i=0; i 0)) + tinyMCE.switchClass(editor_id + '_redo', 'mceButtonNormal'); + + // Has undo levels + if (undo_index != -1 && (undo_index > 0 && undo_levels > 0)) + tinyMCE.switchClass(editor_id + '_undo', 'mceButtonNormal'); + + // Select class in select box + var selectElm = document.getElementById(editor_id + "_styleSelect"); + + if (selectElm) { + TinyMCE_AdvancedTheme._setupCSSClasses(editor_id); + + classNode = node; + breakOut = false; + var index = 0; + + do { + if (classNode && classNode.className) { + for (var i=0; i"); + else + selectByValue(selectElm, ""); + } + + // Select fontselect + var selectElm = document.getElementById(editor_id + "_fontNameSelect"); + if (selectElm) { + if (!tinyMCE.isSafari && !(tinyMCE.isMSIE && !tinyMCE.isOpera)) { + var face = inst.queryCommandValue('FontName'); + + face = face == null || face == "" ? "" : face; + + selectByValue(selectElm, face, face != ""); + } else { + var elm = tinyMCE.getParentElement(node, "font", "face"); + + if (elm) { + var family = tinyMCE.getAttrib(elm, "face"); + + if (family == '') + family = '' + elm.style.fontFamily; + + if (!selectByValue(selectElm, family, family != "")) + selectByValue(selectElm, ""); + } else selectByValue(selectElm, ""); + } + } + + // Select fontsize + var selectElm = document.getElementById(editor_id + "_fontSizeSelect"); + if (selectElm) { + if (!tinyMCE.isSafari && !tinyMCE.isOpera) { + var size = inst.queryCommandValue('FontSize'); + selectByValue(selectElm, size == null || size == "" ? "0" : size); + } else { + var elm = tinyMCE.getParentElement(node, "font", "size"); + if (elm) { + var size = tinyMCE.getAttrib(elm, "size"); + + if (size == '') { + var sizes = new Array('', '8px', '10px', '12px', '14px', '18px', '24px', '36px'); + + size = '' + elm.style.fontSize; + + for (var i=0; i 0) + selectElm.setAttribute('cssImported', 'true'); + } + }, + + _setCookie : function(name, value, expires, path, domain, secure) { + var curCookie = name + "=" + escape(value) + + ((expires) ? "; expires=" + expires.toGMTString() : "") + + ((path) ? "; path=" + escape(path) : "") + + ((domain) ? "; domain=" + domain : "") + + ((secure) ? "; secure" : ""); + + document.cookie = curCookie; + }, + + _getCookie : function(name) { + var dc = document.cookie; + var prefix = name + "="; + var begin = dc.indexOf("; " + prefix); + + if (begin == -1) { + begin = dc.indexOf(prefix); + + if (begin != 0) + return null; + } else + begin += 2; + + var end = document.cookie.indexOf(";", begin); + + if (end == -1) + end = dc.length; + + return unescape(dc.substring(begin + prefix.length, end)); + }, + + _resizeTo : function(inst, w, h, set_w) { + var editorContainer = document.getElementById(inst.editorId + '_parent'); + var tableElm = editorContainer.firstChild; + var iframe = inst.iframeElement; + + if (w == null || w == "null") { + set_w = false; + w = 0; + } + + if (h == null || h == "null") + return; + + w = parseInt(w); + h = parseInt(h); + + if (tinyMCE.isGecko) { + w += 2; + h += 2; + } + + var dx = w - tableElm.clientWidth; + var dy = h - tableElm.clientHeight; + + w = w < 1 ? 30 : w; + h = h < 1 ? 30 : h; + + if (set_w) + tableElm.style.width = w + "px"; + + tableElm.style.height = h + "px"; + + iw = iframe.clientWidth + dx; + ih = iframe.clientHeight + dy; + + iw = iw < 1 ? 30 : iw; + ih = ih < 1 ? 30 : ih; + + if (tinyMCE.isGecko) { + iw -= 2; + ih -= 2; + } + + if (set_w) + iframe.style.width = iw + "px"; + + iframe.style.height = ih + "px"; + + // Is it to small, make it bigger again + if (set_w) { + var tableBodyElm = tableElm.firstChild; + var minIframeWidth = tableBodyElm.scrollWidth; + if (inst.iframeElement.clientWidth < minIframeWidth) { + dx = minIframeWidth - inst.iframeElement.clientWidth; + + inst.iframeElement.style.width = (iw + dx) + "px"; + } + } + }, + + /** + * Handles resizing events. + */ + _resizeEventHandler : function(e) { + var resizer = TinyMCE_AdvancedTheme._resizer; + + // Do nothing + if (!resizer.resizing) + return; + + e = typeof(e) == "undefined" ? window.event : e; + + var dx = e.screenX - resizer.downX; + var dy = e.screenY - resizer.downY; + var resizeBox = resizer.resizeBox; + var editorId = resizer.editorId; + + switch (e.type) { + case "mousemove": + var w, h; + + w = resizer.width + dx; + h = resizer.height + dy; + + w = w < 1 ? 1 : w; + h = h < 1 ? 1 : h; + + if (resizer.horizontal) + resizeBox.style.width = w + "px"; + + resizeBox.style.height = h + "px"; + break; + + case "mouseup": + TinyMCE_AdvancedTheme._setResizing(e, editorId, false); + TinyMCE_AdvancedTheme._resizeTo(tinyMCE.getInstanceById(editorId), resizer.width + dx, resizer.height + dy, resizer.horizontal); + + // Expire in a month + if (tinyMCE.getParam("theme_advanced_resizing_use_cookie", true)) { + var expires = new Date(); + expires.setTime(expires.getTime() + 3600000 * 24 * 30); + + // Set the cookies + TinyMCE_AdvancedTheme._setCookie("TinyMCE_" + editorId + "_width", "" + (resizer.horizontal ? resizer.width + dx : ""), expires); + TinyMCE_AdvancedTheme._setCookie("TinyMCE_" + editorId + "_height", "" + (resizer.height + dy), expires); + } + break; + } + }, + + /** + * Starts/stops the editor resizing. + */ + _setResizing : function(e, editor_id, state) { + e = typeof(e) == "undefined" ? window.event : e; + + var resizer = TinyMCE_AdvancedTheme._resizer; + var editorContainer = document.getElementById(editor_id + '_parent'); + var editorArea = document.getElementById(editor_id + '_parent').firstChild; + var resizeBox = document.getElementById(editor_id + '_resize_box'); + var inst = tinyMCE.getInstanceById(editor_id); + + if (state) { + // Place box over editor area + var width = editorArea.clientWidth; + var height = editorArea.clientHeight; + + resizeBox.style.width = width + "px"; + resizeBox.style.height = height + "px"; + + resizer.iframeWidth = inst.iframeElement.clientWidth; + resizer.iframeHeight = inst.iframeElement.clientHeight; + + // Hide editor and show resize box + editorArea.style.display = "none"; + resizeBox.style.display = "block"; + + // Add event handlers, only once + if (!resizer.eventHandlers) { + if (tinyMCE.isMSIE) + tinyMCE.addEvent(document, "mousemove", TinyMCE_AdvancedTheme._resizeEventHandler); + else + tinyMCE.addEvent(window, "mousemove", TinyMCE_AdvancedTheme._resizeEventHandler); + + tinyMCE.addEvent(document, "mouseup", TinyMCE_AdvancedTheme._resizeEventHandler); + + resizer.eventHandlers = true; + } + + resizer.resizing = true; + resizer.downX = e.screenX; + resizer.downY = e.screenY; + resizer.width = parseInt(resizeBox.style.width); + resizer.height = parseInt(resizeBox.style.height); + resizer.editorId = editor_id; + resizer.resizeBox = resizeBox; + resizer.horizontal = tinyMCE.getParam("theme_advanced_resize_horizontal", true); + } else { + resizer.resizing = false; + resizeBox.style.display = "none"; + editorArea.style.display = tinyMCE.isMSIE && !tinyMCE.isOpera ? "block" : "table"; + tinyMCE.execCommand('mceResetDesignMode'); + } + }, + + _insertImage : function(src, alt, border, hspace, vspace, width, height, align, title, onmouseover, onmouseout) { + tinyMCE.execCommand('mceBeginUndoLevel'); + + if (src == "") + return; + + if (!tinyMCE.imgElement && tinyMCE.isSafari) { + var html = ""; + + html += '' + alt + ''; + + tinyMCE.execCommand("mceInsertContent", false, html); + } else { + if (!tinyMCE.imgElement && tinyMCE.selectedInstance) { + if (tinyMCE.isSafari) + tinyMCE.execCommand("mceInsertContent", false, ''); + else + tinyMCE.selectedInstance.contentDocument.execCommand("insertimage", false, tinyMCE.uniqueURL); + + tinyMCE.imgElement = tinyMCE.getElementByAttributeValue(tinyMCE.selectedInstance.contentDocument.body, "img", "src", tinyMCE.uniqueURL); + } + } + + if (tinyMCE.imgElement) { + var needsRepaint = false; + var msrc = src; + + src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, tinyMCE.imgElement);"); + + if (tinyMCE.getParam('convert_urls')) + msrc = src; + + if (onmouseover && onmouseover != "") + onmouseover = "this.src='" + eval(tinyMCE.settings['urlconverter_callback'] + "(onmouseover, tinyMCE.imgElement);") + "';"; + + if (onmouseout && onmouseout != "") + onmouseout = "this.src='" + eval(tinyMCE.settings['urlconverter_callback'] + "(onmouseout, tinyMCE.imgElement);") + "';"; + + // Use alt as title if it's undefined + if (typeof(title) == "undefined") + title = alt; + + if (width != tinyMCE.imgElement.getAttribute("width") || height != tinyMCE.imgElement.getAttribute("height") || align != tinyMCE.imgElement.getAttribute("align")) + needsRepaint = true; + + tinyMCE.setAttrib(tinyMCE.imgElement, 'src', src); + tinyMCE.setAttrib(tinyMCE.imgElement, 'mce_src', msrc); + tinyMCE.setAttrib(tinyMCE.imgElement, 'alt', alt); + tinyMCE.setAttrib(tinyMCE.imgElement, 'title', title); + tinyMCE.setAttrib(tinyMCE.imgElement, 'align', align); + tinyMCE.setAttrib(tinyMCE.imgElement, 'border', border, true); + tinyMCE.setAttrib(tinyMCE.imgElement, 'hspace', hspace, true); + tinyMCE.setAttrib(tinyMCE.imgElement, 'vspace', vspace, true); + tinyMCE.setAttrib(tinyMCE.imgElement, 'width', width, true); + tinyMCE.setAttrib(tinyMCE.imgElement, 'height', height, true); + tinyMCE.setAttrib(tinyMCE.imgElement, 'onmouseover', onmouseover); + tinyMCE.setAttrib(tinyMCE.imgElement, 'onmouseout', onmouseout); + + // Fix for bug #989846 - Image resize bug + if (width && width != "") + tinyMCE.imgElement.style.pixelWidth = width; + + if (height && height != "") + tinyMCE.imgElement.style.pixelHeight = height; + + if (needsRepaint) + tinyMCE.selectedInstance.repaint(); + } + + tinyMCE.execCommand('mceEndUndoLevel'); + }, + + _insertLink : function(href, target, title, onclick, style_class) { + tinyMCE.execCommand('mceBeginUndoLevel'); + + if (tinyMCE.selectedInstance && tinyMCE.selectedElement && tinyMCE.selectedElement.nodeName.toLowerCase() == "img") { + var doc = tinyMCE.selectedInstance.getDoc(); + var linkElement = tinyMCE.getParentElement(tinyMCE.selectedElement, "a"); + var newLink = false; + + if (!linkElement) { + linkElement = doc.createElement("a"); + newLink = true; + } + + var mhref = href; + var thref = eval(tinyMCE.settings['urlconverter_callback'] + "(href, linkElement);"); + mhref = tinyMCE.getParam('convert_urls') ? href : mhref; + + tinyMCE.setAttrib(linkElement, 'href', thref); + tinyMCE.setAttrib(linkElement, 'mce_href', mhref); + tinyMCE.setAttrib(linkElement, 'target', target); + tinyMCE.setAttrib(linkElement, 'title', title); + tinyMCE.setAttrib(linkElement, 'onclick', onclick); + tinyMCE.setAttrib(linkElement, 'class', style_class); + + if (newLink) { + linkElement.appendChild(tinyMCE.selectedElement.cloneNode(true)); + tinyMCE.selectedElement.parentNode.replaceChild(linkElement, tinyMCE.selectedElement); + } + + return; + } + + if (!tinyMCE.linkElement && tinyMCE.selectedInstance) { + if (tinyMCE.isSafari) { + tinyMCE.execCommand("mceInsertContent", false, '' + tinyMCE.selectedInstance.selection.getSelectedHTML() + ''); } else - selectByValue(selectElm, "0"); - } - } + tinyMCE.selectedInstance.contentDocument.execCommand("createlink", false, tinyMCE.uniqueURL); - // Handle align attributes - alignNode = node; - breakOut = false; - do { - if (!alignNode.getAttribute || !alignNode.getAttribute('align')) { - continue; - } + tinyMCE.linkElement = tinyMCE.getElementByAttributeValue(tinyMCE.selectedInstance.contentDocument.body, "a", "href", tinyMCE.uniqueURL); - switch (alignNode.getAttribute('align').toLowerCase()) { - case "left": - tinyMCE.switchClassSticky(editor_id + '_justifyleft', 'mceButtonSelected'); - breakOut = true; - break; + var elementArray = tinyMCE.getElementsByAttributeValue(tinyMCE.selectedInstance.contentDocument.body, "a", "href", tinyMCE.uniqueURL); - case "right": - tinyMCE.switchClassSticky(editor_id + '_justifyright', 'mceButtonSelected'); - breakOut = true; - break; + for (var i=0; i 0) { - selectElm.setAttribute('cssImported', 'true'); - } - } -}; +// Add default buttons maps for advanced theme and all internal plugins +tinyMCE.addButtonMap(TinyMCE_AdvancedTheme._buttonMap); diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/image.htm b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/image.htm index 7c9534469..e971bf916 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/image.htm +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/image.htm @@ -2,23 +2,27 @@ {$lang_insert_image_title} + - -
    - - - - -
    + + + + +
    +
    +
    - - - - + @@ -28,8 +32,8 @@ if (typeof(tinyMCEImageList) != "undefined" && tinyMCEImageList.length > 0) { var html = ""; - html += ''; - html += ''; + html += ' - - + + - - + - - + + - - + + - - + + - - + + - - - - -
    {$lang_insert_image_title}
    {$lang_insert_image_src}: - +
     
    {$lang_image_list}:
    {$lang_insert_image_alt}:
    {$lang_insert_image_align}:
    {$lang_insert_image_dimensions}: + x -
    {$lang_insert_image_border}:
    {$lang_insert_image_vspace}:
    {$lang_insert_image_hspace}:
    -
    + +
    +
    + +
    +
    + +
    + +
    + +
    +
    diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/images/buttons.gif b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/images/buttons.gif index 5d5e08b5e6c88ac89d270bdcb9b052d22b9116a9..6196350de88f382e73bec4906572229b66c5c548 100644 GIT binary patch literal 8399 zcmWldcUY2(`^I11!4l=giKYo|&4E^~vcO4ZiX*dSn3iVNK{MNh1I1N1a^yI;N0zus zZDCs3#>z6QZ#XKO2S+Cx%J2OCd!9d^`+Dxrb=|kmI&Wu}h!I#5_@M+6b0xL?i_czu zh&!GieDe9?;^NJriQs?QJnbAQXg zori4?|LiXMxGr?xt}@K`5p}~TV5U?3*PlfnN2B_>y5UQ^7rr|k5}fr9Y}vdgy{0^; z@~|OcUF+#HpP&72CgO;stLaR3=R$t>;@#@yz5PR7on0HFj=Ds3+bmx(_qpm|@!Y|f zkbJ@37Y{BcRD8;=AJ1!_emcI;(f4%pzJqsU@!5*H-?N=_b3gG;Ic1#_$&J&WuC0Ia zu%NTG+A%1r{anE8>|F73i-`}jbv>uL^**0jwY98w;5AqDweQ*DE2YxiHLZVmhVGe~a$&Kc z?djW3i_Mqr*#;HK9^I3Dk+$`{8k~}NC-moE`ZIIgCi%>{*?uR{h4-boX(7C7lhp^y zAI&`)`DJXZnUW{=h)B*Cx6Ugh*RL=B{{3eszjGBQ`uF>#^NJ?BknD@~i%x#=^WW#s zRCoJ_-DY|JU23yJLSH!;riV-pFYhCTmDoOq>S8& zkzRjRTHn?-_|^drYH4bXzF%x_ySRaOZU--Y@TG#;8E&*?Trn>XO2{8Qogi)Y%V^C| zUj&0{W>QAa)mOexX&)EAQj8mcy$3fpU%xr?Y1|4rM z_O0;kYTlUAx)cxp`UmskJgLW?dY`|wf9)fzXQqSnrJ;nUm2z&qPN5LHVuOC7^oL1N z!aIrI1#fc}NJ0opyuY9#;hi-6tvWn2v-YlL@`-u=i#kbcB|cQ+5(6Z`jg*0eu)&*6 z-bB64^WDvtzP`GodtJJ^!`6byw`LgiEE&(AxLUV+0rzZgLMoGbxJN|qN9;&^lRr=S zGQd4y^03nUnfz-Xa|$}UInZ?djgxRtEfC1bTlhWy&)(zxf8Y3hk_KBmiTCm}NhPgM zgMG;)M+*>JVQ(VU&PzZQpG{>z&Upcjp=0_7nHmOR&jeeXsY@zFB5#6n6_2z{G{m4KHHzhQ{puBSWcBt z?PyH3(Dq(qm0ohfL@lz~S>GK*xliKPZ(|`^(P8n3)h0%#6g)ea3W|d!Rp?*Vn;+f-k2xle3-2ECG7PD*pE&aN z&Y`yi%V{ae+brbG#D&$BERP(kXBbQ~e(vV`^1n`t3d}9I$q0LHb_0>P0w!s;Y}Ktc zb&lEGfVbt}MRD|j=>Yxx_~iO?ahF~)RCz{oIY^RKWQjv@2yKbarRhwN=n_Kq+lM>2 z81Uh>UC7h{DklE`X6_lkuMSJ0-DAGq`Je!yFG|QZN;74Jf-7*}>M8&N zs;n|3u|WcW*_x<+Cep-{10{1kzDWec{SoW+?Sa%aqITDPJ2hg?3%@dgDpPqL;PdGe zo$5OGPi(0*vPTMZf6vf!<|E>Ny{?JGD2u8 zgoLG{YRk|-`oa+p?e@l7KS&h1st}_31`-)lYV^6^nu{0ZjK!b-(AJAbY|OMF-2py= zrwQmN*uEy~!5K~G&A17Evb#f?hFuM6?o0=05o~SeC2wty2If?%)_NXy3H1DAkMkp? z6;!ScI0_#U>J5sK2UF0JDCWhKo|&_|y7eA7OS*O>?$bVnuVN*7Ug{mf?Ax`x%$AaG zOr$PnYkb_s*pqg7$q8Dt?V#=`IDId6DMQLoi(_Zy6<#~W5~Qt3Ggp^^@7 zv=pUi&ht{W8m%G-F7n*x9KQR&(@?PQtUt~nnc(L^d&*!fvwk9N8efs(v|&&icJH(1 zGh1M(oV8Su7NOWl<$b;fEd33q#z=7bU%2Eo)LS`o#_sWqWI|S8j-}=Vt+GTKv+mfI z9D6yZy5#qBP4 zX4}#%?>ffG;fb#=nCXry(r7kXdl>oWxv!lQwik2XTczo7n$lzNxBuFxlAybDlL)=~ zh1^-2W)ok!UZ8m(POG$xp6_!zuLL3 zDI~E&N!y~!wkj+_)jO-TOe{WB%>Fq;e%7yV*ogQ;t6t>1rXgJp?6qhWEYN3@IU~5s zzZe*OQX;KtuGY|Tfo$$LZHQX1S#}YrCeAmpTdVu+PUgYs_+-c(pNzT}pu+?129tbm z>ro6pNh&4itrQ}*@tK+-RX9gBU-hU6T(UZKsnyru^??#d6=euu#F|wyPn4Ej{X3x^WFUaVF2nIWJfkhHyJjuUaM6K)1}c! z{+S{FG2Dz8spdh8O-xs`#c)m?`OVcP4_qT1+UT;NH)Dp$t4I1wNSSD=r;LJ|@!E4${t%%7Z-xfqy7a;<8iWnvufZp;YV|fFVph*fv6BD< z@L*#;Fw_oCyc%Qu&D&SI6WXtB?yDf_U6D&A5 zCQFVDtDmxP*@#YPgU%@OW15tOX4A!Z4K`}cwltMs{clmCXqoZaSy14Pzf%BpQI5I- z|6pVbZd%2X`InMMoDB_KCg$O*LJ>Ld(J)4@F-zkI*-0x5A82GIIb!evUCWDKD><$2 z<1$&2g&nf}Y80A6L-UwG>MnHo9hF`biLX};RGjJm@73qYNSy=82q@hJ01DP2QQ{Mt zDvt{#G6*wtLjni6!Ngq;Mi+QQSd3SS$aO0bRa6ykkGX}aS~cY>6o};&Ekwa2i}RKb@D9%;cy2wgJvRfF@q9CDmh7H- zQjK?{#2nCIAOWHy#ouAl3{2O={j(9^%EL9Kh#^k|Ca?Y59ir1tUJ>C}a*sh2AFb4! zEsAXj4@QQ35CwGbU_2t@Ubu8z6*%FnJOrr~l0ytD}KpnB;MGh%}U&JpPFc}GIO z2`Z74KX`d)&3N+NLiFczv>@MD){}f!U01CN?*syliVFE2=!J3^UM4JK!~hPBV1MZb zL|*asCq`aMe4mfdSC~Lm@JdIhiHjyBMf-&LM@z7N)R@n6ZiHl$FYi$m8WK(bm+%Bi zK5`UD*VI#qmf^fOo5oDh5?NK%KzfCC^=FM(kNLnGG_}pNAk`qmk%oBIp*7RFSQfN* zXW;xnIFf;F%rn4ZFm58?c%Ke|YcAyD-DtVGZA2-@%|b%d6F~vzpjF%xPy`in`b%?q z-z0TEP6j!1Aij*YP6R_7h%SO*XVi$XM(sy7&VE_udo&$`nN6=%NnYDHwD!Sfa=Upk zgvqsKpaF7l84rSrb4iy&$(sNJrJUG5Nk*74Upmnvk|UdE(D%aAR=^qaVzfX66o`;c zo-Rm7ejP^pWl%43FEU2BDuR1yv814IkOmmYAgl}__n7VoCTe{&p_b+qaIlG7h{r7r z{IL|40j5v#Ei=)l;w^TT=z;`XkP%jtVusXhE^$>{6&K|93SfH=DZ?^=@8LX$`(J)` z00VLgBAjKAAragecK9U&8ZterrC>et+MaP6xqAc+&phHL2JIM_Qk=?dCrp5d#94=O z8J5eV{CHwQZ`#_QUXTF?$dbBUX7leWiWh2-Lt+FL!RDXAEzA-)p1V^4IXP@WI1cL+ z-1|x$oD*=OjvGO8$2{U=vC}YJ!Y)TaNvP`HK-G5dayS{T*?ex&C(eflUYF>ox1Bt| zBXsf!djQ~osB7z9^zzG;3`=NUN7agh-{TuDpjop*@%vQpd)K44d%(euQTv0PlKKs0 zE)~7>3d)e6?m1U4{9NfMuf!-2j1P3-t-I{?^4>a@9P0nN+SvxOM3C32R8soMr;%Uiqy;o zfE>8U2`;ka7ddvGO#78?yahcirInY$Q8MU!Xva>Z8b<*;<+x#`9OsLIM2gC8h2^|p zM^iGedJ76m<5;e>j(ofiw>HV@bR+(XlH>Ng1|yYXrHWcyApW51#;&cwH6y`i9AYkn zp=$)vv#Cx36#R~YQ?8&hr!R{K_+2^f5)6_*)Z-}RC+r+(8Zc!1)j#4k=Y_0bLiJKe z!mwN!atu%BCH3+N05}qhjt=JLd}^#6lm5I?2UW$F7o1iLY_j8m4uegt=TR5{2_mFG zysuvGz@K^GDr0jmdOrV_O1V_U;179P!YUg(Y7&!THowwc9J^5j=$3*7oE9Dqy_H(SV*Q>_?IDSqXlE z4;8qRUZR-!tivG$=R93Q;5Q1bmq-{0ei?uTR1OXkofTAi2$86b?3W^1Ke3P4sF$d1 zHHUmfqGHE=kf{K3fNZ#pgz<)IrO*};Y*q#biC|j}*?JXfe85;}*|GE~8SxC4@}MN1 zY8?}!>W&dJv*3uRrP_}(xn{fmko{MkyC!tanQCz%Awhp31m<9#$tW%ga-5tBh4&Ai=-B>haxXe3%~mUh zjkclFw2c~hH_uHxk>&vPXumq6|3@C|$tPV{kE)1(k$G~4DUv5j@qEh59&My583P&W ztZ{Zc!CtlO#p$xA@t-sraAT)GUTea)L`W)7j8W)_4Jx1^1ZMLEtJ~}Nq+Z^EQN>$* z6zKerd2vJou0Xk(n?EN16mA#^$P@HHrV0I7=sL<|J+ zaFOEwu7x8xB}N@wGX`cS@Myf{I5bAGsv$?!K5|nsG0$mWu`jC6FZH^Q@yYHCq`?6( z=#O$0nvs!F`*NV-Y^4>7ERdILN0x|*+t)`ngeR0_l$}k#v{ORxut85VELrJxT8z($ zs|Xl%$?gM;(0fn5Xi!eB`hv2?)L2h7X*IaO&xqt{_A%S3d;-_@8Y_3V$JZ~uK&3C& z){n2^Cxs0;fBQ0^m5g5RAZXp}GcUHk30JL>J3REYcYg1HUUERxHGn1=!S$_(z4m

    XfgfVbD&|WP0QGK& z9Z|f5W%%?Hur^Od>%#^!)l-z?kHW5HdB)AI5@fZ^OQAr>0R2y9z~tjBb1l%b4?VQG zg6z~conB|0OdNa&?GGm-91rCNxQnB5V>Ox)x>=2mC*KK;d-q0uV)pyR;NTIW9gyJg zhDn%)J}f{VFGzz&P;CG#5TTVE`TaiqRupMv0Jzig62W=3yK+^vG0H{CNy(W0w=q0s z{Nl=SC?d&hKWt6IytTqub75B$4p$^8B{r&@UsG1Nv#)K&SeFeX_=`6PUl^fUDG6kJ<^sfpEqRU#>~VQRBhVkT7RZ$1 z%bOnLD0%N=*P!=BK0(U&2!|Xb2P0`nBnLS1zjpltCD9hxT4aX`rvqV4xuLjt5iTA; zH7&wAitNbeP7yQ`*emXj^?UyB>YhgJx*~UhdBQvQl>VAKvDeZ`ZD~U$-Z-MU>Fbo~ z{&LqrI3kFB-v0r4kKdDJvJUUZpkN?w)CBCmd+Ib%7YMoC6if*;Fz`CZVRyw+8$*Xj zhtEH6R^of~M8jGyTOtBZ+hmW$ZS686=zO0ylG$&lp{)Ghb*H-}!D*{7tAxefE$N;9L7= z)??Wtic`F)b5%0!j+*LVhwHynmSYB}O8W7dZA6oOMr z3uUZY-u+xAY56mrhnkXrX;gn6V@&XNpK9sH8~Vk&6SaCl%+kXmdEU`Q&ZKvkC>hZ< z6!jWo*3^FnG&#gQk-2Ky`j}Kr`a|fKIk+`00;9L4DuVu4#YBWL=HmBo`4n{nrI?T9$9H1f z`F)M)gh}0K{Uo!Ii7X?dd6Pm8_wM>UbxrBSvn4^MG=U~wUcDT*b0a&ni`(-pGm1-* zXPR@5V2Wowaa3Jc{n3=Ld2*}eZ}*P?c346w8^s{y8=nM!?qWF5 zsBgTm%1j0^-(R@#50hbQLrtIt&C>Nggz$$0A2DZANx>Bs;6F1UV! z<22p(W2V2-)2~{j{xoWP;g`JLlnkFwr=s|4^O?I(=^yiqy}ydxfPQbxpuzMUHEYY0 z@swNk;o2_K8yfxtQGR0hG=I|{0 zg|g;Qto$rKZaCH455O6rd`!-GMXZHfb#NSVtu$ZzYxpnV3fI$U>52|?-j2SBCRpg* zWorqvn}4_|?6r^pNv0T!FU`f*7%6tqLOwfwupc(#;+K(bl8%KvU+YXsNjEW~fEGnq zzs&=&<(@kYN^b(AvUJRRpUz47h?X+%mQ72osd8kOyMIyp**D+J1_v|OaVbvrBrmv( z#(pH)c?kq|?sxAf+md5uP^%1-YV}fBj`p&L^-T&Bd99wyt)6O~?v%ZWVJwgVR;$My za5@}Z#vKi%_Lsot5`OExNylF9K;#ZPx=9)g`K6FX9!|G}VF{S5NijYSL45oxvnC!Wqq!0(9Dsj_cJLoo)^}zcu%DM$7k&8Ug_j=>8$? zqHk5py~o6Ki*zzplxA@2pwH3OcU9HpgKzNAvf+`bl|8>Uf$NMg4_-Y)R?d@22?|$W zWWd0keN(-fp%n1lDm1=nrqLz|9mxq`5TA~VULhwVJWa-;!o!8_D_kn{Fl>>-LEZht z??O;bnxJ!4ZfYH7BHiyfeAaGF6?M0DO=GiqMv!L}l`3>MACAReF2c9GxL4%9lM!e* zPZMRsM7q|^ti(2Vl8Ts5ZI%E>ZMYc4v8esCfm!Q|JPJZNgBm2qH?7Z&gk~;%1C9)Y ze3*O6OyQBdw@Dkvk1M|R=Z+mx)qZYZvaio?(EgbEnJP^I4a4}hPQR~EveFwqO^aXI zKfb9eDwqbzcVli^f;u}kxH3-0=RDS}N+U`4eobs}KbpTm`*DYPMcAv+*XfV%Q2F+` zO3Sv)f+qzJxbd(aK{O;q?t3Mp^FuV74U*1eI`*kV)rD=7I?KQCk-d3ZU zUW~4t&u(>~c3fo-+k>%(uA6jbE8V{1C*hgdSVvEjtm^dA| zzkP9L^?m-5qU~fStX460Fd410Kvy1_HPFoj=lMM X^3c@}+y6QC;n>@S#Y1)o46OP;pSlB8 literal 3286 zcmWlWdpy$%=lY-!@~b1p`D*lH9Uw98*aWkwzj5}-cT|RixNdr=-OKIuUcF2yr}A$^4XleqhE7d zXZf|+e>svaK3qPbU0Ov3b?rx$C&Qnvya;z3|^}i|q?flS`_ljrC7cYL{h=jehlu zHy+*Somf7cebq7fTY1;Vu(;f?6j{&xr~3N(sps3zWe5_-V!ILf(WDA_kUFkC_C}l!k)Zrm2~4a(qKon zPpqXHj4;87Od?8f-ib4b39=lDapYOL&L!)`zqNmt0jAJF>!7UV747)hGAT#CL-GlblmTwDtCi& zCLQ#$pa;eN@c=a3;MbqTYzyzFTZ=mcZ4QZhcIVu!`^LN_K5y>57-7OGAR>&3je$xk zi(P^t6TBZddYk+Ktk~+6#TV7vM}9bxR=sOu zBb6{$6aK&=HbOqpEGUEbl`hZ4xeWe}w+diG5tAC`tPq#wAn5<1c)@zE&JdSe@j zB1+C)X6qEV{^fPg*Obn#d`F(L5cl=|{FeDrH}sm%`;p+Qdp}IwF;bQ@(GB6gt@f@=VZKI~j&L@p? zYG~P6*DLL(&l3;fPd5ni4Sdl&3Z1)sroi~1d|=vgpA+jTwus*vdPa{H z%5HjW8Bxb6vT?|wS<%wavn=!E11|3kh%1@s3&#p;Mq$V92deTmh-h36f&x+-M5BTc zy4R`(h9{bqe6Wo5(fFH!tyPXm1xX4xPCN%g=$MW2l|cGXfa+*ou+iY1yi-kGck_}s z=(5e~y+WOpMY~$N{nE-*qe*N1a6%xN>xa2H&tv27$KFurYHr6J4b&17s2xjCzv=4D!pjvqGB-X|UR!3AnMiL)n`F#14O(*)K z4VtB9rNPj{yVL^uqRSZ#R_|201Hc%|c-ETV%@tzq)By^h?C9NNZI@1`LGOr?n5pKb zr_=-Z)CR@ERi_F?flIcJdiil4M==Q3)lyg84WcGkI(pVoAa;OWm_{q{colVhH#`8M zZ(^T|sot$0_rUO&dE808B8C6~NpMyGq~lyk!7FaX2J{^lH2vj&{$n)Gf4&JV--XK9 z;yOeqlZKj^Zg9{KR|L+fp(qqQO$1<$jAZ*3uDA$|JbZ{KbDqz4(K^zM-5D6RnDzC* zNZjbNm z&lw4PH6eNFb$Z514+ZqTj=ej8#VR>e>`f^yeQb&vt?**@Lryx@<0OSK2>0c-F%VzX+LI1Ta7&f*9$MC#;2Xz@S{%% z_eP1d9h_j-@gxL<#iZC$heawI=!o^CUza`T)6e`_zv_SiPYOqZm8gYM+?_tRi(hr= zj%T#KG#^Hx0VpSMx_uYO-51OWR4hzwWtnIPP9pR(^Uc}(GoPT`_IC)=z5(5wc67j2 zA!;KCp~Ptm2dtGi|8==TWIYvc&W{az?Z!5aF9^CS*gzIXpo|1CdK#wY#@8a!R8ejSjZMKyUL#m@gq@Phq!tde z?I9Bnf&jYE108WM^_)n{CA)A655&*t5LV@mFHR11{gr@Ea zRNX(}nZnkW#-wwe50?2=D8mBlAE!fnFH8CO z78bb4d8V}xJhspUEw_q*U~DyJch*+JnaNbS4S9g}Uv-fVPL3mKVc`ZYKK}gz7*+$U z>rzJro>P8+m;Ja&L%7Hm-c)_bTwtn^!Yqbj5m=CCyhTy4hcu%X2*&F-R-C~7&q7bz-&Jf(a@(4sHIn+zR_-o^bBL?4M7Sm(2Ov*1(i2STIt^6X0$J^U?`fQML$m8 z;NCB~>PDFHi?4#wjhUFkQA+)35Oh?#qjs*=(B)d>#0KTt0tsL;#1)OC?8m(ig6qf_ z$IY|OlBBrLcatQi{kqRSN#6U}vN02ek6PC|t%uszikeNiu%hQf$f9Tt1*;JhiOs`i zOxh=Nw=G9>CP?dBzx%v37pg%Nz0GBZ%Sw?TqR zsDzg3`|YXW*Yi*2Ot|E#iYong-d7`Z)uKI7X-1i>Lau0!6dogiY}OvBLZ8_Jhkj9_ zCnOLP=j@dQ#r8dN~{IES>T5kWt0 zy6cYoK97x3XP$*3IRF;p49U;{xGKc+SH*Gy@~9U!y&Lf&s_Z35>6$I=<+=FE(dz)g zaIZLz;RcJ_S3Yllda|y3p|8AE3U+a~*pnSTcvY-KRea8>Sgou0)>rX;qGD~e0x*$4 LuapS@VB7x#nmUU0 diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/jscripts/about.js b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/jscripts/about.js index fc33f85c4..4e53c285b 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/jscripts/about.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/jscripts/about.js @@ -1,5 +1,8 @@ function init() { + var inst; + tinyMCEPopup.resizeToInnerSize(); + inst = tinyMCE.selectedInstance; // Give FF some time window.setTimeout('insertHelpIFrame();', 10); @@ -20,8 +23,8 @@ function init() { html += ''; html += ''; - for (var i=0; i/g, '&gr;'); + name = name.replace(/>/g, '>'); - html = ''; + // Fix for bug #1447335 + if (tinyMCE.isGecko) + html = ''; + else + html = ''; tinyMCEPopup.execCommand("mceInsertContent", false, html); + + // Fix for bug #1447335 force cursor after the anchor element + if (tinyMCE.isGecko) { + e = inst.getDoc().getElementById('mceNewAnchor'); + + if (e) { + inst.selection.selectNode(e, true, false, false); + e.removeAttribute('id'); + } + } + tinyMCE.handleVisualAid(inst.getBody(), true, inst.visualAid, inst); } diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/jscripts/charmap.js b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/jscripts/charmap.js index bc9df27b3..eaa6a94b6 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/jscripts/charmap.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/jscripts/charmap.js @@ -170,7 +170,7 @@ charmap = [ ['ý', 'ý', true, 'y - acute'], ['þ', 'þ', true, 'thorn'], ['ÿ', 'ÿ', true, 'y - diaeresis'], -// ['Α', 'Α', true, 'Alpha'], + ['Α', 'Α', true, 'Alpha'], ['Β', 'Β', true, 'Beta'], ['Γ', 'Γ', true, 'Gamma'], ['Δ', 'Δ', true, 'Delta'], @@ -279,9 +279,9 @@ function renderCharMapHTML() { cols++; html += '' + '' + charmap[i][1] + ''; @@ -299,11 +299,13 @@ function renderCharMapHTML() { } function insertChar(chr) { - tinyMCEPopup.execCommand('mceInsertContent', false, '\&#' + chr + ';'); + tinyMCEPopup.execCommand('mceInsertContent', false, '&#' + chr + ';'); // Refocus in window if (tinyMCEPopup.isWindow) window.focus(); + + tinyMCEPopup.close(); } function previewChar(codeA, codeB, codeN) { diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/jscripts/color_picker.js b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/jscripts/color_picker.js index aab668e08..68b5db2d6 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/jscripts/color_picker.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/jscripts/color_picker.js @@ -99,7 +99,8 @@ function renderColorMap() { + '' + '' + '' - + '' + + '

    ' + + '
    ' + '' + ''; diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/jscripts/image.js b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/jscripts/image.js index 18899f3c6..a52bfad6a 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/jscripts/image.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/jscripts/image.js @@ -18,7 +18,7 @@ function insertImage() { var align = document.forms[0].align.options[document.forms[0].align.selectedIndex].value; tinyMCEPopup.restoreSelection(); - tinyMCE.insertImage(src, alt, border, hspace, vspace, width, height, align); + tinyMCE.themes['advanced']._insertImage(src, alt, border, hspace, vspace, width, height, align); tinyMCEPopup.close(); } diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/jscripts/link.js b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/jscripts/link.js index 62204ceb6..57290040d 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/jscripts/link.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/jscripts/link.js @@ -12,6 +12,10 @@ function init() { document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser','href','file','theme_advanced_link'); + // Handle file browser + if (isVisible('hrefbrowser')) + document.getElementById('href').style.width = '180px'; + var formObj = document.forms[0]; for (var i=0; i 0) { var formObj = document.forms[0]; @@ -53,7 +54,7 @@ function insertLink() { var href = document.forms[0].href.value; var target = document.forms[0].target.options[document.forms[0].target.selectedIndex].value; var title = document.forms[0].linktitle.value; - var style_class = document.forms[0].styleSelect.value; + var style_class = document.forms[0].styleSelect ? document.forms[0].styleSelect.value : ""; var dummy; // Make anchors absolute @@ -64,6 +65,6 @@ function insertLink() { target = ''; tinyMCEPopup.restoreSelection(); - tinyMCE.insertLink(href, target, title, dummy, style_class); + tinyMCE.themes['advanced']._insertLink(href, target, title, dummy, style_class); tinyMCEPopup.close(); } diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/jscripts/source_editor.js b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/jscripts/source_editor.js index bfbee3ff3..59cf10057 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/jscripts/source_editor.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/jscripts/source_editor.js @@ -5,10 +5,10 @@ function saveContent() { // Fixes some charcode issues function fixContent(html) { - html = html.replace(new RegExp('<(p|hr|table|tr|td|ol|ul|object|embed|li|blockquote)', 'gi'),'\n<$1'); +/* html = html.replace(new RegExp('<(p|hr|table|tr|td|ol|ul|object|embed|li|blockquote)', 'gi'),'\n<$1'); html = html.replace(new RegExp('<\/(p|ol|ul|li|table|tr|td|blockquote|object)>', 'gi'),'\n'); html = tinyMCE.regexpReplace(html, '
    ','
    \n','gi'); - html = tinyMCE.regexpReplace(html, '\n\n','\n','gi'); + html = tinyMCE.regexpReplace(html, '\n\n','\n','gi');*/ return html; } @@ -17,12 +17,20 @@ function onLoadInit() { document.forms[0].htmlSource.value = fixContent(tinyMCE.getContent(tinyMCE.getWindowArg('editor_id'))); resizeInputs(); - setWrap('off'); } function setWrap(val) { - // hard soft off - document.forms[0].htmlSource.wrap = val; + var s = document.forms[0].htmlSource; + + s.wrap = val; + + if (tinyMCE.isGecko) { + var v = s.value; + var n = s.cloneNode(false); + n.setAttribute("wrap", val); + s.parentNode.replaceChild(n, s); + n.value = v; + } } function toggleWordWrap(elm) { @@ -48,6 +56,6 @@ function resizeInputs() { } function renderWordWrap() { - if (tinyMCE.isMSIE) + if (tinyMCE.isMSIE || tinyMCE.isGecko) document.write(''); } diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/langs/da.js b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/langs/da.js index b4f8c9f2a..9cd20b27b 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/langs/da.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/langs/da.js @@ -1,19 +1,19 @@ -// DK lang variables contributed by Jan Moelgaard +// DK lang variables contributed by Jan Moelgaard, John Dalsgaard and Bo Frederiksen. tinyMCE.addToLang('',{ theme_style_select : '-- Styles --', theme_code_desc : 'Rediger HTML kode', theme_code_title : 'HTML Kodeeditor', theme_code_wordwrap : 'Ombrydning', -theme_sub_desc : 'Sænket skrift', -theme_sup_desc : 'Hævet skrift', -theme_hr_desc : 'Indsæt horisontal linje', +theme_sub_desc : 'Sænket skrift', +theme_sup_desc : 'Hævet skrift', +theme_hr_desc : 'Indsæt horisontal linje', theme_removeformat_desc : 'Fjern formatering', -theme_custom1_desc : 'Indsæt din egen beskrivelse her', +theme_custom1_desc : 'Indsæt din egen beskrivelse her', insert_image_border : 'Kant', insert_image_dimensions : 'Dimensioner', insert_image_vspace : 'Flyt til venstre', -insert_image_hspace : 'Flyt til højre', +insert_image_hspace : 'Flyt til højre', insert_image_align : 'Justering', insert_image_align_default : 'Standard', insert_image_align_baseline : 'Bundlinje', @@ -24,43 +24,43 @@ insert_image_align_texttop : 'I toppen af teksten', insert_image_align_absmiddle : 'Absolut midte', insert_image_align_absbottom : 'Absolut bund', insert_image_align_left : 'Venstre', -insert_image_align_right : 'Højre', -theme_font_size : '-- Font størrelse --', -theme_fontdefault : '-- Font gruppe --', +insert_image_align_right : 'Højre', +theme_font_size : '-- Skrift størrelse --', +theme_fontdefault : '-- Skrifttype --', theme_block : '-- Typografi --', theme_paragraph : 'Afsnit', theme_div : 'Div', -theme_address : 'Addresse', -theme_pre : 'Præformateret', +theme_address : 'Adresse', +theme_pre : 'Præformateret', theme_h1 : 'Overskrift 1', theme_h2 : 'Overskrift 2', theme_h3 : 'Overskrift 3', theme_h4 : 'Overskrift 4', theme_h5 : 'Overskrift 5', theme_h6 : 'Overskrift 6', -theme_colorpicker_title : 'Vælg en farve', +theme_colorpicker_title : 'Vælg en farve', theme_colorpicker_apply : 'Anvend', -theme_forecolor_desc : 'Vælg forgrundsfarve', -theme_backcolor_desc : 'Vælg baggrundsfarve', -theme_charmap_title : 'Vælg specialkarakter', -theme_charmap_desc : 'Indsæt specialkarakter', -theme_visualaid_desc : 'Slå linjer/usynlige elementer til og fra', -insert_anchor_title : 'Indsæt/rediger bogmærke', -insert_anchor_name : 'Bogmærkets navn', -theme_anchor_desc : 'Indsæt/rediger bogmærke', -theme_insert_link_titlefield : 'Title', -theme_clipboard_msg : 'Kopier/Klip/Indsæt virker ikke i Mozilla og Firefox.\nVil du vide mere om dette?', +theme_forecolor_desc : 'Vælg forgrundsfarve', +theme_backcolor_desc : 'Vælg baggrundsfarve', +theme_charmap_title : 'Vælg specialtegn', +theme_charmap_desc : 'Indsæt specialtegn', +theme_visualaid_desc : 'Slå linjer/usynlige elementer til og fra', +insert_anchor_title : 'Indsæt/rediger bogmærke', +insert_anchor_name : 'Bogmærkets navn', +theme_anchor_desc : 'Indsæt/rediger bogmærke', +theme_insert_link_titlefield : 'Titel', +theme_clipboard_msg : 'Kopier/Klip/Indsæt virker ikke i Mozilla og Firefox.\nVil du vide mere om dette?', theme_path : 'Sti', cut_desc : 'Klip', copy_desc : 'Kopier', -paste_desc : 'Indsæt', +paste_desc : 'Indsæt', link_list : 'Linkliste', image_list : 'Billedliste', browse : 'Gennemse', image_props_desc : 'Billedegenskaber', newdocument_desc : 'Nyt dokument', class_name : 'Klasse', -newdocument : 'Er du sikker på, at du vil slette alt?', +newdocument : 'Er du sikker på, at du vil slette alt?', about_title : 'Om TinyMCE', about : 'Om', license : 'Licens', @@ -68,8 +68,9 @@ plugins : 'Plugins', plugin : 'Plugin', author : 'Forfatter', version : 'Version', -loaded_plugins : 'Indlæste plugins', -help : 'Hjælp', -not_set : '-- Ikke defineret --', -close : 'Luk' +loaded_plugins : 'Indlæste plugins', +help : 'Hjælp', +not_set : '-- Ikke valgt --', +close : 'Luk', +toolbar_focus : 'Hop til værktøjslinje - Alt+Q, Hop til editor - Alt-Z, Hop til element sti - Alt-X' }); diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/langs/de.js b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/langs/de.js index b17ae130e..bc6809050 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/langs/de.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/langs/de.js @@ -72,5 +72,6 @@ loaded_plugins : 'Geladene Plugins', help : 'Hilfe', not_set : '-- Nicht festgelegt --', close : 'Schließen', -toolbar_focus : 'Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X' +toolbar_focus : 'Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X', +insert_link_delta_width : 40 }); diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/langs/readme.txt b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/langs/readme.txt index ef48d2ba4..e32bcf07f 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/langs/readme.txt +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/langs/readme.txt @@ -1,4 +1,4 @@ -Theme specific language packs. - -The language pack codes are based on ISO-639-2 -http://www.loc.gov/standards/iso639-2/englangn.html +Theme specific language packs. + +The language pack codes are based on ISO-639-2 +http://www.loc.gov/standards/iso639-2/englangn.html diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/langs/zh_cn.js b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/langs/zh_cn.js index f471ec11f..6d160a5c1 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/langs/zh_cn.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/langs/zh_cn.js @@ -1,4 +1,5 @@ -// Simplified Chinese lang variables contributed by tom_cat (thomaswangyang@gmail.com) +// Simplified Chinese lang variables contributed by TinyMCE_China_Team ( tinymce_china {AT} yahoogroups {DOT} com ). +// visit our homepage at: http://www.cube316.net/tinymce/ for more information. tinyMCE.addToLang('',{ theme_style_select : '-- ¸ñʽ --', diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/link.htm b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/link.htm index c61994df3..4e72eaad5 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/link.htm +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/advanced/link.htm @@ -2,34 +2,39 @@ {$lang_insert_link_title} + - -
    - - - ', ''); - html = tinyMCE.regexpReplace(html, '

    \\s*
    \\s*

    ', '

     

    '); - html = tinyMCE.regexpReplace(html, '

    \\s* \\s*
    \\s* \\s*

    ', '

     

    '); - html = tinyMCE.regexpReplace(html, '

    \\s* \\s*
    \\s*

    ', '

     

    '); - html = tinyMCE.regexpReplace(html, '

    \\s*
    \\s* \\s*

    ', '

     

    '); - - // Remove empty anchors - html = html.replace(new RegExp('(.*?)', 'gi'), '$1'); - - // Remove some mozilla crap - if (!tinyMCE.isMSIE) - html = html.replace(new RegExp('', 'g'), ""); - - if (tinyMCE.settings['remove_linebreaks']) - html = html.replace(new RegExp('\r|\n', 'g'), ' '); - - if (tinyMCE.getParam('apply_source_formatting')) { - html = html.replace(new RegExp('<(p|div)([^>]*)>', 'g'), "\n<$1$2>\n"); - html = html.replace(new RegExp('<\/(p|div)([^>]*)>', 'g'), "\n\n"); - html = html.replace(new RegExp('
    ', 'g'), "
    \n"); - } - - if (tinyMCE.settings['force_br_newlines']) { - var re = new RegExp('

     

    ', 'g'); - html = html.replace(re, "
    "); - } - - if (tinyMCE.isGecko && tinyMCE.settings['remove_lt_gt']) { - // Remove weridness! - var re = new RegExp('<>', 'g'); - html = html.replace(re, ""); - } - - // Call custom cleanup code - html = tinyMCE._customCleanup(inst, on_save ? "get_from_editor" : "insert_to_editor", html); - - // Emtpy node, return empty - var chk = tinyMCE.regexpReplace(html, "[ \t\r\n]", "").toLowerCase(); - if (chk == "
    " || chk == "
    " || chk == "

     

    " || chk == "

     

    " || chk == "

    ") - html = ""; - - if (tinyMCE.settings["preformatted"]) - return "
    " + html + "
    "; - - return html; }; -TinyMCE.prototype.insertLink = function(href, target, title, onclick, style_class) { - tinyMCE.execCommand('mceBeginUndoLevel'); +TinyMCE_Engine.prototype.getContent = function(editor_id) { + var h; - if (this.selectedInstance && this.selectedElement && this.selectedElement.nodeName.toLowerCase() == "img") { - var doc = this.selectedInstance.getDoc(); - var linkElement = tinyMCE.getParentElement(this.selectedElement, "a"); - var newLink = false; + if (typeof(editor_id) != "undefined") + tinyMCE.selectedInstance = tinyMCE.getInstanceById(editor_id); - if (!linkElement) { - linkElement = doc.createElement("a"); - newLink = true; - } + if (tinyMCE.selectedInstance) { + h = tinyMCE._cleanupHTML(this.selectedInstance, this.selectedInstance.getDoc(), tinyMCE.settings, this.selectedInstance.getBody(), false, true); - var mhref = href; - var thref = eval(tinyMCE.settings['urlconverter_callback'] + "(href, linkElement);"); - mhref = tinyMCE.getParam('convert_urls') ? href : mhref; + // When editing always use fonts internaly + if (tinyMCE.getParam("convert_fonts_to_spans")) + tinyMCE.convertSpansToFonts(this.selectedInstance.getDoc()); - tinyMCE.setAttrib(linkElement, 'href', thref); - tinyMCE.setAttrib(linkElement, 'mce_href', mhref); - tinyMCE.setAttrib(linkElement, 'target', target); - tinyMCE.setAttrib(linkElement, 'title', title); - tinyMCE.setAttrib(linkElement, 'onclick', onclick); - tinyMCE.setAttrib(linkElement, 'class', style_class); - - if (newLink) { - linkElement.appendChild(this.selectedElement.cloneNode(true)); - this.selectedElement.parentNode.replaceChild(linkElement, this.selectedElement); - } - - return; - } - - if (!this.linkElement && this.selectedInstance) { - if (tinyMCE.isSafari) { - tinyMCE.execCommand("mceInsertContent", false, '' + this.selectedInstance.getSelectedHTML() + ''); - } else - this.selectedInstance.contentDocument.execCommand("createlink", false, tinyMCE.uniqueURL); - - tinyMCE.linkElement = this.getElementByAttributeValue(this.selectedInstance.contentDocument.body, "a", "href", tinyMCE.uniqueURL); - - var elementArray = this.getElementsByAttributeValue(this.selectedInstance.contentDocument.body, "a", "href", tinyMCE.uniqueURL); - - for (var i=0; i'; - - tinyMCE.execCommand("mceInsertContent", false, html); - } else { - if (!this.imgElement && this.selectedInstance) { - if (tinyMCE.isSafari) - tinyMCE.execCommand("mceInsertContent", false, ''); - else - this.selectedInstance.contentDocument.execCommand("insertimage", false, tinyMCE.uniqueURL); - - tinyMCE.imgElement = this.getElementByAttributeValue(this.selectedInstance.contentDocument.body, "img", "src", tinyMCE.uniqueURL); - } - } - - if (this.imgElement) { - var needsRepaint = false; - var msrc = src; - - src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, tinyMCE.imgElement);"); - - if (tinyMCE.getParam('convert_urls')) - msrc = src; - - if (onmouseover && onmouseover != "") - onmouseover = "this.src='" + eval(tinyMCE.settings['urlconverter_callback'] + "(onmouseover, tinyMCE.imgElement);") + "';"; - - if (onmouseout && onmouseout != "") - onmouseout = "this.src='" + eval(tinyMCE.settings['urlconverter_callback'] + "(onmouseout, tinyMCE.imgElement);") + "';"; - - // Use alt as title if it's undefined - if (typeof(title) == "undefined") - title = alt; - - if (width != this.imgElement.getAttribute("width") || height != this.imgElement.getAttribute("height") || align != this.imgElement.getAttribute("align")) - needsRepaint = true; - - tinyMCE.setAttrib(this.imgElement, 'src', src); - tinyMCE.setAttrib(this.imgElement, 'mce_src', msrc); - tinyMCE.setAttrib(this.imgElement, 'alt', alt); - tinyMCE.setAttrib(this.imgElement, 'title', title); - tinyMCE.setAttrib(this.imgElement, 'align', align); - tinyMCE.setAttrib(this.imgElement, 'border', border, true); - tinyMCE.setAttrib(this.imgElement, 'hspace', hspace, true); - tinyMCE.setAttrib(this.imgElement, 'vspace', vspace, true); - tinyMCE.setAttrib(this.imgElement, 'width', width, true); - tinyMCE.setAttrib(this.imgElement, 'height', height, true); - tinyMCE.setAttrib(this.imgElement, 'onmouseover', onmouseover); - tinyMCE.setAttrib(this.imgElement, 'onmouseout', onmouseout); - - // Fix for bug #989846 - Image resize bug - if (width && width != "") - this.imgElement.style.pixelWidth = width; - - if (height && height != "") - this.imgElement.style.pixelHeight = height; - - if (needsRepaint) - tinyMCE.selectedInstance.repaint(); - } - - tinyMCE.execCommand('mceEndUndoLevel'); -}; - -TinyMCE.prototype.getElementByAttributeValue = function(node, element_name, attrib, value) { - var elements = this.getElementsByAttributeValue(node, element_name, attrib, value); - if (elements.length == 0) - return null; - - return elements[0]; -}; - -TinyMCE.prototype.getElementsByAttributeValue = function(node, element_name, attrib, value) { - var elements = new Array(); - - if (node && node.nodeName.toLowerCase() == element_name) { - if (node.getAttribute(attrib) && node.getAttribute(attrib).indexOf(value) != -1) - elements[elements.length] = node; - } - - if (node && node.hasChildNodes()) { - for (var x=0, n=node.childNodes.length; x]*>/gi, ''); + h = h.replace(new RegExp(' (rowspan="1"|colspan="1")', 'g'), ''); + h = h.replace(/


    <\/p>/g, '
    '); + h = h.replace(/

    ( | )<\/p>


    ( | )<\/p>/g, '


    '); + h = h.replace(/
    '); + h = h.replace(/

    \s*
    \s*<\/p>/g, '

     

    '); + h = h.replace(/

    \s*( | )\s*
    \s*( | )\s*<\/p>/g, '

     

    '); + h = h.replace(/

    \s*( | )\s*
    \s*<\/p>/g, '

     

    '); + h = h.replace(/

    \s*
    \s* \s*<\/p>/g, '

     

    '); + h = h.replace(/(.*?)<\/a>/g, '$1'); + h = h.replace(/]*)>\s*<\/p>/g, ' 

    '); + + // Clean body + if (/^\s*(
    |

     <\/p>|

     <\/p>|

    <\/p>)\s*$/.test(h)) + h = ''; + + // If preformatted + if (s.preformatted) { + h = h.replace(/^

    /, '');
    +		h = h.replace(/<\/pre>$/, '');
    +		h = '
    ' + h + '
    '; + } + + // Gecko specific processing + if (tinyMCE.isGecko) { + h = h.replace(//g, ''); + h = h.replace(/]*)>\s*
    \s*<\/td>/g, ' '); + } + + if (s.force_br_newlines) + h = h.replace(/

    ( | )<\/p>/g, '
    '); + + // Call custom cleanup code + h = tinyMCE._customCleanup(inst, on_save ? "get_from_editor" : "insert_to_editor", h); + + // Remove internal classes + if (on_save) { + h = h.replace(new RegExp(' ?(mceItem[a-zA-Z0-9]*|' + s.visual_table_class + ')', 'g'), ''); + h = h.replace(new RegExp(' ?class=""', 'g'), ''); + } + + if (s.remove_linebreaks && !c.settings.indent) + h = h.replace(/\n|\r/g, ' '); + + if (d) + t4 = new Date().getTime(); + + if (on_save && c.settings.indent) + h = c.formatHTML(h); + + // If encoding (not recommended option) + if (on_submit && (s.encoding == "xml" || s.encoding == "html")) + h = c.xmlEncode(h); + + if (d) + t5 = new Date().getTime(); + + if (c.settings.debug) + tinyMCE.debug("Cleanup in ms: Pre=" + (t2-t1) + ", Serialize: " + (t3-t2) + ", Post: " + (t4-t3) + ", Format: " + (t5-t4) + ", Sum: " + (t5-t1) + "."); + + return h; +}; + +function TinyMCE_Cleanup() { + this.isMSIE = (navigator.appName == "Microsoft Internet Explorer"); + this.rules = tinyMCE.clearArray(new Array()); + + // Default config + this.settings = { + indent_elements : 'head,table,tbody,thead,tfoot,form,tr,ul,ol,blockquote,object', + newline_before_elements : 'h1,h2,h3,h4,h5,h6,pre,address,div,ul,ol,li,meta,option,area,title,link,base,script,td', + newline_after_elements : 'br,hr,p,pre,address,div,ul,ol,meta,option,area,link,base,script', + newline_before_after_elements : 'html,head,body,table,thead,tbody,tfoot,tr,form,ul,ol,blockquote,p,object,param,hr,div', + indent_char : '\t', + indent_levels : 1, + entity_encoding : 'raw', + valid_elements : '*[*]', + entities : '', + url_converter : '', + invalid_elements : '', + verify_html : false + }; + + this.vElements = tinyMCE.clearArray(new Array()); + this.vElementsRe = ''; + this.closeElementsRe = /^(IMG|BR|HR|LINK|META|BASE|INPUT|BUTTON)$/; + this.codeElementsRe = /^(SCRIPT|STYLE)$/; + this.serializationId = 0; + this.mceAttribs = { + href : 'mce_href', + src : 'mce_src', + type : 'mce_type' + }; +} + +TinyMCE_Cleanup.prototype = { + init : function(s) { + var n, a, i, ir, or, st; + + for (n in s) + this.settings[n] = s[n]; + + // Setup code formating + s = this.settings; + + // Setup regexps + this.inRe = this._arrayToRe(s.indent_elements.split(','), '', '^<(', ')[^>]*'); + this.ouRe = this._arrayToRe(s.indent_elements.split(','), '', '^<\\/(', ')[^>]*'); + this.nlBeforeRe = this._arrayToRe(s.newline_before_elements.split(','), 'gi', '<(', ')([^>]*)>'); + this.nlAfterRe = this._arrayToRe(s.newline_after_elements.split(','), 'gi', '<(', ')([^>]*)>'); + this.nlBeforeAfterRe = this._arrayToRe(s.newline_before_after_elements.split(','), 'gi', '<(\\/?)(', ')([^>]*)>'); + + if (s.invalid_elements != '') + this.iveRe = this._arrayToRe(s.invalid_elements.toUpperCase().split(','), 'g', '^(', ')$'); + else + this.iveRe = null; + + // Setup separator + st = ''; + for (i=0; i 1) { + r.vAttribsRe = '^('; + a = this.split(/\|/, p[1]); + + for (i=0; i 0) { + if (av[0].charAt(0) == ':') { + if (!r.forceAttribs) + r.forceAttribs = tinyMCE.clearArray(new Array()); + + r.forceAttribs[t.toLowerCase()] = av[0].substring(1); + } else if (av[0].charAt(0) == '=') { + if (!r.defaultAttribs) + r.defaultAttribs = tinyMCE.clearArray(new Array()); + + dv = av[0].substring(1); + + r.defaultAttribs[t.toLowerCase()] = dv == "" ? "mce_empty" : dv; + } else if (av[0].charAt(0) == '<') { + if (!r.validAttribValues) + r.validAttribValues = tinyMCE.clearArray(new Array()); + + r.validAttribValues[t.toLowerCase()] = this._arrayToRe(this.split('?', av[0].substring(1)), ''); + } + } + + r.vAttribsRe += '' + t.toLowerCase() + (i != a.length - 1 ? '|' : ''); + + a[i] = t.toLowerCase(); + } + + r.vAttribsRe += ')$'; + r.vAttribsRe = this._wildcardToRe(r.vAttribsRe); + r.vAttribsReIsWild = new RegExp('\\*|\\?|\\+', 'g').test(r.vAttribsRe); + r.vAttribsRe = new RegExp(r.vAttribsRe); + r.vAttribs = a.reverse(); + + //tinyMCE.debug(r.tag, r.oTagName, r.vAttribsRe, r.vAttribsReWC); + } else { + r.vAttribsRe = ''; + r.vAttribs = tinyMCE.clearArray(new Array()); + r.vAttribsReIsWild = false; + } + + or[r.tag] = r; + } + } + + return or; + }, + + serializeNodeAsXML : function(n) { + var s, b; + + if (!this.xmlDoc) { + if (this.isMSIE) { + try {this.xmlDoc = new ActiveXObject('MSXML2.DOMDocument');} catch (e) {} + + if (!this.xmlDoc) + try {this.xmlDoc = new ActiveXObject('Microsoft.XmlDom');} catch (e) {} + } else + this.xmlDoc = document.implementation.createDocument('', '', null); + + if (!this.xmlDoc) + alert("Error XML Parser could not be found."); + } + + if (this.xmlDoc.firstChild) + this.xmlDoc.removeChild(this.xmlDoc.firstChild); + + b = this.xmlDoc.createElement("html"); + b = this.xmlDoc.appendChild(b); + + this._convertToXML(n, b); + + if (this.isMSIE) + return this.xmlDoc.xml; + else + return new XMLSerializer().serializeToString(this.xmlDoc); + }, + + _convertToXML : function(n, xn) { + var xd, el, i, l, cn, at, no, hc = false; + + if (this._isDuplicate(n)) + return; + + xd = this.xmlDoc; + + switch (n.nodeType) { + case 1: // Element + hc = n.hasChildNodes(); + + el = xd.createElement(n.nodeName.toLowerCase()); + + at = n.attributes; + for (i=at.length-1; i>-1; i--) { + no = at[i]; + + if (no.specified && no.nodeValue) + el.setAttribute(no.nodeName.toLowerCase(), no.nodeValue); + } + + if (!hc && !this.closeElementsRe.test(n.nodeName)) + el.appendChild(xd.createTextNode("")); + + xn = xn.appendChild(el); + break; + + case 3: // Text + xn.appendChild(xd.createTextNode(n.nodeValue)); + return; + + case 8: // Comment + xn.appendChild(xd.createComment(n.nodeValue)); + return; + } + + if (hc) { + cn = n.childNodes; + + for (i=0, l=cn.length; i + if ((tinyMCE.isMSIE && !tinyMCE.isOpera) && n.nodeName.indexOf('/') != -1) + break; + + if (this.vElementsRe.test(n.nodeName) && (!this.iveRe || !this.iveRe.test(n.nodeName))) { + va = true; + + r = this.rules[n.nodeName]; + if (!r) { + at = this.rules; + for (no in at) { + if (at[no] && at[no].validRe.test(n.nodeName)) { + r = at[no]; + break; + } + } + } + + en = r.isWild ? n.nodeName.toLowerCase() : r.oTagName; + f = r.fill; + + if (r.removeEmpty && !hc) + return ""; + + h += '<' + en; + + if (r.vAttribsReIsWild) { + // Serialize wildcard attributes + at = n.attributes; + for (i=at.length-1; i>-1; i--) { + no = at[i]; + if (no.specified && r.vAttribsRe.test(no.nodeName)) + h += this._serializeAttribute(n, r, no.nodeName); + } + } else { + // Serialize specific attributes + for (i=r.vAttribs.length-1; i>-1; i--) + h += this._serializeAttribute(n, r, r.vAttribs[i]); + } + + // Serialize mce_ atts + if (!this.settings.on_save) { + at = this.mceAttribs; + + for (no in at) { + if (at[no]) + h += this._serializeAttribute(n, r, at[no]); + } + } + + // Close these + if (this.closeElementsRe.test(n.nodeName)) + return h + ' />'; + + h += '>'; + + if (this.isMSIE && this.codeElementsRe.test(n.nodeName)) + h += n.innerHTML; + } + break; + + case 3: // Text + if (n.parentNode && this.codeElementsRe.test(n.parentNode.nodeName)) + return this.isMSIE ? '' : n.nodeValue; + + return this.xmlEncode(n.nodeValue); + + case 8: // Comment + return ""; + } + + if (hc) { + cn = n.childNodes; + + for (i=0, l=cn.length; i'; + + return h; + }, + + _serializeAttribute : function(n, r, an) { + var av = '', t, os = this.settings.on_save; + + if (os && (an.indexOf('mce_') == 0 || an.indexOf('_moz') == 0)) + return ''; + + if (os && this.mceAttribs[an]) + av = this._getAttrib(n, this.mceAttribs[an]); + + if (av.length == 0) + av = this._getAttrib(n, an); + + if (av.length == 0 && r.defaultAttribs && (t = r.defaultAttribs[an])) { + av = t; + + if (av == "mce_empty") + return " " + an + '=""'; + } + + if (r.forceAttribs && (t = r.forceAttribs[an])) + av = t; + + if (os && av.length != 0 && this.settings.url_converter.length != 0 && /^(src|href|longdesc)$/.test(an)) + av = eval(this.settings.url_converter + '(this, n, av)'); + + if (av.length != 0 && r.validAttribValues && r.validAttribValues[an] && !r.validAttribValues[an].test(av)) + return ""; + + if (av.length != 0 && av == "{$uid}") + av = "uid_" + (this.idCount++); + + if (av.length != 0) + return " " + an + "=" + '"' + this.xmlEncode(av) + '"'; + + return ""; + }, + + formatHTML : function(h) { + var s = this.settings, p = '', i = 0, li = 0, o = '', l; + + h = h.replace(/\r/g, ''); // Windows sux, isn't carriage return a thing of the past :) + h = '\n' + h; + h = h.replace(new RegExp('\\n\\s+', 'gi'), '\n'); // Remove previous formatting + h = h.replace(this.nlBeforeRe, '\n<$1$2>'); + h = h.replace(this.nlAfterRe, '<$1$2>\n'); + h = h.replace(this.nlBeforeAfterRe, '\n<$1$2$3>\n'); + h += '\n'; + + //tinyMCE.debug(h); + + while ((i = h.indexOf('\n', i + 1)) != -1) { + if ((l = h.substring(li + 1, i)).length != 0) { + if (this.ouRe.test(l) && p.length >= s.indent_levels) + p = p.substring(s.indent_levels); + + o += p + l + '\n'; + + if (this.inRe.test(l)) + p += this.inStr; + } + + li = i; + } + + //tinyMCE.debug(h); + + return o; + }, + + xmlEncode : function(s) { + var i, l, e, o = '', c; + + this._setupEntities(); // Will intialize lookup table + + switch (this.settings.entity_encoding) { + case "raw": + return tinyMCE.xmlEncode(s); + + case "named": + for (i=0, l=s.length; i 127 || c == 60 || c == 62 || c == 38 || c == 39 || c == 34) + o += '&#' + c + ";"; + else + o += String.fromCharCode(c); + } + + return o; + } + + return s; + }, + + split : function(re, s) { + var c = s.split(re); + var i, l, o = new Array(); + + for (i=0, l=c.length; i gets converted to


    . + h = h.replace(/\s\/>/g, '>'); + + // Since MSIE auto generated emtpy P tags some times we must tell it to keep the real ones + h = h.replace(/]*)>\u00A0?<\/p>/gi, ' 

    '); // Keep empty paragraphs + h = h.replace(/]*)> <\/p>/gi, ' 

    '); // Keep empty paragraphs + + // Remove first comment + e.innerHTML = tinyMCE.uniqueTag + h; + e.firstChild.removeNode(true); + + // Remove weird auto generated empty paragraphs unless it's supposed to be there + nl = e.getElementsByTagName("p"); + for (i=nl.length-1; i>=0; i--) { + n = nl[i]; + + if (n.nodeName == 'P' && !n.hasChildNodes() && !n.mce_keep) + n.parentNode.removeChild(n); + } + } else { + h = this.fixGeckoBaseHREFBug(1, e, h); + e.innerHTML = h; + this.fixGeckoBaseHREFBug(2, e, h); + } +}; + +TinyMCE_Engine.prototype.getOuterHTML = function(e) { + if (tinyMCE.isMSIE) + return e.outerHTML; + + var d = e.ownerDocument.createElement("body"); + d.appendChild(e); + return d.innerHTML; +}; + +TinyMCE_Engine.prototype.setOuterHTML = function(e, h) { + if (tinyMCE.isMSIE) { + e.outerHTML = h; + return; + } + + var d = e.ownerDocument.createElement("body"); + d.innerHTML = h; + e.parentNode.replaceChild(d.firstChild, e); +}; + +TinyMCE_Engine.prototype._getElementById = function(id, d) { + var e, i, j, f; + + if (typeof(d) == "undefined") + d = document; + + e = d.getElementById(id); + if (!e) { + f = d.forms; + + for (i=0; i 0); - - if (tinyMCE.settings['custom_undo_redo']) { - undoIndex = inst.undoIndex; - undoLevels = inst.undoLevels.length; - } - - tinyMCE.executeCallback('handleNodeChangeCallback', '_handleNodeChange', 0, editorId, elm, undoIndex, undoLevels, inst.visualAid, anySelection, setup_content); - } - } - - if (this.selectedInstance && (typeof(focus) == "undefined" || focus)) - this.selectedInstance.contentWindow.focus(); -}; - -TinyMCE.prototype._customCleanup = function(inst, type, content) { - // Call custom cleanup - var customCleanup = tinyMCE.settings['cleanup_callback']; - if (customCleanup != "" && eval("typeof(" + customCleanup + ")") != "undefined") - content = eval(customCleanup + "(type, content, inst);"); - - // Trigger plugin cleanups - var plugins = tinyMCE.getParam('plugins', '', true, ','); - for (var i=0; i 0) - className += " "; - - className += classNames[i]; - } - - return className; -}; - -TinyMCE.prototype.handleVisualAid = function(el, deep, state, inst) { - if (!el) - return; - - var tableElement = null; - - switch (el.nodeName) { - case "TABLE": - var oldW = el.style.width; - var oldH = el.style.height; - var bo = tinyMCE.getAttrib(el, "border"); - - bo = bo == "" || bo == "0" ? true : false; - - tinyMCE.setAttrib(el, "class", tinyMCE.getVisualAidClass(tinyMCE.getAttrib(el, "class"), state && bo)); - - el.style.width = oldW; - el.style.height = oldH; - - for (var y=0; y 0) { - tinyMCE.setAttrib(s[i], 'size', fSize); - s[i].style.fontSize = ''; - } - - var fFace = s[i].style.fontFamily; - if (fFace != null && fFace != "") { - tinyMCE.setAttrib(s[i], 'face', fFace); - s[i].style.fontFamily = ''; - } - - var fColor = s[i].style.color; - if (fColor != null && fColor != "") { - tinyMCE.setAttrib(s[i], 'color', tinyMCE.convertRGBToHex(fColor)); - s[i].style.color = ''; - } - } -}; - -TinyMCE.prototype.convertFontsToSpans = function(doc) { - var sizes = tinyMCE.getParam('font_size_style_values').replace(/\s+/, '').split(','); - - var h = doc.body.innerHTML; - h = h.replace(/ 0 && fSize < 8) { - if (fsClasses != null) - tinyMCE.setAttrib(s[i], 'class', fsClasses[fSize-1]); - else - s[i].style.fontSize = sizes[fSize-1]; - } - - s[i].removeAttribute('size'); - } - - if (fFace != "") { - s[i].style.fontFamily = fFace; - s[i].removeAttribute('face'); - } - - if (fColor != "") { - s[i].style.color = fColor; - s[i].removeAttribute('color'); - } - } -}; - -/* -TinyMCE.prototype.applyClassesToFonts = function(doc, size) { - var f = doc.getElementsByTagName("font"); - for (var i=0; i=0; x--) - tinyMCE.insertAfter(cn[x], an[i]); - } - } -}; - -TinyMCE.prototype._setHTML = function(doc, html_content) { - // Force closed anchors open - //html_content = html_content.replace(new RegExp('', 'gi'), '
    '); - - html_content = tinyMCE.cleanupHTMLCode(html_content); - - // Try innerHTML if it fails use pasteHTML in MSIE - try { - tinyMCE.setInnerHTML(doc.body, html_content); - } catch (e) { - if (this.isMSIE) - doc.body.createTextRange().pasteHTML(html_content); - } - - // Content duplication bug fix - if (tinyMCE.isMSIE && tinyMCE.settings['fix_content_duplication']) { - // Remove P elements in P elements - var paras = doc.getElementsByTagName("P"); - for (var i=0; i<\/o:p>", "
    "); - html = tinyMCE.regexpReplace(html, " <\/o:p>", ""); - html = tinyMCE.regexpReplace(html, "", ""); - html = tinyMCE.regexpReplace(html, "

    <\/p>", ""); - html = tinyMCE.regexpReplace(html, "

    <\/p>\r\n

    <\/p>", ""); - html = tinyMCE.regexpReplace(html, "

     <\/p>", "
    "); - html = tinyMCE.regexpReplace(html, "

    \s*(

    \s*)?", "

    "); - html = tinyMCE.regexpReplace(html, "<\/p>\s*(<\/p>\s*)?", "

    "); - } - - // Always set the htmlText output - tinyMCE.setInnerHTML(doc.body, html); - } - - tinyMCE.cleanupAnchors(doc); - - if (tinyMCE.getParam("convert_fonts_to_spans")) - tinyMCE.convertSpansToFonts(doc); -}; - -TinyMCE.prototype.getImageSrc = function(str) { - var pos = -1; - - if (!str) - return ""; - - if ((pos = str.indexOf('this.src=')) != -1) { - var src = str.substring(pos + 10); - - src = src.substring(0, src.indexOf('\'')); - - return src; - } - - return ""; -}; - -TinyMCE.prototype._getElementById = function(element_id) { - var elm = document.getElementById(element_id); - if (!elm) { - // Check for element in forms - for (var j=0; j 0) { - for (var x=0; x 0) - tinyMCE.cssClasses = output; - - return output; -}; - -TinyMCE.prototype.regexpReplace = function(in_str, reg_exp, replace_str, opts) { - if (in_str == null) - return in_str; - - if (typeof(opts) == "undefined") - opts = 'g'; - - var re = new RegExp(reg_exp, opts); - return in_str.replace(re, replace_str); -}; - -TinyMCE.prototype.trim = function(str) { - return str.replace(/^\s*|\s*$/g, ""); -}; - -TinyMCE.prototype.cleanupEventStr = function(str) { - str = "" + str; - str = str.replace('function anonymous()\n{\n', ''); - str = str.replace('\n}', ''); - str = str.replace(/^return true;/gi, ''); // Remove event blocker - - return str; -}; - -TinyMCE.prototype.getAbsPosition = function(node) { - var pos = new Object(); - - pos.absLeft = pos.absTop = 0; - - var parentNode = node; - while (parentNode) { - pos.absLeft += parentNode.offsetLeft; - pos.absTop += parentNode.offsetTop; - - parentNode = parentNode.offsetParent; - } - - return pos; -}; - -TinyMCE.prototype.getControlHTML = function(control_name) { - var themePlugins = tinyMCE.getParam('plugins', '', true, ','); - var templateFunction; - - // Is it defined in any plugins - for (var i=themePlugins.length; i>=0; i--) { - templateFunction = 'TinyMCE_' + themePlugins[i] + "_getControlHTML"; - if (eval("typeof(" + templateFunction + ")") != 'undefined') { - var html = eval(templateFunction + "('" + control_name + "');"); - if (html != "") - return tinyMCE.replaceVar(html, "pluginurl", tinyMCE.baseURL + "/plugins/" + themePlugins[i]); - } - } - - return eval('TinyMCE_' + tinyMCE.settings['theme'] + "_getControlHTML" + "('" + control_name + "');"); -}; - -TinyMCE.prototype._themeExecCommand = function(editor_id, element, command, user_interface, value) { - var themePlugins = tinyMCE.getParam('plugins', '', true, ','); - var templateFunction; - - // Is it defined in any plugins - for (var i=themePlugins.length; i>=0; i--) { - templateFunction = 'TinyMCE_' + themePlugins[i] + "_execCommand"; - if (eval("typeof(" + templateFunction + ")") != 'undefined') { - if (eval(templateFunction + "(editor_id, element, command, user_interface, value);")) - return true; - } - } - - // Theme funtion - templateFunction = 'TinyMCE_' + tinyMCE.settings['theme'] + "_execCommand"; - if (eval("typeof(" + templateFunction + ")") != 'undefined') - return eval(templateFunction + "(editor_id, element, command, user_interface, value);"); - - // Pass to normal - return false; -}; - -TinyMCE.prototype._getThemeFunction = function(suffix, skip_plugins) { - if (skip_plugins) - return 'TinyMCE_' + tinyMCE.settings['theme'] + suffix; - - var themePlugins = tinyMCE.getParam('plugins', '', true, ','); - var templateFunction; - - // Is it defined in any plugins - for (var i=themePlugins.length; i>=0; i--) { - templateFunction = 'TinyMCE_' + themePlugins[i] + suffix; - if (eval("typeof(" + templateFunction + ")") != 'undefined') - return templateFunction; - } - - return 'TinyMCE_' + tinyMCE.settings['theme'] + suffix; -}; - - -TinyMCE.prototype.isFunc = function(func_name) { - if (func_name == null || func_name == "") - return false; - - return eval("typeof(" + func_name + ")") != "undefined"; -}; - -TinyMCE.prototype.exec = function(func_name, args) { - var str = func_name + '('; - - // Add all arguments - for (var i=3; i 1 && tinyMCE.currentConfig != this.settings['index']) { - tinyMCE.settings = this.settings; - tinyMCE.currentConfig = this.settings['index']; - } -}; - -TinyMCEControl.prototype.convertAllRelativeURLs = function() { - var body = this.getBody(); - +TinyMCE_Engine.prototype.convertAllRelativeURLs = function(body) { // Convert all image URL:s to absolute URL var elms = body.getElementsByTagName("img"); for (var i=0; i bookmark.index) + rng.addElement(nl[bookmark.index]); + } else { + rng = inst.getSel().createRange(); + rng.moveToElementText(inst.getBody()); + rng.collapse(true); + rng.moveStart('character', bookmark.start); + rng.moveEnd('character', bookmark.length); + } + + rng.select(); + + win.scrollTo(bookmark.scrollX, bookmark.scrollY); + return true; + } + + if (tinyMCE.isGecko && bookmark.rng) { + sel.removeAllRanges(); + sel.addRange(bookmark.rng); + win.scrollTo(bookmark.scrollX, bookmark.scrollY); + return true; + } + + if (tinyMCE.isGecko) { + // try { + rng = doc.createRange(); + + nl = doc.getElementsByTagName(bookmark.startTag); + if (nl.length > bookmark.start) + rng.setStart(nl[bookmark.start].childNodes[bookmark.startIndex], bookmark.startOffset); + + nl = doc.getElementsByTagName(bookmark.endTag); + if (nl.length > bookmark.end) + rng.setEnd(nl[bookmark.end].childNodes[bookmark.endIndex], bookmark.endOffset); + + sel.removeAllRanges(); + sel.addRange(rng); + /* } catch { + // Ignore + }*/ + + win.scrollTo(bookmark.scrollX, bookmark.scrollY); + return true; + } + + return false; + }, + + selectNode : function(node, collapse, select_text_node, to_start) { + var inst = this.instance, sel, rng, nodes; + + if (!node) + return; + + if (typeof(collapse) == "undefined") + collapse = true; + + if (typeof(select_text_node) == "undefined") + select_text_node = false; + + if (typeof(to_start) == "undefined") + to_start = true; + + if (tinyMCE.isMSIE) { + rng = inst.getBody().createTextRange(); + + try { + rng.moveToElementText(node); + + if (collapse) + rng.collapse(to_start); + + rng.select(); + } catch (e) { + // Throws illigal agrument in MSIE some times + } + } else { + sel = this.getSel(); + + if (!sel) + return; + + if (tinyMCE.isSafari) { + sel.setBaseAndExtent(node, 0, node, node.innerText.length); + + if (collapse) { + if (to_start) + sel.collapseToStart(); + else + sel.collapseToEnd(); + } + + this.scrollToNode(node); + + return; + } + + rng = inst.getDoc().createRange(); + + if (select_text_node) { + // Find first textnode in tree + nodes = tinyMCE.getNodeTree(node, new Array(), 3); + if (nodes.length > 0) + rng.selectNodeContents(nodes[0]); + else + rng.selectNodeContents(node); + } else + rng.selectNode(node); if (collapse) { - if (to_start) - sel.realSelection.collapseToStart(); - else - sel.realSelection.collapseToEnd(); + // Special treatment of textnode collapse + if (!to_start && node.nodeType == 3) { + rng.setStart(node, node.nodeValue.length); + rng.setEnd(node, node.nodeValue.length); + } else + rng.collapse(to_start); } - this.scrollToNode(node); - - return; + sel.removeAllRanges(); + sel.addRange(rng); } - var rng = this.getDoc().createRange(); + this.scrollToNode(node); - if (select_text_node) { - // Find first textnode in tree - var nodes = tinyMCE.getNodeTree(node, new Array(), 3); - if (nodes.length > 0) - rng.selectNodeContents(nodes[0]); - else - rng.selectNodeContents(node); - } else - rng.selectNode(node); + // Set selected element + tinyMCE.selectedElement = null; + if (node.nodeType == 1) + tinyMCE.selectedElement = node; + }, - if (collapse) { - // Special treatment of textnode collapse - if (!to_start && node.nodeType == 3) { - rng.setStart(node, node.nodeValue.length); - rng.setEnd(node, node.nodeValue.length); - } else - rng.collapse(to_start); - } + scrollToNode : function(node) { + var inst = this.instance; + var pos, doc, scrollX, scrollY, height; - sel.removeAllRanges(); - sel.addRange(rng); - } + // Scroll to node position + pos = tinyMCE.getAbsPosition(node); + doc = inst.getDoc(); + scrollX = doc.body.scrollLeft + doc.documentElement.scrollLeft; + scrollY = doc.body.scrollTop + doc.documentElement.scrollTop; + height = tinyMCE.isMSIE ? document.getElementById(inst.editorId).style.pixelHeight : inst.targetElement.clientHeight; - this.scrollToNode(node); + // Only scroll if out of visible area + if (!tinyMCE.settings['auto_resize'] && !(pos.absTop > scrollY && pos.absTop < (scrollY - 25 + height))) + inst.contentWindow.scrollTo(pos.absLeft, pos.absTop - height + 25); + }, - // Set selected element - tinyMCE.selectedElement = null; - if (node.nodeType == 1) - tinyMCE.selectedElement = node; -}; + getSel : function() { + var inst = this.instance; -TinyMCEControl.prototype.scrollToNode = function(node) { - // Scroll to node position - var pos = tinyMCE.getAbsPosition(node); - var doc = this.getDoc(); - var scrollX = doc.body.scrollLeft + doc.documentElement.scrollLeft; - var scrollY = doc.body.scrollTop + doc.documentElement.scrollTop; - var height = tinyMCE.isMSIE ? document.getElementById(this.editorId).style.pixelHeight : this.targetElement.clientHeight; + if (tinyMCE.isMSIE && !tinyMCE.isOpera) + return inst.getDoc().selection; - // Only scroll if out of visible area - if (!tinyMCE.settings['auto_resize'] && !(pos.absTop > scrollY && pos.absTop < (scrollY - 25 + height))) - this.contentWindow.scrollTo(pos.absLeft, pos.absTop - height + 25); -}; + return inst.contentWindow.getSelection(); + }, -TinyMCEControl.prototype.getBody = function() { - return this.getDoc().body; -}; + getRng : function() { + var inst = this.instance; + var sel = this.getSel(); -TinyMCEControl.prototype.getDoc = function() { - return this.contentWindow.document; -}; + if (sel == null) + return null; -TinyMCEControl.prototype.getWin = function() { - return this.contentWindow; -}; + if (tinyMCE.isMSIE && !tinyMCE.isOpera) + return sel.createRange(); -TinyMCEControl.prototype.getSel = function() { - if (tinyMCE.isMSIE && !tinyMCE.isOpera) - return this.getDoc().selection; + if (tinyMCE.isSafari && !sel.getRangeAt) + return '' + window.getSelection(); - var sel = this.contentWindow.getSelection(); + return sel.getRangeAt(0); + }, - // Fake getRangeAt - if (tinyMCE.isSafari && !sel.getRangeAt) { - var newSel = new Object(); - var doc = this.getDoc(); + getFocusElement : function() { + var inst = this.instance; - function getRangeAt(idx) { - var rng = new Object(); + if (tinyMCE.isMSIE && !tinyMCE.isOpera) { + var doc = inst.getDoc(); + var rng = doc.selection.createRange(); - rng.startContainer = this.focusNode; - rng.endContainer = this.anchorNode; - rng.commonAncestorContainer = this.focusNode; - rng.createContextualFragment = function (html) { - // Seems to be a tag - if (html.charAt(0) == '<') { - var elm = doc.createElement("div"); + // if (rng.collapse) + // rng.collapse(true); - elm.innerHTML = html; - - return elm.firstChild; - } - - return doc.createTextNode("UNSUPPORTED, DUE TO LIMITATIONS IN SAFARI!"); - }; - - rng.deleteContents = function () { - doc.execCommand("Delete", false, ""); - }; - - return rng; - } - - // Patch selection - - newSel.focusNode = sel.baseNode; - newSel.focusOffset = sel.baseOffset; - newSel.anchorNode = sel.extentNode; - newSel.anchorOffset = sel.extentOffset; - newSel.getRangeAt = getRangeAt; - newSel.text = "" + sel; - newSel.realSelection = sel; - - newSel.toString = function () {return this.text;}; - - return newSel; - } - - return sel; -}; - -TinyMCEControl.prototype.getRng = function() { - var sel = this.getSel(); - if (sel == null) - return null; - - if (tinyMCE.isMSIE && !tinyMCE.isOpera) - return sel.createRange(); - - if (tinyMCE.isSafari) { - var rng = this.getDoc().createRange(); - var sel = this.getSel().realSelection; - - rng.setStart(sel.baseNode, sel.baseOffset); - rng.setEnd(sel.extentNode, sel.extentOffset); - - return rng; - } - - return this.getSel().getRangeAt(0); -}; - -TinyMCEControl.prototype._insertPara = function(e) { - function isEmpty(para) { - function isEmptyHTML(html) { - return html.replace(new RegExp('[ \t\r\n]+', 'g'), '').toLowerCase() == ""; - } - - // Check for images - if (para.getElementsByTagName("img").length > 0) - return false; - - // Check for tables - if (para.getElementsByTagName("table").length > 0) - return false; - - // Check for HRs - if (para.getElementsByTagName("hr").length > 0) - return false; - - // Check all textnodes - var nodes = tinyMCE.getNodeTree(para, new Array(), 3); - for (var i=0; i <" + blockName + "> "; - paraAfter = body.childNodes[1]; + if (inst.isHidden()) + return inst.getBody(); + + var sel = this.getSel(); + var rng = this.getRng(); + + if (!sel || !rng) + return null; + + var elm = rng.commonAncestorContainer; + //var elm = (sel && sel.anchorNode) ? sel.anchorNode : null; + + // Handle selection a image or other control like element such as anchors + if (!rng.collapsed) { + // Is selection small + if (rng.startContainer == rng.endContainer) { + if (rng.startOffset - rng.endOffset < 2) { + if (rng.startContainer.hasChildNodes()) + elm = rng.startContainer.childNodes[rng.startOffset]; + } + } + } + + // Get the element parent of the node + elm = tinyMCE.getParentElement(elm); + + //if (tinyMCE.selectedElement != null && tinyMCE.selectedElement.nodeName.toLowerCase() == "img") + // elm = tinyMCE.selectedElement; } - this.selectNode(paraAfter, true, true); - - return true; + return elm; } - - // Place first part within new paragraph - if (startChop.nodeName == blockName) - rngBefore.setStart(startChop, 0); - else - rngBefore.setStartBefore(startChop); - - rngBefore.setEnd(startNode, startOffset); - paraBefore.appendChild(rngBefore.cloneContents()); - - // Place secound part within new paragraph - rngAfter.setEndAfter(endChop); - rngAfter.setStart(endNode, endOffset); - var contents = rngAfter.cloneContents(); - - if (contents.firstChild && contents.firstChild.nodeName == blockName) { -/* var nodes = contents.firstChild.childNodes; - for (var i=0; i customUndoLevels) { + for (var i=0; i 0) { + this.undoIndex--; + tinyMCE.setInnerHTML(inst.getBody(), this.undoLevels[this.undoIndex].content); + inst.repaint(); + if (inst.settings.custom_undo_redo_restore_selection) + inst.selection.moveToBookmark(this.undoLevels[this.undoIndex].bookmark); + } + + // tinyMCE.debug("Undo - undo levels:" + this.undoLevels.length + ", undo index: " + this.undoIndex); + }, + + redo : function() { + var inst = this.instance; + + tinyMCE.execCommand("mceEndTyping"); + + if (this.undoIndex < (this.undoLevels.length-1)) { + this.undoIndex++; + tinyMCE.setInnerHTML(inst.getBody(), this.undoLevels[this.undoIndex].content); + inst.repaint(); +// if (this.undoIndex > 0) +// inst.selection.moveToBookmark(this.undoLevels[this.undoIndex-1].bookmark); + if (inst.settings.custom_undo_redo_restore_selection) + inst.selection.moveToBookmark(this.undoLevels[this.undoIndex].bookmark); + // tinyMCE.debug("Redo - undo levels:" + this.undoLevels.length + ", undo index: " + this.undoIndex); + } + + tinyMCE.triggerNodeChange(); + } +}; + +/* file:jscripts/tiny_mce/classes/TinyMCE_ForceParagraphs.class.js */ + +var TinyMCE_ForceParagraphs = { + _insertPara : function(inst, e) { + function isEmpty(para) { + function isEmptyHTML(html) { + return html.replace(new RegExp('[ \t\r\n]+', 'g'), '').toLowerCase() == ""; + } + + // Check for images + if (para.getElementsByTagName("img").length > 0) + return false; + + // Check for tables + if (para.getElementsByTagName("table").length > 0) + return false; + + // Check for HRs + if (para.getElementsByTagName("hr").length > 0) + return false; + + // Check all textnodes + var nodes = tinyMCE.getNodeTree(para, new Array(), 3); + for (var i=0; i 0) - rng.pasteHTML('
    ' + rng.htmlText + "
    "); - - tinyMCE.triggerNodeChange(); - return; - } - } - } - - switch (command) { - case "mceRepaint": - this.repaint(); - return true; - - case "mceStoreSelection": - this.selectionBookmark = this.getBookmark(); - return true; - - case "mceRestoreSelection": - this.moveToBookmark(this.selectionBookmark); - return true; - - case "InsertUnorderedList": - case "InsertOrderedList": - var tag = (command == "InsertUnorderedList") ? "ul" : "ol"; - - if (tinyMCE.isSafari) - this.execCommand("mceInsertContent", false, "<" + tag + ">
  •  
  • <" + tag + ">"); - else - this.getDoc().execCommand(command, user_interface, value); - - tinyMCE.triggerNodeChange(); - break; - - case "Strikethrough": - if (tinyMCE.isSafari) - this.execCommand("mceInsertContent", false, "" + this.getSelectedHTML() + ""); - else - this.getDoc().execCommand(command, user_interface, value); - - tinyMCE.triggerNodeChange(); - break; - - case "mceSelectNode": - this.selectNode(value); - tinyMCE.triggerNodeChange(); - tinyMCE.selectedNode = value; - break; - - case "FormatBlock": - if (value == null || value == "") { - var elm = tinyMCE.getParentElement(this.getFocusElement(), "p,div,h1,h2,h3,h4,h5,h6,pre,address"); - - if (elm) - this.execCommand("mceRemoveNode", false, elm); - } else - this.getDoc().execCommand("FormatBlock", false, value); - - tinyMCE.triggerNodeChange(); - - break; - - case "mceRemoveNode": - if (!value) - value = tinyMCE.getParentElement(this.getFocusElement()); - - if (tinyMCE.isMSIE) { - value.outerHTML = value.innerHTML; - } else { - var rng = value.ownerDocument.createRange(); - rng.setStartBefore(value); - rng.setEndAfter(value); + // Delete old contents rng.deleteContents(); - rng.insertNode(rng.createContextualFragment(value.innerHTML)); + rngAfter.deleteContents(); + rngBefore.deleteContents(); + + // Insert new paragraphs + paraAfter.normalize(); + rngBefore.insertNode(paraAfter); + paraBefore.normalize(); + rngBefore.insertNode(paraBefore); + + // tinyMCE.debug("1: ", paraBefore.innerHTML, paraAfter.innerHTML); + } else { + body.innerHTML = "<" + blockName + "> <" + blockName + "> "; + paraAfter = body.childNodes[1]; } - tinyMCE.triggerNodeChange(); + inst.selection.selectNode(paraAfter, true, true); - break; + return true; + } - case "mceSelectNodeDepth": - var parentNode = this.getFocusElement(); - for (var i=0; parentNode; i++) { - if (parentNode.nodeName.toLowerCase() == "body") + // Place first part within new paragraph + if (startChop.nodeName == blockName) + rngBefore.setStart(startChop, 0); + else + rngBefore.setStartBefore(startChop); + + rngBefore.setEnd(startNode, startOffset); + paraBefore.appendChild(rngBefore.cloneContents()); + + // Place secound part within new paragraph + rngAfter.setEndAfter(endChop); + rngAfter.setStart(endNode, endOffset); + var contents = rngAfter.cloneContents(); + + if (contents.firstChild && contents.firstChild.nodeName == blockName) { + /* var nodes = contents.firstChild.childNodes; + for (var i=0; i
    '; + } - case "SetStyleInfo": - var rng = this.getRng(); - var sel = this.getSel(); - var scmd = value['command']; - var sname = value['name']; - var svalue = value['value'] == null ? '' : value['value']; - //var svalue = value['value'] == null ? '' : value['value']; - var wrapper = value['wrapper'] ? value['wrapper'] : "span"; - var parentElm = null; - var invalidRe = new RegExp("^BODY|HTML$", "g"); - var invalidParentsRe = tinyMCE.settings['merge_styles_invalid_parents'] != '' ? new RegExp(tinyMCE.settings['merge_styles_invalid_parents'], "gi") : null; + h += '
    + + + + +
    +
    + +
    - - - - - + + - - + ','');html=tinyMCE.regexpReplace(html,'

    \\s*
    \\s*

    ','

     

    ');html=tinyMCE.regexpReplace(html,'

    \\s* \\s*
    \\s* \\s*

    ','

     

    ');html=tinyMCE.regexpReplace(html,'

    \\s* \\s*
    \\s*

    ','

     

    ');html=tinyMCE.regexpReplace(html,'

    \\s*
    \\s* \\s*

    ','

     

    ');html=html.replace(new RegExp('(.*?)','gi'),'$1');if(!tinyMCE.isMSIE)html=html.replace(new RegExp('','g'),"");if(tinyMCE.settings['remove_linebreaks'])html=html.replace(new RegExp('\r|\n','g'),' ');if(tinyMCE.getParam('apply_source_formatting')){html=html.replace(new RegExp('<(p|div)([^>]*)>','g'),"\n<$1$2>\n");html=html.replace(new RegExp('<\/(p|div)([^>]*)>','g'),"\n\n");html=html.replace(new RegExp('
    ','g'),"
    \n");}if(tinyMCE.settings['force_br_newlines']){var re=new RegExp('

     

    ','g');html=html.replace(re,"
    ");}if(tinyMCE.isGecko&&tinyMCE.settings['remove_lt_gt']){var re=new RegExp('<>','g');html=html.replace(re,"");}html=tinyMCE._customCleanup(inst,on_save?"get_from_editor":"insert_to_editor",html);var chk=tinyMCE.regexpReplace(html,"[ \t\r\n]","").toLowerCase();if(chk=="
    "||chk=="
    "||chk=="

     

    "||chk=="

     

    "||chk=="

    ")html="";if(tinyMCE.settings["preformatted"])return "
    "+html+"
    ";return html;};TinyMCE.prototype.insertLink=function(href,target,title,onclick,style_class){tinyMCE.execCommand('mceBeginUndoLevel');if(this.selectedInstance&&this.selectedElement&&this.selectedElement.nodeName.toLowerCase()=="img"){var doc=this.selectedInstance.getDoc();var linkElement=tinyMCE.getParentElement(this.selectedElement,"a");var newLink=false;if(!linkElement){linkElement=doc.createElement("a");newLink=true;}var mhref=href;var thref=eval(tinyMCE.settings['urlconverter_callback']+"(href, linkElement);");mhref=tinyMCE.getParam('convert_urls')?href:mhref;tinyMCE.setAttrib(linkElement,'href',thref);tinyMCE.setAttrib(linkElement,'mce_href',mhref);tinyMCE.setAttrib(linkElement,'target',target);tinyMCE.setAttrib(linkElement,'title',title);tinyMCE.setAttrib(linkElement,'onclick',onclick);tinyMCE.setAttrib(linkElement,'class',style_class);if(newLink){linkElement.appendChild(this.selectedElement.cloneNode(true));this.selectedElement.parentNode.replaceChild(linkElement,this.selectedElement);}return;}if(!this.linkElement&&this.selectedInstance){if(tinyMCE.isSafari){tinyMCE.execCommand("mceInsertContent",false,''+this.selectedInstance.getSelectedHTML()+'');}else this.selectedInstance.contentDocument.execCommand("createlink",false,tinyMCE.uniqueURL);tinyMCE.linkElement=this.getElementByAttributeValue(this.selectedInstance.contentDocument.body,"a","href",tinyMCE.uniqueURL);var elementArray=this.getElementsByAttributeValue(this.selectedInstance.contentDocument.body,"a","href",tinyMCE.uniqueURL);for(var i=0;i';tinyMCE.execCommand("mceInsertContent",false,html);}else{if(!this.imgElement&&this.selectedInstance){if(tinyMCE.isSafari)tinyMCE.execCommand("mceInsertContent",false,'');else this.selectedInstance.contentDocument.execCommand("insertimage",false,tinyMCE.uniqueURL);tinyMCE.imgElement=this.getElementByAttributeValue(this.selectedInstance.contentDocument.body,"img","src",tinyMCE.uniqueURL);}}if(this.imgElement){var needsRepaint=false;var msrc=src;src=eval(tinyMCE.settings['urlconverter_callback']+"(src, tinyMCE.imgElement);");if(tinyMCE.getParam('convert_urls'))msrc=src;if(onmouseover&&onmouseover!="")onmouseover="this.src='"+eval(tinyMCE.settings['urlconverter_callback']+"(onmouseover, tinyMCE.imgElement);")+"';";if(onmouseout&&onmouseout!="")onmouseout="this.src='"+eval(tinyMCE.settings['urlconverter_callback']+"(onmouseout, tinyMCE.imgElement);")+"';";if(typeof(title)=="undefined")title=alt;if(width!=this.imgElement.getAttribute("width")||height!=this.imgElement.getAttribute("height")||align!=this.imgElement.getAttribute("align"))needsRepaint=true;tinyMCE.setAttrib(this.imgElement,'src',src);tinyMCE.setAttrib(this.imgElement,'mce_src',msrc);tinyMCE.setAttrib(this.imgElement,'alt',alt);tinyMCE.setAttrib(this.imgElement,'title',title);tinyMCE.setAttrib(this.imgElement,'align',align);tinyMCE.setAttrib(this.imgElement,'border',border,true);tinyMCE.setAttrib(this.imgElement,'hspace',hspace,true);tinyMCE.setAttrib(this.imgElement,'vspace',vspace,true);tinyMCE.setAttrib(this.imgElement,'width',width,true);tinyMCE.setAttrib(this.imgElement,'height',height,true);tinyMCE.setAttrib(this.imgElement,'onmouseover',onmouseover);tinyMCE.setAttrib(this.imgElement,'onmouseout',onmouseout);if(width&&width!="")this.imgElement.style.pixelWidth=width;if(height&&height!="")this.imgElement.style.pixelHeight=height;if(needsRepaint)tinyMCE.selectedInstance.repaint();}tinyMCE.execCommand('mceEndUndoLevel');};TinyMCE.prototype.getElementByAttributeValue=function(node,element_name,attrib,value){var elements=this.getElementsByAttributeValue(node,element_name,attrib,value);if(elements.length==0)return null;return elements[0];};TinyMCE.prototype.getElementsByAttributeValue=function(node,element_name,attrib,value){var elements=new Array();if(node&&node.nodeName.toLowerCase()==element_name){if(node.getAttribute(attrib)&&node.getAttribute(attrib).indexOf(value)!=-1)elements[elements.length]=node;}if(node&&node.hasChildNodes()){for(var x=0,n=node.childNodes.length;x=strTok2.length){for(var i=0;i=strTok2.length||strTok1[i]!=strTok2[i]){breakPoint=i+1;break;}}}if(strTok1.length=strTok1.length||strTok1[i]!=strTok2[i]){breakPoint=i+1;break;}}}if(breakPoint==1)return targetURL.path;for(var i=0;i<(strTok1.length-(breakPoint-1));i++)outPath+="../";for(var i=breakPoint-1;i=0;i--){if(baseURLParts[i].length==0)continue;newBaseURLParts[newBaseURLParts.length]=baseURLParts[i];}baseURLParts=newBaseURLParts.reverse();var newRelURLParts=new Array();var numBack=0;for(var i=relURLParts.length-1;i>=0;i--){if(relURLParts[i].length==0||relURLParts[i]==".")continue;if(relURLParts[i]=='..'){numBack++;continue;}if(numBack>0){numBack--;continue;}newRelURLParts[newRelURLParts.length]=relURLParts[i];}relURLParts=newRelURLParts.reverse();var len=baseURLParts.length-numBack;var absPath=(len<=0?"":"/")+baseURLParts.slice(0,len).join('/')+"/"+relURLParts.join('/');var start="",end="";relURL.protocol=baseURL.protocol;relURL.host=baseURL.host;relURL.port=baseURL.port;if(relURL.path.charAt(relURL.path.length-1)=="/")absPath+="/";relURL.path=absPath;return TinyMCE.prototype.serializeURL(relURL);};TinyMCE.prototype.getParam=function(name,default_value,strip_whitespace,split_chr){var value=(typeof(this.settings[name])=="undefined")?default_value:this.settings[name];if(value=="true"||value=="false")return(value=="true");if(strip_whitespace)value=tinyMCE.regexpReplace(value,"[ \t\r\n]","");if(typeof(split_chr)!="undefined"&&split_chr!=null){value=value.split(split_chr);var outArray=new Array();for(var i=0;i0);if(tinyMCE.settings['custom_undo_redo']){undoIndex=inst.undoIndex;undoLevels=inst.undoLevels.length;}tinyMCE.executeCallback('handleNodeChangeCallback','_handleNodeChange',0,editorId,elm,undoIndex,undoLevels,inst.visualAid,anySelection,setup_content);}}if(this.selectedInstance&&(typeof(focus)=="undefined"||focus))this.selectedInstance.contentWindow.focus();};TinyMCE.prototype._customCleanup=function(inst,type,content){var customCleanup=tinyMCE.settings['cleanup_callback'];if(customCleanup!=""&&eval("typeof("+customCleanup+")")!="undefined")content=eval(customCleanup+"(type, content, inst);");var plugins=tinyMCE.getParam('plugins','',true,',');for(var i=0;i0)className+=" ";className+=classNames[i];}return className;};TinyMCE.prototype.handleVisualAid=function(el,deep,state,inst){if(!el)return;var tableElement=null;switch(el.nodeName){case "TABLE":var oldW=el.style.width;var oldH=el.style.height;var bo=tinyMCE.getAttrib(el,"border");bo=bo==""||bo=="0"?true:false;tinyMCE.setAttrib(el,"class",tinyMCE.getVisualAidClass(tinyMCE.getAttrib(el,"class"),state&&bo));el.style.width=oldW;el.style.height=oldH;for(var y=0;y0){tinyMCE.setAttrib(s[i],'size',fSize);s[i].style.fontSize='';}var fFace=s[i].style.fontFamily;if(fFace!=null&&fFace!=""){tinyMCE.setAttrib(s[i],'face',fFace);s[i].style.fontFamily='';}var fColor=s[i].style.color;if(fColor!=null&&fColor!=""){tinyMCE.setAttrib(s[i],'color',tinyMCE.convertRGBToHex(fColor));s[i].style.color='';}}};TinyMCE.prototype.convertFontsToSpans=function(doc){var sizes=tinyMCE.getParam('font_size_style_values').replace(/\s+/,'').split(',');var h=doc.body.innerHTML;h=h.replace(/0&&fSize<8){if(fsClasses!=null)tinyMCE.setAttrib(s[i],'class',fsClasses[fSize-1]);else s[i].style.fontSize=sizes[fSize-1];}s[i].removeAttribute('size');}if(fFace!=""){s[i].style.fontFamily=fFace;s[i].removeAttribute('face');}if(fColor!=""){s[i].style.color=fColor;s[i].removeAttribute('color');}}};TinyMCE.prototype.setInnerHTML=function(e,h){if(tinyMCE.isMSIE&&!tinyMCE.isOpera){e.innerHTML=tinyMCE.uniqueTag+h;e.firstChild.removeNode(true);}else{h=this.fixGeckoBaseHREFBug(1,e,h);e.innerHTML=h;this.fixGeckoBaseHREFBug(2,e,h);}};TinyMCE.prototype.fixGeckoBaseHREFBug=function(m,e,h){if(tinyMCE.isGecko){if(m==1){h=h.replace(/\ssrc=/gi," xsrc=");h=h.replace(/\shref=/gi," xhref=");return h;}else{if(h.indexOf(' xsrc')!=-1){var n=e.getElementsByTagName("img");for(var i=0;i=0;x--)tinyMCE.insertAfter(cn[x],an[i]);}}};TinyMCE.prototype._setHTML=function(doc,html_content){html_content=tinyMCE.cleanupHTMLCode(html_content);try{tinyMCE.setInnerHTML(doc.body,html_content);}catch(e){if(this.isMSIE)doc.body.createTextRange().pasteHTML(html_content);}if(tinyMCE.isMSIE&&tinyMCE.settings['fix_content_duplication']){var paras=doc.getElementsByTagName("P");for(var i=0;i<\/o:p>","
    ");html=tinyMCE.regexpReplace(html," <\/o:p>","");html=tinyMCE.regexpReplace(html,"","");html=tinyMCE.regexpReplace(html,"

    <\/p>","");html=tinyMCE.regexpReplace(html,"

    <\/p>\r\n

    <\/p>","");html=tinyMCE.regexpReplace(html,"

     <\/p>","
    ");html=tinyMCE.regexpReplace(html,"

    \s*(

    \s*)?","

    ");html=tinyMCE.regexpReplace(html,"<\/p>\s*(<\/p>\s*)?","

    ");}tinyMCE.setInnerHTML(doc.body,html);}tinyMCE.cleanupAnchors(doc);if(tinyMCE.getParam("convert_fonts_to_spans"))tinyMCE.convertSpansToFonts(doc);};TinyMCE.prototype.getImageSrc=function(str){var pos=-1;if(!str)return "";if((pos=str.indexOf('this.src='))!=-1){var src=str.substring(pos+10);src=src.substring(0,src.indexOf('\''));return src;}return "";};TinyMCE.prototype._getElementById=function(element_id){var elm=document.getElementById(element_id);if(!elm){for(var j=0;j0){for(var x=0;x0)tinyMCE.cssClasses=output;return output;};TinyMCE.prototype.regexpReplace=function(in_str,reg_exp,replace_str,opts){if(in_str==null)return in_str;if(typeof(opts)=="undefined")opts='g';var re=new RegExp(reg_exp,opts);return in_str.replace(re,replace_str);};TinyMCE.prototype.trim=function(str){return str.replace(/^\s*|\s*$/g,"");};TinyMCE.prototype.cleanupEventStr=function(str){str=""+str;str=str.replace('function anonymous()\n{\n','');str=str.replace('\n}','');str=str.replace(/^return true;/gi,'');return str;};TinyMCE.prototype.getAbsPosition=function(node){var pos=new Object();pos.absLeft=pos.absTop=0;var parentNode=node;while(parentNode){pos.absLeft+=parentNode.offsetLeft;pos.absTop+=parentNode.offsetTop;parentNode=parentNode.offsetParent;}return pos;};TinyMCE.prototype.getControlHTML=function(control_name){var themePlugins=tinyMCE.getParam('plugins','',true,',');var templateFunction;for(var i=themePlugins.length;i>=0;i--){templateFunction='TinyMCE_'+themePlugins[i]+"_getControlHTML";if(eval("typeof("+templateFunction+")")!='undefined'){var html=eval(templateFunction+"('"+control_name+"');");if(html!="")return tinyMCE.replaceVar(html,"pluginurl",tinyMCE.baseURL+"/plugins/"+themePlugins[i]);}}return eval('TinyMCE_'+tinyMCE.settings['theme']+"_getControlHTML"+"('"+control_name+"');");};TinyMCE.prototype._themeExecCommand=function(editor_id,element,command,user_interface,value){var themePlugins=tinyMCE.getParam('plugins','',true,',');var templateFunction;for(var i=themePlugins.length;i>=0;i--){templateFunction='TinyMCE_'+themePlugins[i]+"_execCommand";if(eval("typeof("+templateFunction+")")!='undefined'){if(eval(templateFunction+"(editor_id, element, command, user_interface, value);"))return true;}}templateFunction='TinyMCE_'+tinyMCE.settings['theme']+"_execCommand";if(eval("typeof("+templateFunction+")")!='undefined')return eval(templateFunction+"(editor_id, element, command, user_interface, value);");return false;};TinyMCE.prototype._getThemeFunction=function(suffix,skip_plugins){if(skip_plugins)return 'TinyMCE_'+tinyMCE.settings['theme']+suffix;var themePlugins=tinyMCE.getParam('plugins','',true,',');var templateFunction;for(var i=themePlugins.length;i>=0;i--){templateFunction='TinyMCE_'+themePlugins[i]+suffix;if(eval("typeof("+templateFunction+")")!='undefined')return templateFunction;}return 'TinyMCE_'+tinyMCE.settings['theme']+suffix;};TinyMCE.prototype.isFunc=function(func_name){if(func_name==null||func_name=="")return false;return eval("typeof("+func_name+")")!="undefined";};TinyMCE.prototype.exec=function(func_name,args){var str=func_name+'(';for(var i=3;i';document.body.appendChild(debugDiv);elm=document.getElementById("tinymce_debug");}var args=this.debug.arguments;for(var i=0;i1&&tinyMCE.currentConfig!=this.settings['index']){tinyMCE.settings=this.settings;tinyMCE.currentConfig=this.settings['index'];}};TinyMCEControl.prototype.convertAllRelativeURLs=function(){var body=this.getBody();var elms=body.getElementsByTagName("img");for(var i=0;i0)rng.selectNodeContents(nodes[0]);else rng.selectNodeContents(node);}else rng.selectNode(node);if(collapse){if(!to_start&&node.nodeType==3){rng.setStart(node,node.nodeValue.length);rng.setEnd(node,node.nodeValue.length);}else rng.collapse(to_start);}sel.removeAllRanges();sel.addRange(rng);}this.scrollToNode(node);tinyMCE.selectedElement=null;if(node.nodeType==1)tinyMCE.selectedElement=node;};TinyMCEControl.prototype.scrollToNode=function(node){var pos=tinyMCE.getAbsPosition(node);var doc=this.getDoc();var scrollX=doc.body.scrollLeft+doc.documentElement.scrollLeft;var scrollY=doc.body.scrollTop+doc.documentElement.scrollTop;var height=tinyMCE.isMSIE?document.getElementById(this.editorId).style.pixelHeight:this.targetElement.clientHeight;if(!tinyMCE.settings['auto_resize']&&!(pos.absTop>scrollY&&pos.absTop<(scrollY-25+height)))this.contentWindow.scrollTo(pos.absLeft,pos.absTop-height+25);};TinyMCEControl.prototype.getBody=function(){return this.getDoc().body;};TinyMCEControl.prototype.getDoc=function(){return this.contentWindow.document;};TinyMCEControl.prototype.getWin=function(){return this.contentWindow;};TinyMCEControl.prototype.getSel=function(){if(tinyMCE.isMSIE&&!tinyMCE.isOpera)return this.getDoc().selection;var sel=this.contentWindow.getSelection();if(tinyMCE.isSafari&&!sel.getRangeAt){var newSel=new Object();var doc=this.getDoc();function getRangeAt(idx){var rng=new Object();rng.startContainer=this.focusNode;rng.endContainer=this.anchorNode;rng.commonAncestorContainer=this.focusNode;rng.createContextualFragment=function(html){if(html.charAt(0)=='<'){var elm=doc.createElement("div");elm.innerHTML=html;return elm.firstChild;}return doc.createTextNode("UNSUPPORTED, DUE TO LIMITATIONS IN SAFARI!");};rng.deleteContents=function(){doc.execCommand("Delete",false,"");};return rng;}newSel.focusNode=sel.baseNode;newSel.focusOffset=sel.baseOffset;newSel.anchorNode=sel.extentNode;newSel.anchorOffset=sel.extentOffset;newSel.getRangeAt=getRangeAt;newSel.text=""+sel;newSel.realSelection=sel;newSel.toString=function(){return this.text;};return newSel;}return sel;};TinyMCEControl.prototype.getRng=function(){var sel=this.getSel();if(sel==null)return null;if(tinyMCE.isMSIE&&!tinyMCE.isOpera)return sel.createRange();if(tinyMCE.isSafari){var rng=this.getDoc().createRange();var sel=this.getSel().realSelection;rng.setStart(sel.baseNode,sel.baseOffset);rng.setEnd(sel.extentNode,sel.extentOffset);return rng;}return this.getSel().getRangeAt(0);};TinyMCEControl.prototype._insertPara=function(e){function isEmpty(para){function isEmptyHTML(html){return html.replace(new RegExp('[ \t\r\n]+','g'),'').toLowerCase()=="";}if(para.getElementsByTagName("img").length>0)return false;if(para.getElementsByTagName("table").length>0)return false;if(para.getElementsByTagName("hr").length>0)return false;var nodes=tinyMCE.getNodeTree(para,new Array(),3);for(var i=0;i <"+blockName+"> ";paraAfter=body.childNodes[1];}this.selectNode(paraAfter,true,true);return true;}if(startChop.nodeName==blockName)rngBefore.setStart(startChop,0);else rngBefore.setStartBefore(startChop);rngBefore.setEnd(startNode,startOffset);paraBefore.appendChild(rngBefore.cloneContents());rngAfter.setEndAfter(endChop);rngAfter.setStart(endNode,endOffset);var contents=rngAfter.cloneContents();if(contents.firstChild&&contents.firstChild.nodeName==blockName){paraAfter.innerHTML=contents.firstChild.innerHTML;}else paraAfter.appendChild(contents);if(isEmpty(paraBefore))paraBefore.innerHTML=" ";if(isEmpty(paraAfter))paraAfter.innerHTML=" ";var rng=doc.createRange();if(!startChop.previousSibling&&startChop.parentNode.nodeName.toUpperCase()==blockName){rng.setStartBefore(startChop.parentNode);}else{if(rngBefore.startContainer.nodeName.toUpperCase()==blockName&&rngBefore.startOffset==0)rng.setStartBefore(rngBefore.startContainer);else rng.setStart(rngBefore.startContainer,rngBefore.startOffset);}if(!endChop.nextSibling&&endChop.parentNode.nodeName.toUpperCase()==blockName)rng.setEndAfter(endChop.parentNode);else rng.setEnd(rngAfter.endContainer,rngAfter.endOffset);rng.deleteContents();rng.insertNode(paraAfter);rng.insertNode(paraBefore);paraAfter.normalize();paraBefore.normalize();this.selectNode(paraAfter,true,true);return true;};TinyMCEControl.prototype._handleBackSpace=function(evt_type){var doc=this.getDoc();var sel=this.getSel();if(sel==null)return false;var rng=sel.getRangeAt(0);var node=rng.startContainer;var elm=node.nodeType==3?node.parentNode:node;if(node==null)return;if(elm&&elm.nodeName==""){var para=doc.createElement("p");while(elm.firstChild)para.appendChild(elm.firstChild);elm.parentNode.insertBefore(para,elm);elm.parentNode.removeChild(elm);var rng=rng.cloneRange();rng.setStartBefore(node.nextSibling);rng.setEndAfter(node.nextSibling);rng.extractContents();this.selectNode(node.nextSibling,true,true);}var para=tinyMCE.getParentBlockElement(node);if(para!=null&¶.nodeName.toLowerCase()=='p'&&evt_type=="keypress"){var htm=para.innerHTML;var block=tinyMCE.getParentBlockElement(node);if(htm==""||htm==" "||block.nodeName.toLowerCase()=="li"){var prevElm=para.previousSibling;while(prevElm!=null&&prevElm.nodeType!=1)prevElm=prevElm.previousSibling;if(prevElm==null)return false;var nodes=tinyMCE.getNodeTree(prevElm,new Array(),3);var lastTextNode=nodes.length==0?null:nodes[nodes.length-1];if(lastTextNode!=null)this.selectNode(lastTextNode,true,false,false);para.parentNode.removeChild(para);return true;}}return false;};TinyMCEControl.prototype._insertSpace=function(){return true;};TinyMCEControl.prototype.autoResetDesignMode=function(){if(!tinyMCE.isMSIE&&tinyMCE.settings['auto_reset_designmode']&&this.isHidden())eval('try { this.getDoc().designMode = "On"; } catch(e) {}');};TinyMCEControl.prototype.isHidden=function(){if(tinyMCE.isMSIE)return false;var sel=this.getSel();return(!sel||!sel.rangeCount||sel.rangeCount==0);};TinyMCEControl.prototype.isDirty=function(){return this.startContent!=tinyMCE.trim(this.getBody().innerHTML)&&!tinyMCE.isNotDirty;};TinyMCEControl.prototype._mergeElements=function(scmd,pa,ch,override){if(scmd=="removeformat"){pa.className="";pa.style.cssText="";ch.className="";ch.style.cssText="";return;}var st=tinyMCE.parseStyle(tinyMCE.getAttrib(pa,"style"));var stc=tinyMCE.parseStyle(tinyMCE.getAttrib(ch,"style"));var className=tinyMCE.getAttrib(pa,"class");className+=" "+tinyMCE.getAttrib(ch,"class");if(override){for(var n in st){if(typeof(st[n])=='function')continue;stc[n]=st[n];}}else{for(var n in stc){if(typeof(stc[n])=='function')continue;st[n]=stc[n];}}tinyMCE.setAttrib(pa,"style",tinyMCE.serializeStyle(st));tinyMCE.setAttrib(pa,"class",tinyMCE.trim(className));ch.className="";ch.style.cssText="";ch.removeAttribute("class");ch.removeAttribute("style");};TinyMCEControl.prototype.setUseCSS=function(b){var doc=this.getDoc();try{doc.execCommand("useCSS",false,!b);}catch(ex){}try{doc.execCommand("styleWithCSS",false,b);}catch(ex){}if(!tinyMCE.getParam("table_inline_editing"))try{doc.execCommand('enableInlineTableEditing',false,"false");}catch(ex){}if(!tinyMCE.getParam("object_resizing"))try{doc.execCommand('enableObjectResizing',false,"false");}catch(ex){}};TinyMCEControl.prototype.execCommand=function(command,user_interface,value){var doc=this.getDoc();var win=this.getWin();var focusElm=this.getFocusElement();if(this.lastSafariSelection&&!new RegExp('mceStartTyping|mceEndTyping|mceBeginUndoLevel|mceEndUndoLevel|mceAddUndoLevel','gi').test(command)){this.moveToBookmark(this.lastSafariSelection);tinyMCE.selectedElement=this.lastSafariSelectedElement;}if(!tinyMCE.isMSIE&&!this.useCSS){this.setUseCSS(false);this.useCSS=true;}this.contentDocument=doc;if(tinyMCE._themeExecCommand(this.editorId,this.getBody(),command,user_interface,value))return;if(focusElm&&focusElm.nodeName=="IMG"){var align=focusElm.getAttribute('align');var img=command=="JustifyCenter"?focusElm.cloneNode(false):focusElm;switch(command){case "JustifyLeft":if(align=='left')img.removeAttribute('align');else img.setAttribute('align','left');var div=focusElm.parentNode;if(div&&div.nodeName=="DIV"&&div.childNodes.length==1&&div.parentNode)div.parentNode.replaceChild(img,div);this.selectNode(img);this.repaint();tinyMCE.triggerNodeChange();return;case "JustifyCenter":img.removeAttribute('align');var div=tinyMCE.getParentElement(focusElm,"div");if(div&&div.style.textAlign=="center"){if(div.nodeName=="DIV"&&div.childNodes.length==1&&div.parentNode)div.parentNode.replaceChild(img,div);}else{var div=this.getDoc().createElement("div");div.style.textAlign='center';div.appendChild(img);focusElm.parentNode.replaceChild(div,focusElm);}this.selectNode(img);this.repaint();tinyMCE.triggerNodeChange();return;case "JustifyRight":if(align=='right')img.removeAttribute('align');else img.setAttribute('align','right');var div=focusElm.parentNode;if(div&&div.nodeName=="DIV"&&div.childNodes.length==1&&div.parentNode)div.parentNode.replaceChild(img,div);this.selectNode(img);this.repaint();tinyMCE.triggerNodeChange();return;}}if(tinyMCE.settings['force_br_newlines']){var alignValue="";if(doc.selection.type!="Control"){switch(command){case "JustifyLeft":alignValue="left";break;case "JustifyCenter":alignValue="center";break;case "JustifyFull":alignValue="justify";break;case "JustifyRight":alignValue="right";break;}if(alignValue!=""){var rng=doc.selection.createRange();if((divElm=tinyMCE.getParentElement(rng.parentElement(),"div"))!=null)divElm.setAttribute("align",alignValue);else if(rng.pasteHTML&&rng.htmlText.length>0)rng.pasteHTML('
    '+rng.htmlText+"
    ");tinyMCE.triggerNodeChange();return;}}}switch(command){case "mceRepaint":this.repaint();return true;case "mceStoreSelection":this.selectionBookmark=this.getBookmark();return true;case "mceRestoreSelection":this.moveToBookmark(this.selectionBookmark);return true;case "InsertUnorderedList":case "InsertOrderedList":var tag=(command=="InsertUnorderedList")?"ul":"ol";if(tinyMCE.isSafari)this.execCommand("mceInsertContent",false,"<"+tag+">
  •  
  • <"+tag+">");else this.getDoc().execCommand(command,user_interface,value);tinyMCE.triggerNodeChange();break;case "Strikethrough":if(tinyMCE.isSafari)this.execCommand("mceInsertContent",false,""+this.getSelectedHTML()+"");else this.getDoc().execCommand(command,user_interface,value);tinyMCE.triggerNodeChange();break;case "mceSelectNode":this.selectNode(value);tinyMCE.triggerNodeChange();tinyMCE.selectedNode=value;break;case "FormatBlock":if(value==null||value==""){var elm=tinyMCE.getParentElement(this.getFocusElement(),"p,div,h1,h2,h3,h4,h5,h6,pre,address");if(elm)this.execCommand("mceRemoveNode",false,elm);}else this.getDoc().execCommand("FormatBlock",false,value);tinyMCE.triggerNodeChange();break;case "mceRemoveNode":if(!value)value=tinyMCE.getParentElement(this.getFocusElement());if(tinyMCE.isMSIE){value.outerHTML=value.innerHTML;}else{var rng=value.ownerDocument.createRange();rng.setStartBefore(value);rng.setEndAfter(value);rng.deleteContents();rng.insertNode(rng.createContextualFragment(value.innerHTML));}tinyMCE.triggerNodeChange();break;case "mceSelectNodeDepth":var parentNode=this.getFocusElement();for(var i=0;parentNode;i++){if(parentNode.nodeName.toLowerCase()=="body")break;if(parentNode.nodeName.toLowerCase()=="#text"){i--;parentNode=parentNode.parentNode;continue;}if(i==value){this.selectNode(parentNode,false);tinyMCE.triggerNodeChange();tinyMCE.selectedNode=parentNode;return;}parentNode=parentNode.parentNode;}break;case "SetStyleInfo":var rng=this.getRng();var sel=this.getSel();var scmd=value['command'];var sname=value['name'];var svalue=value['value']==null?'':value['value'];var wrapper=value['wrapper']?value['wrapper']:"span";var parentElm=null;var invalidRe=new RegExp("^BODY|HTML$","g");var invalidParentsRe=tinyMCE.settings['merge_styles_invalid_parents']!=''?new RegExp(tinyMCE.settings['merge_styles_invalid_parents'],"gi"):null;if(tinyMCE.isMSIE){if(rng.item)parentElm=rng.item(0);else{var pelm=rng.parentElement();var prng=doc.selection.createRange();prng.moveToElementText(pelm);if(rng.htmlText==prng.htmlText||rng.boundingWidth==0){if(invalidParentsRe==null||!invalidParentsRe.test(pelm.nodeName))parentElm=pelm;}}}else{var felm=this.getFocusElement();if(sel.isCollapsed||(/td|tr|tbody|table/ig.test(felm.nodeName)&&sel.anchorNode==felm.parentNode))parentElm=felm;}if(parentElm&&!invalidRe.test(parentElm.nodeName)){if(scmd=="setstyle")tinyMCE.setStyleAttrib(parentElm,sname,svalue);if(scmd=="setattrib")tinyMCE.setAttrib(parentElm,sname,svalue);if(scmd=="removeformat"){parentElm.style.cssText='';tinyMCE.setAttrib(parentElm,'class','');}var ch=tinyMCE.getNodeTree(parentElm,new Array(),1);for(var z=0;z=0;i--){var elm=nodes[i];var isNew=tinyMCE.getAttrib(elm,"mce_new")=="true";elm.removeAttribute("mce_new");if(elm.childNodes&&elm.childNodes.length==1&&elm.childNodes[0].nodeType==1){this._mergeElements(scmd,elm,elm.childNodes[0],isNew);continue;}if(elm.parentNode.childNodes.length==1&&!invalidRe.test(elm.nodeName)&&!invalidRe.test(elm.parentNode.nodeName)){if(invalidParentsRe==null||!invalidParentsRe.test(elm.parentNode.nodeName))this._mergeElements(scmd,elm.parentNode,elm,false);}}var nodes=doc.getElementsByTagName(wrapper);for(var i=nodes.length-1;i>=0;i--){var elm=nodes[i];var isEmpty=true;var tmp=doc.createElement("body");tmp.appendChild(elm.cloneNode(false));tmp.innerHTML=tmp.innerHTML.replace(new RegExp('style=""|class=""','gi'),'');if(new RegExp('','gi').test(tmp.innerHTML)){for(var x=0;x0){value=tinyMCE.replaceVar(value,"selection",selectedText);tinyMCE.execCommand('mceInsertContent',false,value);}tinyMCE.triggerNodeChange();break;case "mceSetAttribute":if(typeof(value)=='object'){var targetElms=(typeof(value['targets'])=="undefined")?"p,img,span,div,td,h1,h2,h3,h4,h5,h6,pre,address":value['targets'];var targetNode=tinyMCE.getParentElement(this.getFocusElement(),targetElms);if(targetNode){targetNode.setAttribute(value['name'],value['value']);tinyMCE.triggerNodeChange();}}break;case "mceSetCSSClass":this.execCommand("SetStyleInfo",false,{command:"setattrib",name:"class",value:value});break;case "mceInsertRawHTML":var key='tiny_mce_marker';this.execCommand('mceBeginUndoLevel');this.execCommand('mceInsertContent',false,key);var scrollX=this.getDoc().body.scrollLeft+this.getDoc().documentElement.scrollLeft;var scrollY=this.getDoc().body.scrollTop+this.getDoc().documentElement.scrollTop;var html=this.getBody().innerHTML;if((pos=html.indexOf(key))!=-1)tinyMCE.setInnerHTML(this.getBody(),html.substring(0,pos)+value+html.substring(pos+key.length));this.contentWindow.scrollTo(scrollX,scrollY);this.execCommand('mceEndUndoLevel');break;case "mceInsertContent":var insertHTMLFailed=false;this.getWin().focus();if(tinyMCE.isGecko||tinyMCE.isOpera){try{if(value.indexOf('<')==-1){var r=this.getRng();var n=this.getDoc().createTextNode(tinyMCE.entityDecode(value));var s=this.getSel();var r2=r.cloneRange();s.removeAllRanges();r.deleteContents();r.insertNode(n);r2.selectNode(n);r2.collapse(false);s.removeAllRanges();s.addRange(r2);}else{value=tinyMCE.fixGeckoBaseHREFBug(1,this.getDoc(),value);this.getDoc().execCommand('inserthtml',false,value);tinyMCE.fixGeckoBaseHREFBug(2,this.getDoc(),value);}}catch(ex){insertHTMLFailed=true;}if(!insertHTMLFailed){tinyMCE.triggerNodeChange();return;}}if(tinyMCE.isOpera&&insertHTMLFailed){this.getDoc().execCommand("insertimage",false,tinyMCE.uniqueURL);var ar=tinyMCE.getElementsByAttributeValue(this.getBody(),"img","src",tinyMCE.uniqueURL);ar[0].outerHTML=value;return;}if(!tinyMCE.isMSIE){var isHTML=value.indexOf('<')!=-1;var sel=this.getSel();var rng=this.getRng();if(isHTML){if(tinyMCE.isSafari){var tmpRng=this.getDoc().createRange();tmpRng.setStart(this.getBody(),0);tmpRng.setEnd(this.getBody(),0);value=tmpRng.createContextualFragment(value);}else value=rng.createContextualFragment(value);}else{var el=document.createElement("div");el.innerHTML=value;value=el.firstChild.nodeValue;value=doc.createTextNode(value);}if(tinyMCE.isSafari&&!isHTML){this.execCommand('InsertText',false,value.nodeValue);tinyMCE.triggerNodeChange();return true;}else if(tinyMCE.isSafari&&isHTML){rng.deleteContents();rng.insertNode(value);tinyMCE.triggerNodeChange();return true;}rng.deleteContents();if(rng.startContainer.nodeType==3){var node=rng.startContainer.splitText(rng.startOffset);node.parentNode.insertBefore(value,node);}else rng.insertNode(value);if(!isHTML){sel.selectAllChildren(doc.body);sel.removeAllRanges();var rng=doc.createRange();rng.selectNode(value);rng.collapse(false);sel.addRange(rng);}else rng.collapse(false);}else{var rng=doc.selection.createRange();var c=value.indexOf('";}if(hc){cn=n.childNodes;for(i=0,l=cn.length;i';return h;},_serializeAttribute:function(n,r,an){var av='',t,os=this.settings.on_save;if(os&&(an.indexOf('mce_')==0||an.indexOf('_moz')==0))return'';if(os&&this.mceAttribs[an])av=this._getAttrib(n,this.mceAttribs[an]);if(av.length==0)av=this._getAttrib(n,an);if(av.length==0&&r.defaultAttribs&&(t=r.defaultAttribs[an])){av=t;if(av=="mce_empty")return" "+an+'=""';}if(r.forceAttribs&&(t=r.forceAttribs[an]))av=t;if(os&&av.length!=0&&this.settings.url_converter.length!=0&&/^(src|href|longdesc)$/.test(an))av=eval(this.settings.url_converter+'(this, n, av)');if(av.length!=0&&r.validAttribValues&&r.validAttribValues[an]&&!r.validAttribValues[an].test(av))return"";if(av.length!=0&&av=="{$uid}")av="uid_"+(this.idCount++);if(av.length!=0)return" "+an+"="+'"'+this.xmlEncode(av)+'"';return"";},formatHTML:function(h){var s=this.settings,p='',i=0,li=0,o='',l;h=h.replace(/\r/g,'');h='\n'+h;h=h.replace(new RegExp('\\n\\s+','gi'),'\n');h=h.replace(this.nlBeforeRe,'\n<$1$2>');h=h.replace(this.nlAfterRe,'<$1$2>\n');h=h.replace(this.nlBeforeAfterRe,'\n<$1$2$3>\n');h+='\n';while((i=h.indexOf('\n',i+1))!=-1){if((l=h.substring(li+1,i)).length!=0){if(this.ouRe.test(l)&&p.length>=s.indent_levels)p=p.substring(s.indent_levels);o+=p+l+'\n';if(this.inRe.test(l))p+=this.inStr;}li=i;}return o;},xmlEncode:function(s){var i,l,e,o='',c;this._setupEntities();switch(this.settings.entity_encoding){case"raw":return tinyMCE.xmlEncode(s);case"named":for(i=0,l=s.length;i127||c==60||c==62||c==38||c==39||c==34)o+='&#'+c+";";else o+=String.fromCharCode(c);}return o;}return s;},split:function(re,s){var c=s.split(re);var i,l,o=new Array();for(i=0,l=c.length;i/g,'>');h=h.replace(/]*)>\u00A0?<\/p>/gi,' 

    ');h=h.replace(/]*)> <\/p>/gi,' 

    ');e.innerHTML=tinyMCE.uniqueTag+h;e.firstChild.removeNode(true);nl=e.getElementsByTagName("p");for(i=nl.length-1;i>=0;i--){n=nl[i];if(n.nodeName=='P'&&!n.hasChildNodes()&&!n.mce_keep)n.parentNode.removeChild(n);}}else{h=this.fixGeckoBaseHREFBug(1,e,h);e.innerHTML=h;this.fixGeckoBaseHREFBug(2,e,h);}};TinyMCE_Engine.prototype.getOuterHTML=function(e){if(tinyMCE.isMSIE)return e.outerHTML;var d=e.ownerDocument.createElement("body");d.appendChild(e);return d.innerHTML;};TinyMCE_Engine.prototype.setOuterHTML=function(e,h){if(tinyMCE.isMSIE){e.outerHTML=h;return;}var d=e.ownerDocument.createElement("body");d.innerHTML=h;e.parentNode.replaceChild(d.firstChild,e);};TinyMCE_Engine.prototype._getElementById=function(id,d){var e,i,j,f;if(typeof(d)=="undefined")d=document;e=d.getElementById(id);if(!e){f=d.forms;for(i=0;i=strTok2.length){for(var i=0;i=strTok2.length||strTok1[i]!=strTok2[i]){breakPoint=i+1;break;}}}if(strTok1.length=strTok1.length||strTok1[i]!=strTok2[i]){breakPoint=i+1;break;}}}if(breakPoint==1)return targetURL.path;for(var i=0;i<(strTok1.length-(breakPoint-1));i++)outPath+="../";for(var i=breakPoint-1;i=0;i--){if(baseURLParts[i].length==0)continue;newBaseURLParts[newBaseURLParts.length]=baseURLParts[i];}baseURLParts=newBaseURLParts.reverse();var newRelURLParts=new Array();var numBack=0;for(var i=relURLParts.length-1;i>=0;i--){if(relURLParts[i].length==0||relURLParts[i]==".")continue;if(relURLParts[i]=='..'){numBack++;continue;}if(numBack>0){numBack--;continue;}newRelURLParts[newRelURLParts.length]=relURLParts[i];}relURLParts=newRelURLParts.reverse();var len=baseURLParts.length-numBack;var absPath=(len<=0?"":"/")+baseURLParts.slice(0,len).join('/')+"/"+relURLParts.join('/');var start="",end="";relURL.protocol=baseURL.protocol;relURL.host=baseURL.host;relURL.port=baseURL.port;if(relURL.path.charAt(relURL.path.length-1)=="/")absPath+="/";relURL.path=absPath;return this.serializeURL(relURL);};TinyMCE_Engine.prototype.convertURL=function(url,node,on_save){var prot=document.location.protocol;var host=document.location.hostname;var port=document.location.port;if(prot=="file:")return url;url=tinyMCE.regexpReplace(url,'(http|https):///','/');if(url.indexOf('mailto:')!=-1||url.indexOf('javascript:')!=-1||tinyMCE.regexpReplace(url,'[ \t\r\n\+]|%20','').charAt(0)=="#")return url;if(!tinyMCE.isMSIE&&!on_save&&url.indexOf("://")==-1&&url.charAt(0)!='/')return tinyMCE.settings['base_href']+url;if(on_save&&tinyMCE.getParam('relative_urls')){var curl=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],url);if(curl.charAt(0)=='/')curl=tinyMCE.settings['document_base_prefix']+curl;var urlParts=tinyMCE.parseURL(curl);var tmpUrlParts=tinyMCE.parseURL(tinyMCE.settings['document_base_url']);if(urlParts['host']==tmpUrlParts['host']&&(urlParts['port']==tmpUrlParts['port']))return tinyMCE.convertAbsoluteURLToRelativeURL(tinyMCE.settings['document_base_url'],curl);}if(!tinyMCE.getParam('relative_urls')){var urlParts=tinyMCE.parseURL(url);var baseUrlParts=tinyMCE.parseURL(tinyMCE.settings['base_href']);url=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],url);if(urlParts['anchor']&&urlParts['path']==baseUrlParts['path'])return"#"+urlParts['anchor'];}if(tinyMCE.getParam('remove_script_host')){var start="",portPart="";if(port!="")portPart=":"+port;start=prot+"//"+host+portPart+"/";if(url.indexOf(start)==0)url=url.substring(start.length-1);}return url;};TinyMCE_Engine.prototype.convertAllRelativeURLs=function(body){var elms=body.getElementsByTagName("img");for(var i=0;ibookmark.index)rng.addElement(nl[bookmark.index]);}else{rng=inst.getSel().createRange();rng.moveToElementText(inst.getBody());rng.collapse(true);rng.moveStart('character',bookmark.start);rng.moveEnd('character',bookmark.length);}rng.select();win.scrollTo(bookmark.scrollX,bookmark.scrollY);return true;}if(tinyMCE.isGecko&&bookmark.rng){sel.removeAllRanges();sel.addRange(bookmark.rng);win.scrollTo(bookmark.scrollX,bookmark.scrollY);return true;}if(tinyMCE.isGecko){rng=doc.createRange();nl=doc.getElementsByTagName(bookmark.startTag);if(nl.length>bookmark.start)rng.setStart(nl[bookmark.start].childNodes[bookmark.startIndex],bookmark.startOffset);nl=doc.getElementsByTagName(bookmark.endTag);if(nl.length>bookmark.end)rng.setEnd(nl[bookmark.end].childNodes[bookmark.endIndex],bookmark.endOffset);sel.removeAllRanges();sel.addRange(rng);win.scrollTo(bookmark.scrollX,bookmark.scrollY);return true;}return false;},selectNode:function(node,collapse,select_text_node,to_start){var inst=this.instance,sel,rng,nodes;if(!node)return;if(typeof(collapse)=="undefined")collapse=true;if(typeof(select_text_node)=="undefined")select_text_node=false;if(typeof(to_start)=="undefined")to_start=true;if(tinyMCE.isMSIE){rng=inst.getBody().createTextRange();try{rng.moveToElementText(node);if(collapse)rng.collapse(to_start);rng.select();}catch(e){}}else{sel=this.getSel();if(!sel)return;if(tinyMCE.isSafari){sel.setBaseAndExtent(node,0,node,node.innerText.length);if(collapse){if(to_start)sel.collapseToStart();else sel.collapseToEnd();}this.scrollToNode(node);return;}rng=inst.getDoc().createRange();if(select_text_node){nodes=tinyMCE.getNodeTree(node,new Array(),3);if(nodes.length>0)rng.selectNodeContents(nodes[0]);else rng.selectNodeContents(node);}else rng.selectNode(node);if(collapse){if(!to_start&&node.nodeType==3){rng.setStart(node,node.nodeValue.length);rng.setEnd(node,node.nodeValue.length);}else rng.collapse(to_start);}sel.removeAllRanges();sel.addRange(rng);}this.scrollToNode(node);tinyMCE.selectedElement=null;if(node.nodeType==1)tinyMCE.selectedElement=node;},scrollToNode:function(node){var inst=this.instance;var pos,doc,scrollX,scrollY,height;pos=tinyMCE.getAbsPosition(node);doc=inst.getDoc();scrollX=doc.body.scrollLeft+doc.documentElement.scrollLeft;scrollY=doc.body.scrollTop+doc.documentElement.scrollTop;height=tinyMCE.isMSIE?document.getElementById(inst.editorId).style.pixelHeight:inst.targetElement.clientHeight;if(!tinyMCE.settings['auto_resize']&&!(pos.absTop>scrollY&&pos.absTop<(scrollY-25+height)))inst.contentWindow.scrollTo(pos.absLeft,pos.absTop-height+25);},getSel:function(){var inst=this.instance;if(tinyMCE.isMSIE&&!tinyMCE.isOpera)return inst.getDoc().selection;return inst.contentWindow.getSelection();},getRng:function(){var inst=this.instance;var sel=this.getSel();if(sel==null)return null;if(tinyMCE.isMSIE&&!tinyMCE.isOpera)return sel.createRange();if(tinyMCE.isSafari&&!sel.getRangeAt)return''+window.getSelection();return sel.getRangeAt(0);},getFocusElement:function(){var inst=this.instance;if(tinyMCE.isMSIE&&!tinyMCE.isOpera){var doc=inst.getDoc();var rng=doc.selection.createRange();var elm=rng.item?rng.item(0):rng.parentElement();}else{if(inst.isHidden())return inst.getBody();var sel=this.getSel();var rng=this.getRng();if(!sel||!rng)return null;var elm=rng.commonAncestorContainer;if(!rng.collapsed){if(rng.startContainer==rng.endContainer){if(rng.startOffset-rng.endOffset<2){if(rng.startContainer.hasChildNodes())elm=rng.startContainer.childNodes[rng.startOffset];}}}elm=tinyMCE.getParentElement(elm);}return elm;}};function TinyMCE_UndoRedo(inst){this.instance=inst;this.undoLevels=new Array();this.undoIndex=0;this.typingUndoIndex=-1;this.undoRedo=true;};TinyMCE_UndoRedo.prototype={add:function(l){var b;if(l){this.undoLevels[this.undoLevels.length]=l;return true;}var inst=this.instance;if(this.typingUndoIndex!=-1){this.undoIndex=this.typingUndoIndex;}var newHTML=tinyMCE.trim(inst.getBody().innerHTML);if(this.undoLevels[this.undoIndex]&&newHTML!=this.undoLevels[this.undoIndex].content){tinyMCE.dispatchCallback(inst,'onchange_callback','onChange',inst);var customUndoLevels=tinyMCE.settings['custom_undo_redo_levels'];if(customUndoLevels!=-1&&this.undoLevels.length>customUndoLevels){for(var i=0;i0){this.undoIndex--;tinyMCE.setInnerHTML(inst.getBody(),this.undoLevels[this.undoIndex].content);inst.repaint();if(inst.settings.custom_undo_redo_restore_selection)inst.selection.moveToBookmark(this.undoLevels[this.undoIndex].bookmark);}},redo:function(){var inst=this.instance;tinyMCE.execCommand("mceEndTyping");if(this.undoIndex<(this.undoLevels.length-1)){this.undoIndex++;tinyMCE.setInnerHTML(inst.getBody(),this.undoLevels[this.undoIndex].content);inst.repaint();if(inst.settings.custom_undo_redo_restore_selection)inst.selection.moveToBookmark(this.undoLevels[this.undoIndex].bookmark);}tinyMCE.triggerNodeChange();}};var TinyMCE_ForceParagraphs={_insertPara:function(inst,e){function isEmpty(para){function isEmptyHTML(html){return html.replace(new RegExp('[ \t\r\n]+','g'),'').toLowerCase()=="";}if(para.getElementsByTagName("img").length>0)return false;if(para.getElementsByTagName("table").length>0)return false;if(para.getElementsByTagName("hr").length>0)return false;var nodes=tinyMCE.getNodeTree(para,new Array(),3);for(var i=0;i <"+blockName+"> ";paraAfter=body.childNodes[1];}inst.selection.selectNode(paraAfter,true,true);return true;}if(startChop.nodeName==blockName)rngBefore.setStart(startChop,0);else rngBefore.setStartBefore(startChop);rngBefore.setEnd(startNode,startOffset);paraBefore.appendChild(rngBefore.cloneContents());rngAfter.setEndAfter(endChop);rngAfter.setStart(endNode,endOffset);var contents=rngAfter.cloneContents();if(contents.firstChild&&contents.firstChild.nodeName==blockName){paraAfter.innerHTML=contents.firstChild.innerHTML;}else paraAfter.appendChild(contents);if(isEmpty(paraBefore))paraBefore.innerHTML=" ";if(isEmpty(paraAfter))paraAfter.innerHTML=" ";var rng=doc.createRange();if(!startChop.previousSibling&&startChop.parentNode.nodeName.toUpperCase()==blockName){rng.setStartBefore(startChop.parentNode);}else{if(rngBefore.startContainer.nodeName.toUpperCase()==blockName&&rngBefore.startOffset==0)rng.setStartBefore(rngBefore.startContainer);else rng.setStart(rngBefore.startContainer,rngBefore.startOffset);}if(!endChop.nextSibling&&endChop.parentNode.nodeName.toUpperCase()==blockName)rng.setEndAfter(endChop.parentNode);else rng.setEnd(rngAfter.endContainer,rngAfter.endOffset);rng.deleteContents();rng.insertNode(paraAfter);rng.insertNode(paraBefore);paraAfter.normalize();paraBefore.normalize();inst.selection.selectNode(paraAfter,true,true);return true;},_handleBackSpace:function(inst){var r=inst.getRng();var sn=r.startContainer;if(sn&&sn.nextSibling&&sn.nextSibling.nodeName=="BR")sn.nextSibling.parentNode.removeChild(sn.nextSibling);return false;}};function TinyMCE_Layer(id,bm){this.id=id;this.blockerElement=null;this.events=false;this.element=null;this.blockMode=typeof(bm)!='undefined'?bm:true;};TinyMCE_Layer.prototype={moveRelativeTo:function(re,p){var rep=this.getAbsPosition(re);var w=parseInt(re.offsetWidth);var h=parseInt(re.offsetHeight);var e=this.getElement();var ew=parseInt(e.offsetWidth);var eh=parseInt(e.offsetHeight);var x,y;switch(p){case"tl":x=rep.absLeft;y=rep.absTop;break;case"tr":x=rep.absLeft+w;y=rep.absTop;break;case"bl":x=rep.absLeft;y=rep.absTop+h;break;case"br":x=rep.absLeft+w;y=rep.absTop+h;break;case"cc":x=rep.absLeft+(w/2)-(ew/2);y=rep.absTop+(h/2)-(eh/2);break;}this.moveTo(x,y);},moveBy:function(x,y){var e=this.getElement();this.moveTo(parseInt(e.style.left)+x,parseInt(e.style.top)+y);},moveTo:function(x,y){var e=this.getElement();e.style.left=x+"px";e.style.top=y+"px";this.updateBlocker();},resizeBy:function(w,h){var e=this.getElement();this.resizeTo(parseInt(e.style.width)+w,parseInt(e.style.height)+h);},resizeTo:function(w,h){var e=this.getElement();e.style.width=w+"px";e.style.height=h+"px";this.updateBlocker();},show:function(){this.getElement().style.display='block';this.updateBlocker();},hide:function(){this.getElement().style.display='none';this.updateBlocker();},isVisible:function(){return this.getElement().style.display=='block';},getElement:function(){if(!this.element)this.element=document.getElementById(this.id);return this.element;},setBlockMode:function(s){this.blockMode=s;},updateBlocker:function(){var e,b,x,y,w,h;b=this.getBlocker();if(b){if(this.blockMode){e=this.getElement();x=this.parseInt(e.style.left);y=this.parseInt(e.style.top);w=this.parseInt(e.offsetWidth);h=this.parseInt(e.offsetHeight);b.style.left=x+'px';b.style.top=y+'px';b.style.width=w+'px';b.style.height=h+'px';b.style.display=e.style.display;}else b.style.display='none';}},getBlocker:function(){var d,b;if(!this.blockerElement&&this.blockMode){d=document;b=d.createElement("iframe");b.style.cssText='display: none; position: absolute; left: 0; top: 0';b.src='javascript:false;';b.frameBorder='0';b.scrolling='no';d.body.appendChild(b);this.blockerElement=b;}return this.blockerElement;},getAbsPosition:function(n){var p={absLeft:0,absTop:0};while(n){p.absLeft+=n.offsetLeft;p.absTop+=n.offsetTop;n=n.offsetParent;}return p;},create:function(n,c,p){var d=document,e=d.createElement(n);e.setAttribute('id',this.id);if(c)e.className=c;if(!p)p=d.body;p.appendChild(e);return this.element=e;},parseInt:function(s){if(s==null||s=='')return 0;return parseInt(s);}};function TinyMCE_Menu(){var id;if(typeof(tinyMCE.menuCounter)=="undefined")tinyMCE.menuCounter=0;id="mc_menu_"+tinyMCE.menuCounter++;TinyMCE_Layer.call(this,id,true);this.id=id;this.items=new Array();this.needsUpdate=true;};TinyMCE_Menu.prototype=tinyMCE.extend(TinyMCE_Layer.prototype,{init:function(s){var n;this.settings={separator_class:'mceMenuSeparator',title_class:'mceMenuTitle',disabled_class:'mceMenuDisabled',menu_class:'mceMenu',drop_menu:true};for(n in s)this.settings[n]=s[n];this.create('div',this.settings.menu_class);},clear:function(){this.items=new Array();},addTitle:function(t){this.add({type:'title',text:t});},addDisabled:function(t){this.add({type:'disabled',text:t});},addSeparator:function(){this.add({type:'separator'});},addItem:function(t,js){this.add({text:t,js:js});},add:function(mi){this.items[this.items.length]=mi;this.needsUpdate=true;},update:function(){var e=this.getElement(),h='',i,t,m=this.items,s=this.settings;if(this.settings.drop_menu)h+='';h+='
    {$lang_insert_link_title}
    {$lang_insert_link_url}: - - - - -
     
    + + + + +
     
    {$lang_insert_link_target}: +
    diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/simple/css/editor_content.css b/www/extras/tinymce2/jscripts/tiny_mce/themes/simple/css/editor_content.css index 75290eed1..2506c807c 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/simple/css/editor_content.css +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/simple/css/editor_content.css @@ -1,7 +1,19 @@ -body { - background-color: #FFFFFF; +body, td, pre { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; +} + +body { + background-color: #FFFFFF; +} + +.mceVisualAid { + border: 1px dashed #BBBBBB; +} + +/* MSIE specific */ + +* html body { scrollbar-3dlight-color: #F0F0EE; scrollbar-arrow-color: #676662; scrollbar-base-color: #F0F0EE; @@ -9,19 +21,5 @@ body { scrollbar-face-color: #E0E0DD; scrollbar-highlight-color: #F0F0EE; scrollbar-shadow-color: #F0F0EE; - scrollbar-track-color: #F5F5F5; -} - -td { - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 10px; -} - -pre { - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 10px; -} - -.mceVisualAid { - border: 1px dashed #BBBBBB; + scrollbar-track-color: #F5F5F5; } diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/simple/css/editor_popup.css b/www/extras/tinymce2/jscripts/tiny_mce/themes/simple/css/editor_popup.css index 81a58d504..f29b04a55 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/simple/css/editor_popup.css +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/simple/css/editor_popup.css @@ -32,7 +32,7 @@ input, select, textarea { } .input_noborder { - border: 0px solid #808080; + border: 0; } .title { diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/simple/css/editor_ui.css b/www/extras/tinymce2/jscripts/tiny_mce/themes/simple/css/editor_ui.css index 88d42e637..2a98f8401 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/simple/css/editor_ui.css +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/simple/css/editor_ui.css @@ -1,58 +1,8 @@ -.mceButtonNormal, .mceButtonOver, .mceButtonDown, .mceSeparator, .mceButtonDisabled, .mceButtonSelected { - margin-top: 1px; - margin-left: 1px; -} - -.mceButtonNormal { - border: 1px solid #F0F0EE !important; - cursor: arrow; -} - -.mceButtonOver { - border: 1px solid #0A246A; - cursor: arrow; - background-color: #B6BDD2; -} - -.mceButtonDown { - cursor: arrow; - border: 1px solid #0A246A; - background-color: #8592B5; -} - -.mceButtonSelected { - border: 1px solid; - border-color: #C0C0BB; - cursor: arrow; -} - -.mceButtonDisabled { - filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30); - -moz-opacity:0.3; - opacity: 0.3; - border: 1px solid #F0F0EE !important; - cursor: arrow; -} - -.mceSeparator { - border-top: 1px solid buttonhighlight; - border-left: 1px solid buttonhighlight; - border-bottom: 1px solid buttonshadow; - border-right: 1px solid buttonshadow; - margin-right: 2px; - margin-left: 2px; -} - .mceSeparatorLine { - margin:2px; + border: 0; + padding: 0; margin-left: 4px; - background-color: #F0F0EE; - border-top: 1px solid buttonshadow; - border-left: 1px solid buttonshadow; - border-bottom: 1px solid buttonhighlight; - border-right: 1px solid buttonhighlight; - width: 0px; - height: 15px; + margin-right: 2px; } .mceSelectList { @@ -89,4 +39,83 @@ .mceToolbar { background: #F0F0EE; border-top: 1px solid #cccccc; -} \ No newline at end of file + line-height: 1px; + font-size: 1px; + padding-bottom: 1px; +} + +/* Button CSS rules */ + +a.mceButtonDisabled img, a.mceButtonNormal img, a.mceButtonSelected img { + width: 20px; + height: 20px; + cursor: default; + margin-top: 1px; + margin-left: 1px; +} + +a.mceButtonDisabled img { + border: 0 !important; +} + +a.mceButtonNormal img, a.mceButtonSelected img { + border: 1px solid #F0F0EE !important; +} + +a.mceButtonSelected img { + border: 1px solid #C0C0BB !important; +} + +a.mceButtonNormal img:hover, a.mceButtonSelected img:hover { + border: 1px solid #0A246A !important; + cursor: default; + background-color: #B6BDD2; +} + +a.mceButtonDisabled img { + -moz-opacity:0.3; + opacity: 0.3; + border: 1px solid #F0F0EE !important; + cursor: default; +} + +a.mceTiledButton img { + background-image: url('../images/buttons.gif'); + background-repeat: no-repeat; +} + +/* MSIE specific rules */ + +* html a.mceButtonNormal img, * html a.mceButtonSelected img, * html a.mceButtonDisabled img { + border: 0px !important; + margin-top: 2px; + margin-bottom: 1px; +} + +* html a.mceButtonDisabled img { + filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30); + border: 0px !important; +} + +* html a.mceButtonDisabled { + border: 1px solid #F0F0EE !important; +} + +* html a.mceButtonNormal, * html a.mceButtonSelected { + border: 1px solid #F0F0EE; + cursor: default; +} + +* html a.mceButtonSelected { + border: 1px solid #C0C0BB; +} + +* html a.mceButtonNormal:hover, * html a.mceButtonSelected:hover { + border: 1px solid #0A246A; + cursor: default; + background-color: #B6BDD2; +} + +* html .mceSelectList { + margin-top: 2px; +} diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/simple/editor_template.js b/www/extras/tinymce2/jscripts/tiny_mce/themes/simple/editor_template.js index 4d4478328..64c2c278f 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/simple/editor_template.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/simple/editor_template.js @@ -1,20 +1,4 @@ -function TinyMCE_simple_getEditorTemplate(){var template=new Array();template['html']='\ -\ -\ -\ -
    \ -IFRAME\ -
    \ -\ -\ -\ -\ -\ -\ -\ -\ -\ -\ -\ -\ -
    ';template['delta_width']=0;template['delta_height']=-20;return template;}function TinyMCE_simple_handleNodeChange(editor_id,node){tinyMCE.switchClassSticky(editor_id+'_bold','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_italic','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_underline','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_strikethrough','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_bullist','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_numlist','mceButtonNormal');do{switch(node.nodeName.toLowerCase()){case "b":case "strong":tinyMCE.switchClassSticky(editor_id+'_bold','mceButtonSelected');break;case "i":case "em":tinyMCE.switchClassSticky(editor_id+'_italic','mceButtonSelected');break;case "u":tinyMCE.switchClassSticky(editor_id+'_underline','mceButtonSelected');break;case "strike":tinyMCE.switchClassSticky(editor_id+'_strikethrough','mceButtonSelected');break;case "ul":tinyMCE.switchClassSticky(editor_id+'_bullist','mceButtonSelected');break;case "ol":tinyMCE.switchClassSticky(editor_id+'_numlist','mceButtonSelected');break;}}while((node=node.parentNode)!=null);} \ No newline at end of file +var TinyMCE_SimpleTheme={_buttonMap:'bold,bullist,cleanup,italic,numlist,redo,strikethrough,underline,undo',getEditorTemplate:function(){var html='';html+='';html+='';html+='
    ';html+='IFRAME';html+='
    ';html+=tinyMCE.getButtonHTML('bold','lang_bold_desc','{$themeurl}/images/{$lang_bold_img}','Bold');html+=tinyMCE.getButtonHTML('italic','lang_italic_desc','{$themeurl}/images/{$lang_italic_img}','Italic');html+=tinyMCE.getButtonHTML('underline','lang_underline_desc','{$themeurl}/images/{$lang_underline_img}','Underline');html+=tinyMCE.getButtonHTML('strikethrough','lang_striketrough_desc','{$themeurl}/images/strikethrough.gif','Strikethrough');html+='';html+=tinyMCE.getButtonHTML('undo','lang_undo_desc','{$themeurl}/images/undo.gif','Undo');html+=tinyMCE.getButtonHTML('redo','lang_redo_desc','{$themeurl}/images/redo.gif','Redo');html+='';html+=tinyMCE.getButtonHTML('cleanup','lang_cleanup_desc','{$themeurl}/images/cleanup.gif','mceCleanup') +html+='';html+=tinyMCE.getButtonHTML('bullist','lang_bullist_desc','{$themeurl}/images/bullist.gif','InsertUnorderedList') +html+=tinyMCE.getButtonHTML('numlist','lang_numlist_desc','{$themeurl}/images/numlist.gif','InsertOrderedList') +html+='
    ';return{delta_width:0,delta_height:20,html:html};},handleNodeChange:function(editor_id,node){tinyMCE.switchClass(editor_id+'_bold','mceButtonNormal');tinyMCE.switchClass(editor_id+'_italic','mceButtonNormal');tinyMCE.switchClass(editor_id+'_underline','mceButtonNormal');tinyMCE.switchClass(editor_id+'_strikethrough','mceButtonNormal');tinyMCE.switchClass(editor_id+'_bullist','mceButtonNormal');tinyMCE.switchClass(editor_id+'_numlist','mceButtonNormal');do{switch(node.nodeName.toLowerCase()){case"b":case"strong":tinyMCE.switchClass(editor_id+'_bold','mceButtonSelected');break;case"i":case"em":tinyMCE.switchClass(editor_id+'_italic','mceButtonSelected');break;case"u":tinyMCE.switchClass(editor_id+'_underline','mceButtonSelected');break;case"strike":tinyMCE.switchClass(editor_id+'_strikethrough','mceButtonSelected');break;case"ul":tinyMCE.switchClass(editor_id+'_bullist','mceButtonSelected');break;case"ol":tinyMCE.switchClass(editor_id+'_numlist','mceButtonSelected');break;}}while((node=node.parentNode)!=null);}};tinyMCE.addTheme("simple",TinyMCE_SimpleTheme);tinyMCE.addButtonMap(TinyMCE_SimpleTheme._buttonMap); \ No newline at end of file diff --git a/www/extras/tinymce2/jscripts/tiny_mce/themes/simple/editor_template_src.js b/www/extras/tinymce2/jscripts/tiny_mce/themes/simple/editor_template_src.js index 66eca18e2..f7cfa32f6 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/themes/simple/editor_template_src.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/themes/simple/editor_template_src.js @@ -1,70 +1,86 @@ -function TinyMCE_simple_getEditorTemplate() { - var template = new Array(); +/** + * $RCSfile: editor_template_src.js,v $ + * $Revision: 1.8 $ + * $Date: 2006/02/11 18:53:53 $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved. + */ - template['html'] = '\ -\ -\ -\ -
    \ -IFRAME\ -
    \ -\ -\ -\ -\ -\ -\ -\ -\ -\ -\ -\ -\ -
    '; +var TinyMCE_SimpleTheme = { + // List of button ids in tile map + _buttonMap : 'bold,bullist,cleanup,italic,numlist,redo,strikethrough,underline,undo', - template['delta_width'] = 0; - template['delta_height'] = -20; + getEditorTemplate : function() { + var html = ''; - return template; -} + html += ''; + html += ''; + html += '
    '; + html += 'IFRAME'; + html += '
    '; + html += tinyMCE.getButtonHTML('bold', 'lang_bold_desc', '{$themeurl}/images/{$lang_bold_img}', 'Bold'); + html += tinyMCE.getButtonHTML('italic', 'lang_italic_desc', '{$themeurl}/images/{$lang_italic_img}', 'Italic'); + html += tinyMCE.getButtonHTML('underline', 'lang_underline_desc', '{$themeurl}/images/{$lang_underline_img}', 'Underline'); + html += tinyMCE.getButtonHTML('strikethrough', 'lang_striketrough_desc', '{$themeurl}/images/strikethrough.gif', 'Strikethrough'); + html += ''; + html += tinyMCE.getButtonHTML('undo', 'lang_undo_desc', '{$themeurl}/images/undo.gif', 'Undo'); + html += tinyMCE.getButtonHTML('redo', 'lang_redo_desc', '{$themeurl}/images/redo.gif', 'Redo'); + html += ''; + html += tinyMCE.getButtonHTML('cleanup', 'lang_cleanup_desc', '{$themeurl}/images/cleanup.gif', 'mceCleanup') + html += ''; + html += tinyMCE.getButtonHTML('bullist', 'lang_bullist_desc', '{$themeurl}/images/bullist.gif', 'InsertUnorderedList') + html += tinyMCE.getButtonHTML('numlist', 'lang_numlist_desc', '{$themeurl}/images/numlist.gif', 'InsertOrderedList') + html += '
    '; -function TinyMCE_simple_handleNodeChange(editor_id, node) { - // Reset old states - tinyMCE.switchClassSticky(editor_id + '_bold', 'mceButtonNormal'); - tinyMCE.switchClassSticky(editor_id + '_italic', 'mceButtonNormal'); - tinyMCE.switchClassSticky(editor_id + '_underline', 'mceButtonNormal'); - tinyMCE.switchClassSticky(editor_id + '_strikethrough', 'mceButtonNormal'); - tinyMCE.switchClassSticky(editor_id + '_bullist', 'mceButtonNormal'); - tinyMCE.switchClassSticky(editor_id + '_numlist', 'mceButtonNormal'); + return { + delta_width : 0, + delta_height : 20, + html : html + }; + }, - // Handle elements - do { - switch (node.nodeName.toLowerCase()) { - case "b": - case "strong": - tinyMCE.switchClassSticky(editor_id + '_bold', 'mceButtonSelected'); - break; + handleNodeChange : function(editor_id, node) { + // Reset old states + tinyMCE.switchClass(editor_id + '_bold', 'mceButtonNormal'); + tinyMCE.switchClass(editor_id + '_italic', 'mceButtonNormal'); + tinyMCE.switchClass(editor_id + '_underline', 'mceButtonNormal'); + tinyMCE.switchClass(editor_id + '_strikethrough', 'mceButtonNormal'); + tinyMCE.switchClass(editor_id + '_bullist', 'mceButtonNormal'); + tinyMCE.switchClass(editor_id + '_numlist', 'mceButtonNormal'); - case "i": - case "em": - tinyMCE.switchClassSticky(editor_id + '_italic', 'mceButtonSelected'); - break; + // Handle elements + do { + switch (node.nodeName.toLowerCase()) { + case "b": + case "strong": + tinyMCE.switchClass(editor_id + '_bold', 'mceButtonSelected'); + break; - case "u": - tinyMCE.switchClassSticky(editor_id + '_underline', 'mceButtonSelected'); - break; + case "i": + case "em": + tinyMCE.switchClass(editor_id + '_italic', 'mceButtonSelected'); + break; - case "strike": - tinyMCE.switchClassSticky(editor_id + '_strikethrough', 'mceButtonSelected'); - break; - - case "ul": - tinyMCE.switchClassSticky(editor_id + '_bullist', 'mceButtonSelected'); - break; + case "u": + tinyMCE.switchClass(editor_id + '_underline', 'mceButtonSelected'); + break; - case "ol": - tinyMCE.switchClassSticky(editor_id + '_numlist', 'mceButtonSelected'); - break; - } - } while ((node = node.parentNode) != null); -} + case "strike": + tinyMCE.switchClass(editor_id + '_strikethrough', 'mceButtonSelected'); + break; + + case "ul": + tinyMCE.switchClass(editor_id + '_bullist', 'mceButtonSelected'); + break; + + case "ol": + tinyMCE.switchClass(editor_id + '_numlist', 'mceButtonSelected'); + break; + } + } while ((node = node.parentNode) != null); + } +}; + +tinyMCE.addTheme("simple", TinyMCE_SimpleTheme); +tinyMCE.addButtonMap(TinyMCE_SimpleTheme._buttonMap); diff --git a/www/extras/tinymce2/jscripts/tiny_mce/tiny_mce.js b/www/extras/tinymce2/jscripts/tiny_mce/tiny_mce.js index 05e29c991..96478243f 100644 --- a/www/extras/tinymce2/jscripts/tiny_mce/tiny_mce.js +++ b/www/extras/tinymce2/jscripts/tiny_mce/tiny_mce.js @@ -1,3 +1 @@ -function TinyMCE(){this.majorVersion="2";this.minorVersion="0";this.releaseDate="2005-12-01";this.instances=new Array();this.stickyClassesLookup=new Array();this.windowArgs=new Array();this.loadedFiles=new Array();this.configs=new Array();this.currentConfig=0;this.eventHandlers=new Array();var ua=navigator.userAgent;this.isMSIE=(navigator.appName=="Microsoft Internet Explorer");this.isMSIE5=this.isMSIE&&(ua.indexOf('MSIE 5')!=-1);this.isMSIE5_0=this.isMSIE&&(ua.indexOf('MSIE 5.0')!=-1);this.isGecko=ua.indexOf('Gecko')!=-1;this.isSafari=ua.indexOf('Safari')!=-1;this.isOpera=ua.indexOf('Opera')!=-1;this.isMac=ua.indexOf('Mac')!=-1;this.isNS7=ua.indexOf('Netscape/7')!=-1;this.isNS71=ua.indexOf('Netscape/7.1')!=-1;this.dialogCounter=0;if(this.isOpera){this.isMSIE=true;this.isGecko=false;this.isSafari=false;}this.idCounter=0;};TinyMCE.prototype.defParam=function(key,def_val){this.settings[key]=tinyMCE.getParam(key,def_val);};TinyMCE.prototype.init=function(settings){var theme;this.settings=settings;if(typeof(document.execCommand)=='undefined')return;if(!tinyMCE.baseURL){var elements=document.getElementsByTagName('script');for(var i=0;i');this.defParam("font_size_classes",'');this.defParam("font_size_style_values",'xx-small,x-small,small,medium,large,x-large,xx-large');this.defParam("event_elements",'a,img');this.defParam("convert_urls",true);this.defParam("table_inline_editing",false);this.defParam("object_resizing",true);if(this.isMSIE&&this.settings['browsers'].indexOf('msie')==-1)return;if(this.isGecko&&this.settings['browsers'].indexOf('gecko')==-1)return;if(this.isSafari&&this.settings['browsers'].indexOf('safari')==-1)return;if(this.isOpera&&this.settings['browsers'].indexOf('opera')==-1)return;var baseHREF=tinyMCE.settings['document_base_url'];var h=document.location.href;var p=h.indexOf('://');if(p>0&&document.location.protocol!="file:"){p=h.indexOf('/',p+3);h=h.substring(0,p);if(baseHREF.indexOf('://')==-1)baseHREF=h+baseHREF;tinyMCE.settings['document_base_url']=baseHREF;tinyMCE.settings['document_base_prefix']=h;}if(baseHREF.indexOf('?')!=-1)baseHREF=baseHREF.substring(0,baseHREF.indexOf('?'));this.settings['base_href']=baseHREF.substring(0,baseHREF.lastIndexOf('/'))+"/";theme=this.settings['theme'];this.blockRegExp=new RegExp("^(h[1-6]|p|div|address|pre|form|table|li|ol|ul|td|blockquote|center|dl|dir|fieldset|form|noscript|noframes|menu|isindex)$","i");this.posKeyCodes=new Array(13,45,36,35,33,34,37,38,39,40);this.uniqueURL='http://tinymce.moxiecode.cp/mce_temp_url';this.uniqueTag='';this.settings['theme_href']=tinyMCE.baseURL+"/themes/"+theme;if(!tinyMCE.isMSIE)this.settings['force_br_newlines']=false;if(tinyMCE.getParam("content_css",false)){var cssPath=tinyMCE.getParam("content_css","");if(cssPath.indexOf('://')==-1&&cssPath.charAt(0)!='/')this.settings['content_css']=this.documentBasePath+"/"+cssPath;else this.settings['content_css']=cssPath;}else this.settings['content_css']='';if(tinyMCE.getParam("popups_css",false)){var cssPath=tinyMCE.getParam("popups_css","");if(cssPath.indexOf('://')==-1&&cssPath.charAt(0)!='/')this.settings['popups_css']=this.documentBasePath+"/"+cssPath;else this.settings['popups_css']=cssPath;}else this.settings['popups_css']=tinyMCE.baseURL+"/themes/"+theme+"/css/editor_popup.css";if(tinyMCE.getParam("editor_css",false)){var cssPath=tinyMCE.getParam("editor_css","");if(cssPath.indexOf('://')==-1&&cssPath.charAt(0)!='/')this.settings['editor_css']=this.documentBasePath+"/"+cssPath;else this.settings['editor_css']=cssPath;}else this.settings['editor_css']=tinyMCE.baseURL+"/themes/"+theme+"/css/editor_ui.css";if(tinyMCE.settings['debug']){var msg="Debug: \n";msg+="baseURL: "+this.baseURL+"\n";msg+="documentBasePath: "+this.documentBasePath+"\n";msg+="content_css: "+this.settings['content_css']+"\n";msg+="popups_css: "+this.settings['popups_css']+"\n";msg+="editor_css: "+this.settings['editor_css']+"\n";alert(msg);}this._initCleanup();if(this.configs.length==0){if(this.isSafari&&this.getParam('safari_warning',true))alert("Safari support is very limited and should be considered experimental.\nSo there is no need to even submit bugreports on this early version.\nYou can disable this message by setting: safari_warning option to false");tinyMCE.addEvent(window,"load",TinyMCE.prototype.onLoad);if(tinyMCE.isMSIE){if(tinyMCE.settings['add_unload_trigger']){tinyMCE.addEvent(window,"unload",TinyMCE.prototype.unloadHandler);tinyMCE.addEvent(window.document,"beforeunload",TinyMCE.prototype.unloadHandler);}}else{if(tinyMCE.settings['add_unload_trigger'])tinyMCE.addEvent(window,"unload",function(){tinyMCE.triggerSave(true,true);});}}this.loadScript(tinyMCE.baseURL+'/themes/'+this.settings['theme']+'/editor_template'+tinyMCE.srcMode+'.js');this.loadScript(tinyMCE.baseURL+'/langs/'+this.settings['language']+'.js');this.loadCSS(this.settings['editor_css']);var themePlugins=tinyMCE.getParam('plugins','',true,',');if(this.settings['plugins']!=''){for(var i=0;i');this.loadedFiles[this.loadedFiles.length]=url;};TinyMCE.prototype.loadCSS=function(url){for(var i=0;i');this.loadedFiles[this.loadedFiles.length]=url;};TinyMCE.prototype.importCSS=function(doc,css_file){if(css_file=='')return;if(typeof(doc.createStyleSheet)=="undefined"){var elm=doc.createElement("link");elm.rel="stylesheet";elm.href=css_file;if((headArr=doc.getElementsByTagName("head"))!=null&&headArr.length>0)headArr[0].appendChild(elm);}else var styleSheet=doc.createStyleSheet(css_file);};TinyMCE.prototype.confirmAdd=function(e,settings){var elm=tinyMCE.isMSIE?event.srcElement:e.target;var elementId=elm.name?elm.name:elm.id;tinyMCE.settings=settings;if(!elm.getAttribute('mce_noask')&&confirm(tinyMCELang['lang_edit_confirm']))tinyMCE.addMCEControl(elm,elementId);elm.setAttribute('mce_noask','true');};TinyMCE.prototype.updateContent=function(form_element_name){var formElement=document.getElementById(form_element_name);for(var n in tinyMCE.instances){var inst=tinyMCE.instances[n];if(!tinyMCE.isInstance(inst))continue;inst.switchSettings();if(inst.formElement==formElement){var doc=inst.getDoc();tinyMCE._setHTML(doc,inst.formElement.value);if(!tinyMCE.isMSIE)doc.body.innerHTML=tinyMCE._cleanupHTML(inst,doc,this.settings,doc.body,inst.visualAid);}}};TinyMCE.prototype.addMCEControl=function(replace_element,form_element_name,target_document){var id="mce_editor_"+tinyMCE.idCounter++;var inst=new TinyMCEControl(tinyMCE.settings);inst.editorId=id;this.instances[id]=inst;inst.onAdd(replace_element,form_element_name,target_document);};TinyMCE.prototype.triggerSave=function(skip_cleanup,skip_callback){for(var n in tinyMCE.instances){var inst=tinyMCE.instances[n];if(!tinyMCE.isInstance(inst))continue;inst.switchSettings();tinyMCE.settings['preformatted']=false;if(typeof(skip_cleanup)=="undefined")skip_cleanup=false;if(typeof(skip_callback)=="undefined")skip_callback=false;tinyMCE._setHTML(inst.getDoc(),inst.getBody().innerHTML);if(inst.settings['cleanup']==false){tinyMCE.handleVisualAid(inst.getBody(),true,false,inst);tinyMCE._setEventsEnabled(inst.getBody(),true);}tinyMCE._customCleanup(inst,"submit_content_dom",inst.contentWindow.document.body);var htm=skip_cleanup?inst.getBody().innerHTML:tinyMCE._cleanupHTML(inst,inst.getDoc(),this.settings,inst.getBody(),this.visualAid,true);htm=tinyMCE._customCleanup(inst,"submit_content",htm);if(tinyMCE.settings["encoding"]=="xml"||tinyMCE.settings["encoding"]=="html")htm=tinyMCE.convertStringToXML(htm);if(!skip_callback&&tinyMCE.settings['save_callback']!="")var content=eval(tinyMCE.settings['save_callback']+"(inst.formTargetElementId,htm,inst.getBody());");if((typeof(content)!="undefined")&&content!=null)htm=content;htm=tinyMCE.regexpReplace(htm,"(","(","gi");htm=tinyMCE.regexpReplace(htm,")",")","gi");htm=tinyMCE.regexpReplace(htm,";",";","gi");htm=tinyMCE.regexpReplace(htm,""",""","gi");htm=tinyMCE.regexpReplace(htm,"^","^","gi");if(inst.formElement)inst.formElement.value=htm;}};TinyMCE.prototype._setEventsEnabled=function(node,state){var events=new Array('onfocus','onblur','onclick','ondblclick','onmousedown','onmouseup','onmouseover','onmousemove','onmouseout','onkeypress','onkeydown','onkeydown','onkeyup');var evs=tinyMCE.settings['event_elements'].split(',');for(var y=0;y","gi");content=tinyMCE.regexpReplace(content,"\r","
    ","gi");content=tinyMCE.regexpReplace(content,"\n","
    ","gi");}content=tinyMCE.storeAwayURLs(content);content=tinyMCE._customCleanup(inst,"insert_to_editor",content);if(tinyMCE.isMSIE){window.setInterval('try{tinyMCE.getCSSClasses(document.frames["'+editor_id+'"].document, "'+editor_id+'");}catch(e){}',500);if(tinyMCE.settings["force_br_newlines"])document.frames[editor_id].document.styleSheets[0].addRule("p","margin: 0px;");var body=document.frames[editor_id].document.body;tinyMCE.addEvent(body,"beforepaste",TinyMCE.prototype.eventPatch);tinyMCE.addEvent(body,"beforecut",TinyMCE.prototype.eventPatch);body.editorId=editor_id;}content=tinyMCE.cleanupHTMLCode(content);if(!tinyMCE.isMSIE){var contentElement=inst.getDoc().createElement("body");var doc=inst.getDoc();contentElement.innerHTML=content;if(tinyMCE.isGecko&&tinyMCE.settings['remove_lt_gt'])content=content.replace(new RegExp('<>','g'),"");if(tinyMCE.settings['cleanup_on_startup'])tinyMCE.setInnerHTML(inst.getBody(),tinyMCE._cleanupHTML(inst,doc,this.settings,contentElement));else{content=tinyMCE.regexpReplace(content,"","","gi");content=tinyMCE.regexpReplace(content,"","","gi");content=tinyMCE.regexpReplace(content,"","","gi");tinyMCE.setInnerHTML(inst.getBody(),content);}inst.convertAllRelativeURLs();}else{if(tinyMCE.settings['cleanup_on_startup']){tinyMCE._setHTML(inst.getDoc(),content);eval('try {tinyMCE.setInnerHTML(inst.getBody(), tinyMCE._cleanupHTML(inst, inst.contentDocument, this.settings, inst.getBody()));} catch(e) {}');}else tinyMCE._setHTML(inst.getDoc(),content);}var parentElm=document.getElementById(inst.editorId+'_parent');if(parentElm.lastChild.nodeName=="INPUT")inst.formElement=tinyMCE.isGecko?parentElm.firstChild:parentElm.lastChild;else inst.formElement=tinyMCE.isGecko?parentElm.previousSibling:parentElm.nextSibling;tinyMCE.handleVisualAid(inst.getBody(),true,tinyMCE.settings['visual'],inst);tinyMCE.executeCallback('setupcontent_callback','_setupContent',0,editor_id,inst.getBody(),inst.getDoc());if(!tinyMCE.isMSIE)TinyMCE.prototype.addEventHandlers(editor_id);if(tinyMCE.isMSIE)tinyMCE.addEvent(inst.getBody(),"blur",TinyMCE.prototype.eventPatch);tinyMCE.selectedInstance=inst;tinyMCE.selectedElement=inst.contentWindow.document.body;if(!inst.isHidden())tinyMCE.triggerNodeChange(false,true);tinyMCE._customCleanup(inst,"insert_to_editor_dom",inst.getBody());tinyMCE._customCleanup(inst,"setup_content_dom",inst.getBody());tinyMCE._setEventsEnabled(inst.getBody(),false);tinyMCE.cleanupAnchors(inst.getDoc());if(tinyMCE.getParam("convert_fonts_to_spans"))tinyMCE.convertSpansToFonts(inst.getDoc());inst.startContent=tinyMCE.trim(inst.getBody().innerHTML);inst.undoLevels[inst.undoLevels.length]=inst.startContent;tinyMCE.operaOpacityCounter=-1;};TinyMCE.prototype.cleanupHTMLCode=function(s){s=s.replace(//gi,'

     

    ');s=s.replace(/

    \s*<\/p>/gi,'

     

    ');s=s.replace(/<(h[1-6]|p|div|address|pre|form|table|li|ol|ul|td|b|em|strong|i|strike|u|span|a|ul|ol|li|blockquote)([a-z]*)([^\\|>]*?)\/>/gi,'<$1$2$3>');s=s.replace(new RegExp('\\s+><\/(img|br|hr)>/gi,'<$1$2 />');if(tinyMCE.isMSIE)s=s.replace(/

    <\/p>/gi,"


    ");s=s.replace(new RegExp('(href=\"?)(\\s*?#)','gi'),'$1'+tinyMCE.settings['document_base_url']+"#");return s;};TinyMCE.prototype.storeAwayURLs=function(s){s=s.replace(new RegExp('mce_src\\s*=\\s*\"[^ >\"]*\"','gi'),'');s=s.replace(new RegExp('mce_href\\s*=\\s*\"[^ >\"]*\"','gi'),'');s=s.replace(new RegExp('src\\s*=\\s*\"([^ >\"]*)\"','gi'),'src="$1" mce_src="$1"');s=s.replace(new RegExp('href\\s*=\\s*\"([^ >\"]*)\"','gi'),'href="$1" mce_href="$1"');return s;};TinyMCE.prototype.cancelEvent=function(e){if(tinyMCE.isMSIE){e.returnValue=false;e.cancelBubble=true;}else e.preventDefault();};TinyMCE.prototype.removeTinyMCEFormElements=function(form_obj){if(typeof(form_obj)=="undefined"||form_obj==null)return;if(form_obj.nodeName!="FORM"){if(form_obj.form)form_obj=form_obj.form;else form_obj=tinyMCE.getParentElement(form_obj,"form");}if(form_obj==null)return;for(var i=0;i");rng.collapse(false);rng.select();tinyMCE.execCommand("mceAddUndoLevel");tinyMCE.triggerNodeChange(false);return false;}}if(e.keyCode==8||e.keyCode==46){tinyMCE.selectedElement=e.target;tinyMCE.linkElement=tinyMCE.getParentElement(e.target,"a");tinyMCE.imgElement=tinyMCE.getParentElement(e.target,"img");tinyMCE.triggerNodeChange(false);}return false;break;case "keyup":case "keydown":if(e.target.editorId)tinyMCE.selectedInstance=tinyMCE.instances[e.target.editorId];else return;if(tinyMCE.selectedInstance)tinyMCE.selectedInstance.switchSettings();var inst=tinyMCE.selectedInstance;if(tinyMCE.isGecko&&tinyMCE.settings['force_p_newlines']&&(e.keyCode==8||e.keyCode==46)&&!e.shiftKey){if(tinyMCE.selectedInstance._handleBackSpace(e.type)){tinyMCE.execCommand("mceAddUndoLevel");e.preventDefault();return false;}}tinyMCE.selectedElement=null;tinyMCE.selectedNode=null;var elm=tinyMCE.selectedInstance.getFocusElement();tinyMCE.linkElement=tinyMCE.getParentElement(elm,"a");tinyMCE.imgElement=tinyMCE.getParentElement(elm,"img");tinyMCE.selectedElement=elm;if(tinyMCE.isGecko&&e.type=="keyup"&&e.keyCode==9)tinyMCE.handleVisualAid(tinyMCE.selectedInstance.getBody(),true,tinyMCE.settings['visual'],tinyMCE.selectedInstance);if(tinyMCE.isMSIE&&e.type=="keydown"&&e.keyCode==13)tinyMCE.enterKeyElement=tinyMCE.selectedInstance.getFocusElement();if(tinyMCE.isMSIE&&e.type=="keyup"&&e.keyCode==13){var elm=tinyMCE.enterKeyElement;if(elm){var re=new RegExp('^HR|IMG|BR$','g');var dre=new RegExp('^H[1-6]$','g');if(!elm.hasChildNodes()&&!re.test(elm.nodeName)){if(dre.test(elm.nodeName))elm.innerHTML="  ";else elm.innerHTML=" ";}}}var keys=tinyMCE.posKeyCodes;var posKey=false;for(var i=0;i-1)suffix='?rnd='+this.operaOpacityCounter++;element.src=tinyMCE.baseURL+"/themes/"+tinyMCE.getParam("theme")+"/images/opacity.png"+suffix;element.style.backgroundImage="url('"+element.mceOldSrc+"')";}else{if(element.mceOldSrc){element.src=element.mceOldSrc;element.parentNode.style.backgroundImage="";element.mceOldSrc=null;}}}}};TinyMCE.prototype.restoreClass=function(element){if(element!=null&&element.oldClassName&&!element.classLock){element.className=element.oldClassName;element.oldClassName=null;}};TinyMCE.prototype.setClassLock=function(element,lock_state){if(element!=null)element.classLock=lock_state;};TinyMCE.prototype.addEvent=function(obj,name,handler){if(tinyMCE.isMSIE){obj.attachEvent("on"+name,handler);}else obj.addEventListener(name,handler,false);};TinyMCE.prototype.submitPatch=function(){tinyMCE.removeTinyMCEFormElements(this);tinyMCE.triggerSave();this.mceOldSubmit();tinyMCE.isNotDirty=true;};TinyMCE.prototype.onLoad=function(){for(var c=0;c0)return;if(val.indexOf('%')==-1)val+='px';break;case "vspace":case "hspace":elm.style.marginTop=val+"px";elm.style.marginBottom=val+"px";elm.removeAttribute(attrib);return;case "align":if(elm.nodeName=="IMG"){if(tinyMCE.isMSIE)elm.style.styleFloat=val;else elm.style.cssFloat=val;}else elm.style.textAlign=val;elm.removeAttribute(attrib);return;}if(val!=''){eval('elm.style.'+style+' = val;');elm.removeAttribute(attrib);}}}else{if(style=='')return;var val=eval('elm.style.'+style)==''?tinyMCE.getAttrib(elm,attrib):eval('elm.style.'+style);val=val==null?'':''+val;switch(attrib){case "background":if(val.indexOf('url')==-1&&val!='')val="url('"+val+"');";if(val!=''){elm.style.backgroundImage=val;elm.removeAttribute(attrib);}return;case "border":case "width":case "height":val=val.replace('px','');break;case "align":if(tinyMCE.getAttrib(elm,'align')==''){if(elm.nodeName=="IMG"){if(tinyMCE.isMSIE&&elm.style.styleFloat!=''){val=elm.style.styleFloat;style='styleFloat';}else if(tinyMCE.isGecko&&elm.style.cssFloat!=''){val=elm.style.cssFloat;style='cssFloat';}}}break;}if(val!=''){elm.removeAttribute(attrib);elm.setAttribute(attrib,val);eval('elm.style.'+style+' = "";');}}};TinyMCE.prototype._cleanupAttribute=function(valid_attributes,element_name,attribute_node,element_node){var attribName=attribute_node.nodeName.toLowerCase();var attribValue=attribute_node.nodeValue;var attribMustBeValue=null;var verified=false;if(attribName.indexOf('moz_')!=-1)return null;if(!tinyMCE.cleanup_on_save&&(attribName=="mce_href"||attribName=="mce_src"))return{name:attribName,value:attribValue};if(tinyMCE.cleanup_verify_html&&!verified){for(var i=1;i1)val="url('"+eval(tinyMCE.getParam('urlconverter_callback')+"(m[1], null, true);")+"')";}if(tinyMCE.getParam("force_hex_style_colors"))val=tinyMCE.convertRGBToHex(val,true);if(val!="url('')")str+=key.toLowerCase()+": "+val+"; ";}}if(new RegExp('; $').test(str))str=str.substring(0,str.length-2);return str;};TinyMCE.prototype.convertRGBToHex=function(s,k){if(s.toLowerCase().indexOf('rgb')!=-1){var re=new RegExp("(.*?)rgb\\s*?\\(\\s*?([0-9]+).*?,\\s*?([0-9]+).*?,\\s*?([0-9]+).*?\\)(.*?)","gi");var rgb=s.replace(re,"$1,$2,$3,$4,$5").split(',');if(rgb.length==5){r=parseInt(rgb[1]).toString(16);g=parseInt(rgb[2]).toString(16);b=parseInt(rgb[3]).toString(16);r=r.length==1?'0'+r:r;g=g.length==1?'0'+g:g;b=b.length==1?'0'+b:b;s="#"+r+g+b;if(k)s=rgb[0]+s+rgb[4];}}return s;};TinyMCE.prototype.convertHexToRGB=function(s){if(s.indexOf('#')!=-1){s=s.replace(new RegExp('[^0-9A-F]','gi'),'');return "rgb("+parseInt(s.substring(0,2),16)+","+parseInt(s.substring(2,4),16)+","+parseInt(s.substring(4,6),16)+")";}return s;};TinyMCE.prototype._verifyClass=function(node){if(tinyMCE.isGecko){var className=node.getAttribute('class');if(!className)return false;}if(tinyMCE.isMSIE)var className=node.getAttribute('className');if(tinyMCE.cleanup_verify_css_classes&&tinyMCE.cleanup_on_save){var csses=tinyMCE.getCSSClasses();nonDefinedCSS=true;for(var c=0;c'+output;}}var re=new RegExp("^(TABLE|TD|TR)$");if(re.test(node.nodeName)){if((node.nodeName!="TABLE"||tinyMCE.cleanup_inline_styles)&&(width=tinyMCE.getAttrib(node,"width"))!=''){node.style.width=width.indexOf('%')!=-1?width:width.replace(/[^0-9]/gi,'')+"px";node.removeAttribute("width");}if((node.nodeName=="TABLE"&&!tinyMCE.cleanup_inline_styles)&&node.style.width!=''){tinyMCE.setAttrib(node,"width",node.style.width.replace('px',''));node.style.width='';}if((height=tinyMCE.getAttrib(node,"height"))!=''){height=""+height;node.style.height=height.indexOf('%')!=-1?height:height.replace(/[^0-9]/gi,'')+"px";node.removeAttribute("height");}}if(tinyMCE.cleanup_inline_styles){var re=new RegExp("^(TABLE|TD|TR|IMG|HR)$");if(re.test(node.nodeName)&&tinyMCE.getAttrib(node,"class").indexOf('mceItem')==-1){tinyMCE._moveStyle(node,'width','width');tinyMCE._moveStyle(node,'height','height');tinyMCE._moveStyle(node,'borderWidth','border');tinyMCE._moveStyle(node,'','vspace');tinyMCE._moveStyle(node,'','hspace');tinyMCE._moveStyle(node,'textAlign','align');tinyMCE._moveStyle(node,'backgroundColor','bgColor');tinyMCE._moveStyle(node,'borderColor','borderColor');tinyMCE._moveStyle(node,'backgroundImage','background');if(tinyMCE.isMSIE5)node.outerHTML=node.outerHTML;}else if(tinyMCE.isBlockElement(node))tinyMCE._moveStyle(node,'textAlign','align');if(node.nodeName=="FONT")tinyMCE._moveStyle(node,'color','color');}if(elementValidAttribs){for(var a=1;a"+node.innerHTML+"";if(elementName=="table"&&!node.hasChildNodes())return "";if(node.attributes.length>0){var lastAttrib="";for(var i=0;i"+this.convertStringToXML(String.fromCharCode(160))+"";if(tinyMCE.isMSIE&&elementName=="script")return "<"+elementName+elementAttribs+">"+node.text+"";if(node.hasChildNodes()){if(!(elementName=="span"&&elementAttribs==""&&tinyMCE.getParam("trim_span_elements"))){if(elementName=="p"&&tinyMCE.cleanup_force_br_newlines)output+="";else output+="<"+elementName+elementAttribs+">";}for(var i=0;i
    ";else output+="";}}else{if(!nonEmptyTag){if(openTag)output+="<"+elementName+elementAttribs+">";else output+="<"+elementName+elementAttribs+" />";}}return output;case 3:if(node.parentNode.nodeName=="SCRIPT"||node.parentNode.nodeName=="NOSCRIPT"||node.parentNode.nodeName=="STYLE")return node.nodeValue;return this.convertStringToXML(node.nodeValue);case 8:return "";default:return "[UNKNOWN NODETYPE "+node.nodeType+"]";}};TinyMCE.prototype.convertStringToXML=function(html_data){var output="";for(var i=0;i127)output+='&#'+chr+";";else output+=String.fromCharCode(chr);continue;}if(tinyMCE.settings['entity_encoding']=="raw"){output+=String.fromCharCode(chr);continue;}if(typeof(tinyMCE.settings['cleanup_entities']["c"+chr])!='undefined'&&tinyMCE.settings['cleanup_entities']["c"+chr]!='')output+='&'+tinyMCE.settings['cleanup_entities']["c"+chr]+';';else output+=''+String.fromCharCode(chr);}return output;};TinyMCE.prototype._getCleanupElementName=function(chunk){var pos;if(chunk.charAt(0)=='+')chunk=chunk.substring(1);if(chunk.charAt(0)=='-')chunk=chunk.substring(1);if((pos=chunk.indexOf('/'))!=-1)chunk=chunk.substring(0,pos);if((pos=chunk.indexOf('['))!=-1)chunk=chunk.substring(0,pos);return chunk;};TinyMCE.prototype._initCleanup=function(){var validElements=tinyMCE.settings["valid_elements"];validElements=validElements.split(',');var extendedValidElements=tinyMCE.settings["extended_valid_elements"];extendedValidElements=extendedValidElements.split(',');for(var i=0;i/gi,'>');return html;}if(on_save&&tinyMCE.getParam("convert_fonts_to_spans"))tinyMCE.convertFontsToSpans(doc);tinyMCE._customCleanup(inst,on_save?"get_from_editor_dom":"insert_to_editor_dom",doc.body);var n=doc.getElementsByTagName("font");for(var i=0;i[ \n\r]*[ \n\r]*

    ','
    ','gi'));tinyMCE.setInnerHTML(element,tinyMCE.regexpReplace(element.innerHTML,'','','gi'));}var html=this.cleanupNode(element);if(tinyMCE.settings['debug'])tinyMCE.debug("Cleanup process executed in: "+(new Date().getTime()-startTime)+" ms.");html=tinyMCE.regexpReplace(html,'


    ','
    ');html=tinyMCE.regexpReplace(html,'

     


     

    ','
    ');html=tinyMCE.regexpReplace(html,'
    \\s*
    \\s*
     
    ';for(i=0;i';}h+='
    ';break;case'title':h+='
    '+t+'';break;case'disabled':h+='
    '+t+'';break;default:h+='
    '+t+'';}h+='
    ';e.innerHTML=h;this.needsUpdate=false;this.updateBlocker();},show:function(){var nl,i;if(tinyMCE.lastMenu==this)return;if(this.needsUpdate)this.update();if(tinyMCE.lastMenu&&tinyMCE.lastMenu!=this)tinyMCE.lastMenu.hide();this.parent.show.call(this);if(!tinyMCE.isOpera){}tinyMCE.lastMenu=this;}});TinyMCE_Engine.prototype.debug=function(){var m="",e,a,i;e=document.getElementById("tinymce_debug");if(!e){var d=document.createElement("div");d.setAttribute("className","debugger");d.className="debugger";d.innerHTML='Debug output:';document.body.appendChild(d);e=document.getElementById("tinymce_debug");}a=this.debug.arguments;for(i=0;i 0) { + elms = document.forms[0].elements; + for (i=0; i'); - this.defParam("font_size_classes", ''); - this.defParam("font_size_style_values", 'xx-small,x-small,small,medium,large,x-large,xx-large'); - this.defParam("event_elements", 'a,img'); - this.defParam("convert_urls", true); - this.defParam("table_inline_editing", false); - this.defParam("object_resizing", true); + // Set default values on settings + this._def("mode", "none"); + this._def("theme", "advanced"); + this._def("plugins", "", true); + this._def("language", "en"); + this._def("docs_language", this.settings['language']); + this._def("elements", ""); + this._def("textarea_trigger", "mce_editable"); + this._def("editor_selector", ""); + this._def("editor_deselector", "mceNoEditor"); + this._def("valid_elements", "+a[id|style|rel|rev|charset|hreflang|dir|lang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],-strong/-b[class|style],-em/-i[class|style],-strike[class|style],-u[class|style],#p[id|style|dir|class|align],-ol[class|style],-ul[class|style],-li[class|style],br,img[id|dir|lang|longdesc|usemap|style|class|src|onmouseover|onmouseout|border|alt=|title|hspace|vspace|width|height|align],-sub[style|class],-sup[style|class],-blockquote[dir|style],-table[border=0|cellspacing|cellpadding|width|height|class|align|summary|style|dir|id|lang|bgcolor|background|bordercolor],-tr[id|lang|dir|class|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor],tbody[id|class],thead[id|class],tfoot[id|class],-td[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor|scope],-th[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|scope],caption[id|lang|dir|class|style],-div[id|dir|class|align|style],-span[style|class|align],-pre[class|align|style],address[class|align|style],-h1[id|style|dir|class|align],-h2[id|style|dir|class|align],-h3[id|style|dir|class|align],-h4[id|style|dir|class|align],-h5[id|style|dir|class|align],-h6[id|style|dir|class|align],hr[class|style],-font[face|size|style|id|class|dir|color],dd[id|class|title|style|dir|lang],dl[id|class|title|style|dir|lang],dt[id|class|title|style|dir|lang]"); + this._def("extended_valid_elements", ""); + this._def("invalid_elements", ""); + this._def("encoding", ""); + this._def("urlconverter_callback", tinyMCE.getParam("urlconvertor_callback", "TinyMCE_Engine.prototype.convertURL")); + this._def("save_callback", ""); + this._def("debug", false); + this._def("force_br_newlines", false); + this._def("force_p_newlines", true); + this._def("add_form_submit_trigger", true); + this._def("relative_urls", true); + this._def("remove_script_host", true); + this._def("focus_alert", true); + this._def("document_base_url", this.documentURL); + this._def("visual", true); + this._def("visual_table_class", "mceVisualAid"); + this._def("setupcontent_callback", ""); + this._def("fix_content_duplication", true); + this._def("custom_undo_redo", true); + this._def("custom_undo_redo_levels", -1); + this._def("custom_undo_redo_keyboard_shortcuts", true); + this._def("custom_undo_redo_restore_selection", true); + this._def("verify_html", true); + this._def("apply_source_formatting", false); + this._def("directionality", "ltr"); + this._def("cleanup_on_startup", false); + this._def("inline_styles", false); + this._def("convert_newlines_to_brs", false); + this._def("auto_reset_designmode", true); + this._def("entities", "160,nbsp,161,iexcl,162,cent,163,pound,164,curren,165,yen,166,brvbar,167,sect,168,uml,169,copy,170,ordf,171,laquo,172,not,173,shy,174,reg,175,macr,176,deg,177,plusmn,178,sup2,179,sup3,180,acute,181,micro,182,para,183,middot,184,cedil,185,sup1,186,ordm,187,raquo,188,frac14,189,frac12,190,frac34,191,iquest,192,Agrave,193,Aacute,194,Acirc,195,Atilde,196,Auml,197,Aring,198,AElig,199,Ccedil,200,Egrave,201,Eacute,202,Ecirc,203,Euml,204,Igrave,205,Iacute,206,Icirc,207,Iuml,208,ETH,209,Ntilde,210,Ograve,211,Oacute,212,Ocirc,213,Otilde,214,Ouml,215,times,216,Oslash,217,Ugrave,218,Uacute,219,Ucirc,220,Uuml,221,Yacute,222,THORN,223,szlig,224,agrave,225,aacute,226,acirc,227,atilde,228,auml,229,aring,230,aelig,231,ccedil,232,egrave,233,eacute,234,ecirc,235,euml,236,igrave,237,iacute,238,icirc,239,iuml,240,eth,241,ntilde,242,ograve,243,oacute,244,ocirc,245,otilde,246,ouml,247,divide,248,oslash,249,ugrave,250,uacute,251,ucirc,252,uuml,253,yacute,254,thorn,255,yuml,402,fnof,913,Alpha,914,Beta,915,Gamma,916,Delta,917,Epsilon,918,Zeta,919,Eta,920,Theta,921,Iota,922,Kappa,923,Lambda,924,Mu,925,Nu,926,Xi,927,Omicron,928,Pi,929,Rho,931,Sigma,932,Tau,933,Upsilon,934,Phi,935,Chi,936,Psi,937,Omega,945,alpha,946,beta,947,gamma,948,delta,949,epsilon,950,zeta,951,eta,952,theta,953,iota,954,kappa,955,lambda,956,mu,957,nu,958,xi,959,omicron,960,pi,961,rho,962,sigmaf,963,sigma,964,tau,965,upsilon,966,phi,967,chi,968,psi,969,omega,977,thetasym,978,upsih,982,piv,8226,bull,8230,hellip,8242,prime,8243,Prime,8254,oline,8260,frasl,8472,weierp,8465,image,8476,real,8482,trade,8501,alefsym,8592,larr,8593,uarr,8594,rarr,8595,darr,8596,harr,8629,crarr,8656,lArr,8657,uArr,8658,rArr,8659,dArr,8660,hArr,8704,forall,8706,part,8707,exist,8709,empty,8711,nabla,8712,isin,8713,notin,8715,ni,8719,prod,8721,sum,8722,minus,8727,lowast,8730,radic,8733,prop,8734,infin,8736,ang,8743,and,8744,or,8745,cap,8746,cup,8747,int,8756,there4,8764,sim,8773,cong,8776,asymp,8800,ne,8801,equiv,8804,le,8805,ge,8834,sub,8835,sup,8836,nsub,8838,sube,8839,supe,8853,oplus,8855,otimes,8869,perp,8901,sdot,8968,lceil,8969,rceil,8970,lfloor,8971,rfloor,9001,lang,9002,rang,9674,loz,9824,spades,9827,clubs,9829,hearts,9830,diams,34,quot,38,amp,60,lt,62,gt,338,OElig,339,oelig,352,Scaron,353,scaron,376,Yuml,710,circ,732,tilde,8194,ensp,8195,emsp,8201,thinsp,8204,zwnj,8205,zwj,8206,lrm,8207,rlm,8211,ndash,8212,mdash,8216,lsquo,8217,rsquo,8218,sbquo,8220,ldquo,8221,rdquo,8222,bdquo,8224,dagger,8225,Dagger,8240,permil,8249,lsaquo,8250,rsaquo,8364,euro", true); + this._def("entity_encoding", "named"); + this._def("cleanup_callback", ""); + this._def("add_unload_trigger", true); + this._def("ask", false); + this._def("nowrap", false); + this._def("auto_resize", false); + this._def("auto_focus", false); + this._def("cleanup", true); + this._def("remove_linebreaks", true); + this._def("button_tile_map", false); + this._def("submit_patch", true); + this._def("browsers", "msie,safari,gecko,opera", true); + this._def("dialog_type", "window"); + this._def("accessibility_warnings", true); + this._def("accessibility_focus", true); + this._def("merge_styles_invalid_parents", ""); + this._def("force_hex_style_colors", true); + this._def("trim_span_elements", true); + this._def("convert_fonts_to_spans", false); + this._def("doctype", ''); + this._def("font_size_classes", ''); + this._def("font_size_style_values", 'xx-small,x-small,small,medium,large,x-large,xx-large', true); + this._def("event_elements", 'a,img', true); + this._def("convert_urls", true); + this._def("table_inline_editing", false); + this._def("object_resizing", true); + this._def("custom_shortcuts", true); + this._def("convert_on_click", false); + this._def("content_css", ''); + this._def("fix_list_elements", false); + this._def("fix_table_elements", false); - // Browser check IE - if (this.isMSIE && this.settings['browsers'].indexOf('msie') == -1) - return; + // Browser check IE + if (this.isMSIE && this.settings['browsers'].indexOf('msie') == -1) + return; - // Browser check Gecko - if (this.isGecko && this.settings['browsers'].indexOf('gecko') == -1) - return; + // Browser check Gecko + if (this.isGecko && this.settings['browsers'].indexOf('gecko') == -1) + return; - // Browser check Safari - if (this.isSafari && this.settings['browsers'].indexOf('safari') == -1) - return; + // Browser check Safari + if (this.isSafari && this.settings['browsers'].indexOf('safari') == -1) + return; - // Browser check Opera - if (this.isOpera && this.settings['browsers'].indexOf('opera') == -1) - return; + // Browser check Opera + if (this.isOpera && this.settings['browsers'].indexOf('opera') == -1) + return; - // If not super absolute make it so - var baseHREF = tinyMCE.settings['document_base_url']; - var h = document.location.href; - var p = h.indexOf('://'); - if (p > 0 && document.location.protocol != "file:") { - p = h.indexOf('/', p + 3); - h = h.substring(0, p); + // If not super absolute make it so + var baseHREF = tinyMCE.settings['document_base_url']; + var h = document.location.href; + var p = h.indexOf('://'); + if (p > 0 && document.location.protocol != "file:") { + p = h.indexOf('/', p + 3); + h = h.substring(0, p); - if (baseHREF.indexOf('://') == -1) - baseHREF = h + baseHREF; + if (baseHREF.indexOf('://') == -1) + baseHREF = h + baseHREF; - tinyMCE.settings['document_base_url'] = baseHREF; - tinyMCE.settings['document_base_prefix'] = h; - } + tinyMCE.settings['document_base_url'] = baseHREF; + tinyMCE.settings['document_base_prefix'] = h; + } - // Trim away query part - if (baseHREF.indexOf('?') != -1) - baseHREF = baseHREF.substring(0, baseHREF.indexOf('?')); + // Trim away query part + if (baseHREF.indexOf('?') != -1) + baseHREF = baseHREF.substring(0, baseHREF.indexOf('?')); - this.settings['base_href'] = baseHREF.substring(0, baseHREF.lastIndexOf('/')) + "/"; + this.settings['base_href'] = baseHREF.substring(0, baseHREF.lastIndexOf('/')) + "/"; - theme = this.settings['theme']; - this.blockRegExp = new RegExp("^(h[1-6]|p|div|address|pre|form|table|li|ol|ul|td|blockquote|center|dl|dir|fieldset|form|noscript|noframes|menu|isindex)$", "i"); - this.posKeyCodes = new Array(13,45,36,35,33,34,37,38,39,40); - this.uniqueURL = 'http://tinymce.moxiecode.cp/mce_temp_url'; // Make unique URL non real URL - this.uniqueTag = ''; + theme = this.settings['theme']; + this.blockRegExp = new RegExp("^(h[1-6]|p|div|address|pre|form|table|li|ol|ul|td|blockquote|center|dl|dir|fieldset|form|noscript|noframes|menu|isindex)$", "i"); + this.posKeyCodes = new Array(13,45,36,35,33,34,37,38,39,40); + this.uniqueURL = 'http://tinymce.moxiecode.cp/mce_temp_url'; // Make unique URL non real URL + this.uniqueTag = ''; + this.callbacks = new Array('onInit', 'getInfo', 'getEditorTemplate', 'setupContent', 'onChange', 'onPageLoad', 'handleNodeChange', 'initInstance', 'execCommand', 'getControlHTML', 'handleEvent', 'cleanup'); - // Theme url - this.settings['theme_href'] = tinyMCE.baseURL + "/themes/" + theme; + // Theme url + this.settings['theme_href'] = tinyMCE.baseURL + "/themes/" + theme; - if (!tinyMCE.isMSIE) - this.settings['force_br_newlines'] = false; + if (!tinyMCE.isMSIE) + this.settings['force_br_newlines'] = false; - if (tinyMCE.getParam("content_css", false)) { - var cssPath = tinyMCE.getParam("content_css", ""); + if (tinyMCE.getParam("popups_css", false)) { + var cssPath = tinyMCE.getParam("popups_css", ""); - // Is relative - if (cssPath.indexOf('://') == -1 && cssPath.charAt(0) != '/') - this.settings['content_css'] = this.documentBasePath + "/" + cssPath; - else - this.settings['content_css'] = cssPath; - } else - this.settings['content_css'] = ''; + // Is relative + if (cssPath.indexOf('://') == -1 && cssPath.charAt(0) != '/') + this.settings['popups_css'] = this.documentBasePath + "/" + cssPath; + else + this.settings['popups_css'] = cssPath; + } else + this.settings['popups_css'] = tinyMCE.baseURL + "/themes/" + theme + "/css/editor_popup.css"; - if (tinyMCE.getParam("popups_css", false)) { - var cssPath = tinyMCE.getParam("popups_css", ""); + if (tinyMCE.getParam("editor_css", false)) { + var cssPath = tinyMCE.getParam("editor_css", ""); - // Is relative - if (cssPath.indexOf('://') == -1 && cssPath.charAt(0) != '/') - this.settings['popups_css'] = this.documentBasePath + "/" + cssPath; - else - this.settings['popups_css'] = cssPath; - } else - this.settings['popups_css'] = tinyMCE.baseURL + "/themes/" + theme + "/css/editor_popup.css"; + // Is relative + if (cssPath.indexOf('://') == -1 && cssPath.charAt(0) != '/') + this.settings['editor_css'] = this.documentBasePath + "/" + cssPath; + else + this.settings['editor_css'] = cssPath; + } else + this.settings['editor_css'] = tinyMCE.baseURL + "/themes/" + theme + "/css/editor_ui.css"; - if (tinyMCE.getParam("editor_css", false)) { - var cssPath = tinyMCE.getParam("editor_css", ""); + if (tinyMCE.settings['debug']) { + var msg = "Debug: \n"; - // Is relative - if (cssPath.indexOf('://') == -1 && cssPath.charAt(0) != '/') - this.settings['editor_css'] = this.documentBasePath + "/" + cssPath; - else - this.settings['editor_css'] = cssPath; - } else - this.settings['editor_css'] = tinyMCE.baseURL + "/themes/" + theme + "/css/editor_ui.css"; + msg += "baseURL: " + this.baseURL + "\n"; + msg += "documentBasePath: " + this.documentBasePath + "\n"; + msg += "content_css: " + this.settings['content_css'] + "\n"; + msg += "popups_css: " + this.settings['popups_css'] + "\n"; + msg += "editor_css: " + this.settings['editor_css'] + "\n"; - if (tinyMCE.settings['debug']) { - var msg = "Debug: \n"; + alert(msg); + } - msg += "baseURL: " + this.baseURL + "\n"; - msg += "documentBasePath: " + this.documentBasePath + "\n"; - msg += "content_css: " + this.settings['content_css'] + "\n"; - msg += "popups_css: " + this.settings['popups_css'] + "\n"; - msg += "editor_css: " + this.settings['editor_css'] + "\n"; + // Only do this once + if (this.configs.length == 0) { + // Is Safari enabled + if (this.isSafari && this.getParam('safari_warning', false)) + alert("Safari support is very limited and should be considered experimental.\nSo there is no need to even submit bugreports on this early version.\nYou can disable this message by setting: safari_warning option to false"); - alert(msg); - } + if (typeof(TinyMCECompressed) == "undefined") { + tinyMCE.addEvent(window, "DOMContentLoaded", TinyMCE_Engine.prototype.onLoad); - // Init HTML cleanup - this._initCleanup(); + if (tinyMCE.isMSIE && !tinyMCE.isOpera) { + if (document.body) + tinyMCE.addEvent(document.body, "readystatechange", TinyMCE_Engine.prototype.onLoad); + else + tinyMCE.addEvent(document, "readystatechange", TinyMCE_Engine.prototype.onLoad); + } - // Only do this once - if (this.configs.length == 0) { - // Is Safari enabled - if (this.isSafari && this.getParam('safari_warning', true)) - alert("Safari support is very limited and should be considered experimental.\nSo there is no need to even submit bugreports on this early version.\nYou can disable this message by setting: safari_warning option to false"); + tinyMCE.addEvent(window, "load", TinyMCE_Engine.prototype.onLoad); + tinyMCE._addUnloadEvents(); + } + } - tinyMCE.addEvent(window, "load", TinyMCE.prototype.onLoad); + this.loadScript(tinyMCE.baseURL + '/themes/' + this.settings['theme'] + '/editor_template' + tinyMCE.srcMode + '.js'); + this.loadScript(tinyMCE.baseURL + '/langs/' + this.settings['language'] + '.js'); + this.loadCSS(this.settings['editor_css']); + // Add plugins + var p = tinyMCE.getParam('plugins', '', true, ','); + if (p.length > 0) { + for (var i=0; i'); + + this.loadedFiles[this.loadedFiles.length] = url; + }, + + loadCSS : function(url) { + var ar = url.replace(/\s+/, '').split(','); + var lflen = 0, csslen = 0; + var skip = false; + var x = 0, i = 0; + + for (x = 0,csslen = ar.length; x 0) { + /* Make sure it doesn't exist. */ + for (i=0, lflen=this.loadedFiles.length; i'); + this.loadedFiles[this.loadedFiles.length] = ar[x]; + } + } + } + }, + + importCSS : function(doc, css) { + var css_ary = css.replace(/\s+/, '').split(','); + var csslen, elm, headArr, x, css_file; + + for (x = 0, csslen = css_ary.length; x 0) { + // Is relative, make absolute + if (css_file.indexOf('://') == -1 && css_file.charAt(0) != '/') + css_file = this.documentBasePath + "/" + css_file; + + if (typeof(doc.createStyleSheet) == "undefined") { + elm = doc.createElement("link"); + + elm.rel = "stylesheet"; + elm.href = css_file; + + if ((headArr = doc.getElementsByTagName("head")) != null && headArr.length > 0) + headArr[0].appendChild(elm); + } else + doc.createStyleSheet(css_file); + } + } + }, + + confirmAdd : function(e, settings) { + var elm = tinyMCE.isMSIE ? event.srcElement : e.target; + var elementId = elm.name ? elm.name : elm.id; + + tinyMCE.settings = settings; + + if (tinyMCE.settings['convert_on_click'] || (!elm.getAttribute('mce_noask') && confirm(tinyMCELang['lang_edit_confirm']))) + tinyMCE.addMCEControl(elm, elementId); + + elm.setAttribute('mce_noask', 'true'); + }, + + updateContent : function(form_element_name) { + // Find MCE instance linked to given form element and copy it's value + var formElement = document.getElementById(form_element_name); + for (var n in tinyMCE.instances) { + var inst = tinyMCE.instances[n]; + if (!tinyMCE.isInstance(inst)) + continue; + + inst.switchSettings(); + + if (inst.formElement == formElement) { + var doc = inst.getDoc(); + + tinyMCE._setHTML(doc, inst.formElement.value); + + if (!tinyMCE.isMSIE) + doc.body.innerHTML = tinyMCE._cleanupHTML(inst, doc, this.settings, doc.body, inst.visualAid); + } + } + }, + + addMCEControl : function(replace_element, form_element_name, target_document) { + var id = "mce_editor_" + tinyMCE.idCounter++; + var inst = new TinyMCE_Control(tinyMCE.settings); + + inst.editorId = id; + this.instances[id] = inst; + + inst._onAdd(replace_element, form_element_name, target_document); + }, + + removeMCEControl : function(editor_id) { + var inst = tinyMCE.getInstanceById(editor_id); + + if (inst) { + inst.switchSettings(); + + editor_id = inst.editorId; + var html = tinyMCE.getContent(editor_id); + + // Remove editor instance from instances array + var tmpInstances = new Array(); + for (var instanceName in tinyMCE.instances) { + var instance = tinyMCE.instances[instanceName]; + if (!tinyMCE.isInstance(instance)) + continue; + + if (instanceName != editor_id) + tmpInstances[instanceName] = instance; + } + tinyMCE.instances = tmpInstances; + + tinyMCE.selectedElement = null; + tinyMCE.selectedInstance = null; + + // Remove element + var replaceElement = document.getElementById(editor_id + "_parent"); + var oldTargetElement = inst.oldTargetElement; + var targetName = oldTargetElement.nodeName.toLowerCase(); + + if (targetName == "textarea" || targetName == "input") { + // Just show the old text area + replaceElement.parentNode.removeChild(replaceElement); + oldTargetElement.style.display = "inline"; + oldTargetElement.value = html; + } else { + oldTargetElement.innerHTML = html; + oldTargetElement.style.display = 'block'; + + replaceElement.parentNode.insertBefore(oldTargetElement, replaceElement); + replaceElement.parentNode.removeChild(replaceElement); + } + } + }, + + triggerSave : function(skip_cleanup, skip_callback) { + var inst, n; + + // Default to false + if (typeof(skip_cleanup) == "undefined") + skip_cleanup = false; + + // Default to false + if (typeof(skip_callback) == "undefined") + skip_callback = false; + + // Cleanup and set all form fields + for (n in tinyMCE.instances) { + inst = tinyMCE.instances[n]; + + if (!tinyMCE.isInstance(inst)) + continue; + + inst.triggerSave(skip_cleanup, skip_callback); + } + }, + + resetForm : function(form_index) { + var i, inst, n, formObj = document.forms[form_index]; + + for (n in tinyMCE.instances) { + inst = tinyMCE.instances[n]; + + if (!tinyMCE.isInstance(inst)) + continue; + + inst.switchSettings(); + + for (i=0; i'); - - this.loadedFiles[this.loadedFiles.length] = url; -}; - -TinyMCE.prototype.loadCSS = function(url) { - for (var i=0; i'); + case "mceAddControl": + case "mceAddEditor": + tinyMCE.addMCEControl(tinyMCE._getElementById(value), value); + return; - this.loadedFiles[this.loadedFiles.length] = url; -}; + case "mceAddFrameControl": + tinyMCE.addMCEControl(tinyMCE._getElementById(value['element'], value['document']), value['element'], value['document']); + return; -TinyMCE.prototype.importCSS = function(doc, css_file) { - if (css_file == '') - return; + case "mceRemoveControl": + case "mceRemoveEditor": + tinyMCE.removeMCEControl(value); + return; - if (typeof(doc.createStyleSheet) == "undefined") { - var elm = doc.createElement("link"); + case "mceResetDesignMode": + // Resets the designmode state of the editors in Gecko + if (!tinyMCE.isMSIE) { + for (var n in tinyMCE.instances) { + if (!tinyMCE.isInstance(tinyMCE.instances[n])) + continue; - elm.rel = "stylesheet"; - elm.href = css_file; + try { + tinyMCE.instances[n].getDoc().designMode = "on"; + } catch (e) { + // Ignore any errors + } + } + } - if ((headArr = doc.getElementsByTagName("head")) != null && headArr.length > 0) - headArr[0].appendChild(elm); - } else - var styleSheet = doc.createStyleSheet(css_file); -}; + return; + } -TinyMCE.prototype.confirmAdd = function(e, settings) { - var elm = tinyMCE.isMSIE ? event.srcElement : e.target; - var elementId = elm.name ? elm.name : elm.id; + if (this.selectedInstance) { + this.selectedInstance.execCommand(command, user_interface, value); + } else if (tinyMCE.settings['focus_alert']) + alert(tinyMCELang['lang_focus_alert']); + }, - tinyMCE.settings = settings; + _createIFrame : function(replace_element, doc, win) { + var iframe, id = replace_element.getAttribute("id"); + var aw, ah; - if (!elm.getAttribute('mce_noask') && confirm(tinyMCELang['lang_edit_confirm'])) - tinyMCE.addMCEControl(elm, elementId); + if (typeof(doc) == "undefined") + doc = document; - elm.setAttribute('mce_noask', 'true'); -}; + if (typeof(win) == "undefined") + win = window; -TinyMCE.prototype.updateContent = function(form_element_name) { - // Find MCE instance linked to given form element and copy it's value - var formElement = document.getElementById(form_element_name); - for (var n in tinyMCE.instances) { - var inst = tinyMCE.instances[n]; - if (!tinyMCE.isInstance(inst)) - continue; + iframe = doc.createElement("iframe"); + + aw = "" + tinyMCE.settings['area_width']; + ah = "" + tinyMCE.settings['area_height']; + + if (aw.indexOf('%') == -1) { + aw = parseInt(aw); + aw = aw < 0 ? 300 : aw; + aw = aw + "px"; + } + + if (ah.indexOf('%') == -1) { + ah = parseInt(ah); + ah = ah < 0 ? 240 : ah; + ah = ah + "px"; + } + + iframe.setAttribute("id", id); + iframe.setAttribute("className", "mceEditorIframe"); + iframe.setAttribute("border", "0"); + iframe.setAttribute("frameBorder", "0"); + iframe.setAttribute("marginWidth", "0"); + iframe.setAttribute("marginHeight", "0"); + iframe.setAttribute("leftMargin", "0"); + iframe.setAttribute("topMargin", "0"); + iframe.setAttribute("width", aw); + iframe.setAttribute("height", ah); + iframe.setAttribute("allowtransparency", "true"); + + if (tinyMCE.settings["auto_resize"]) + iframe.setAttribute("scrolling", "no"); + + // Must have a src element in MSIE HTTPs breaks aswell as absoute URLs + if (tinyMCE.isMSIE && !tinyMCE.isOpera) + iframe.setAttribute("src", this.settings['default_document']); + + iframe.style.width = aw; + iframe.style.height = ah; + + // MSIE 5.0 issue + if (tinyMCE.isMSIE && !tinyMCE.isOpera) + replace_element.outerHTML = iframe.outerHTML; + else + replace_element.parentNode.replaceChild(iframe, replace_element); + + if (tinyMCE.isMSIE && !tinyMCE.isOpera) + return win.frames[id]; + else + return iframe; + }, + + setupContent : function(editor_id) { + var inst = tinyMCE.instances[editor_id]; + var doc = inst.getDoc(); + var head = doc.getElementsByTagName('head').item(0); + var content = inst.startContent; inst.switchSettings(); - if (inst.formElement == formElement) { - var doc = inst.getDoc(); - - tinyMCE._setHTML(doc, inst.formElement.value); + // Not loaded correctly hit it again, Mozilla bug #997860 + if (!tinyMCE.isMSIE && tinyMCE.getParam("setupcontent_reload", false) && doc.title != "blank_page") { + // This part will remove the designMode status + // Failes first time in Firefox 1.5b2 on Mac + try {doc.location.href = tinyMCE.baseURL + "/blank.htm";} catch (ex) {} + window.setTimeout("tinyMCE.setupContent('" + editor_id + "');", 1000); + return; + } - if (!tinyMCE.isMSIE) - doc.body.innerHTML = tinyMCE._cleanupHTML(inst, doc, this.settings, doc.body, inst.visualAid); + if (!head) { + window.setTimeout("tinyMCE.setupContent('" + editor_id + "');", 10); + return; + } + + // Import theme specific content CSS the user specific + tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/themes/" + inst.settings['theme'] + "/css/editor_content.css"); + tinyMCE.importCSS(inst.getDoc(), inst.settings['content_css']); + tinyMCE.dispatchCallback(inst, 'init_instance_callback', 'initInstance', inst); + + // Setup keyboard shortcuts + if (tinyMCE.getParam('custom_undo_redo_keyboard_shortcuts')) { + inst.addShortcut('ctrl', 'z', 'lang_undo_desc', 'Undo'); + inst.addShortcut('ctrl', 'y', 'lang_redo_desc', 'Redo'); + } + + // Add default shortcuts for gecko + if (tinyMCE.isGecko) { + inst.addShortcut('ctrl', 'b', 'lang_bold_desc', 'Bold'); + inst.addShortcut('ctrl', 'i', 'lang_italic_desc', 'Italic'); + inst.addShortcut('ctrl', 'u', 'lang_underline_desc', 'Underline'); + } + + // Setup span styles + if (tinyMCE.getParam("convert_fonts_to_spans")) + inst.getDoc().body.setAttribute('id', 'mceSpanFonts'); + + if (tinyMCE.settings['nowrap']) + doc.body.style.whiteSpace = "nowrap"; + + doc.body.dir = this.settings['directionality']; + doc.editorId = editor_id; + + // Add on document element in Mozilla + if (!tinyMCE.isMSIE) + doc.documentElement.editorId = editor_id; + + inst.setBaseHREF(tinyMCE.settings['base_href']); + + // Replace new line characters to BRs + if (tinyMCE.settings['convert_newlines_to_brs']) { + content = tinyMCE.regexpReplace(content, "\r\n", "
    ", "gi"); + content = tinyMCE.regexpReplace(content, "\r", "
    ", "gi"); + content = tinyMCE.regexpReplace(content, "\n", "
    ", "gi"); + } + + // Open closed anchors + // content = content.replace(new RegExp('', 'gi'), ''); + + // Call custom cleanup code + content = tinyMCE.storeAwayURLs(content); + content = tinyMCE._customCleanup(inst, "insert_to_editor", content); + + if (tinyMCE.isMSIE) { + // Ugly!!! + window.setInterval('try{tinyMCE.getCSSClasses(tinyMCE.instances["' + editor_id + '"].getDoc(), "' + editor_id + '");}catch(e){}', 500); + + if (tinyMCE.settings["force_br_newlines"]) + doc.styleSheets[0].addRule("p", "margin: 0;"); + + var body = inst.getBody(); + body.editorId = editor_id; + } + + content = tinyMCE.cleanupHTMLCode(content); + + // Fix for bug #958637 + if (!tinyMCE.isMSIE) { + var contentElement = inst.getDoc().createElement("body"); + var doc = inst.getDoc(); + + contentElement.innerHTML = content; + + // Remove weridness! + if (tinyMCE.isGecko && tinyMCE.settings['remove_lt_gt']) + content = content.replace(new RegExp('<>', 'g'), ""); + + if (tinyMCE.settings['cleanup_on_startup']) + tinyMCE.setInnerHTML(inst.getBody(), tinyMCE._cleanupHTML(inst, doc, this.settings, contentElement)); + else { + // Convert all strong/em to b/i + content = tinyMCE.regexpReplace(content, "", "", "gi"); + content = tinyMCE.regexpReplace(content, "", "", "gi"); + content = tinyMCE.regexpReplace(content, "", "", "gi"); + tinyMCE.setInnerHTML(inst.getBody(), content); + } + + tinyMCE.convertAllRelativeURLs(inst.getBody()); + } else { + if (tinyMCE.settings['cleanup_on_startup']) { + tinyMCE._setHTML(inst.getDoc(), content); + + // Produces permission denied error in MSIE 5.5 + eval('try {tinyMCE.setInnerHTML(inst.getBody(), tinyMCE._cleanupHTML(inst, inst.contentDocument, this.settings, inst.getBody()));} catch(e) {}'); + } else + tinyMCE._setHTML(inst.getDoc(), content); + } + + // Fix for bug #957681 + //inst.getDoc().designMode = inst.getDoc().designMode; + + // Setup element references + var parentElm = inst.targetDoc.getElementById(inst.editorId + '_parent'); + inst.formElement = tinyMCE.isGecko ? parentElm.previousSibling : parentElm.nextSibling; + + tinyMCE.handleVisualAid(inst.getBody(), true, tinyMCE.settings['visual'], inst); + tinyMCE.dispatchCallback(inst, 'setupcontent_callback', 'setupContent', editor_id, inst.getBody(), inst.getDoc()); + + // Re-add design mode on mozilla + if (!tinyMCE.isMSIE) + tinyMCE.addEventHandlers(inst); + + // Add blur handler + if (tinyMCE.isMSIE) { + tinyMCE.addEvent(inst.getBody(), "blur", TinyMCE_Engine.prototype._eventPatch); + tinyMCE.addEvent(inst.getBody(), "beforedeactivate", TinyMCE_Engine.prototype._eventPatch); // Bug #1439953 + + // Workaround for drag drop/copy paste base href bug + if (!tinyMCE.isOpera) { + tinyMCE.addEvent(doc.body, "mousemove", TinyMCE_Engine.prototype.onMouseMove); + tinyMCE.addEvent(doc.body, "beforepaste", TinyMCE_Engine.prototype._eventPatch); + tinyMCE.addEvent(doc.body, "drop", TinyMCE_Engine.prototype._eventPatch); + } + } + + // Trigger node change, this call locks buttons for tables and so forth + tinyMCE.selectedInstance = inst; + tinyMCE.selectedElement = inst.contentWindow.document.body; + + // Call custom DOM cleanup + tinyMCE._customCleanup(inst, "insert_to_editor_dom", inst.getBody()); + tinyMCE._customCleanup(inst, "setup_content_dom", inst.getBody()); + tinyMCE._setEventsEnabled(inst.getBody(), false); + tinyMCE.cleanupAnchors(inst.getDoc()); + + if (tinyMCE.getParam("convert_fonts_to_spans")) + tinyMCE.convertSpansToFonts(inst.getDoc()); + + inst.startContent = tinyMCE.trim(inst.getBody().innerHTML); + inst.undoRedo.add({ content : inst.startContent }); + + tinyMCE.selectedInstance = inst; + tinyMCE.triggerNodeChange(false, true); + }, + + storeAwayURLs : function(s) { + // Remove all mce_src, mce_href and replace them with new ones + // s = s.replace(new RegExp('mce_src\\s*=\\s*\"[^ >\"]*\"', 'gi'), ''); + // s = s.replace(new RegExp('mce_href\\s*=\\s*\"[^ >\"]*\"', 'gi'), ''); + + if (!s.match(/(mce_src|mce_href)/gi, s)) { + s = s.replace(new RegExp('src\\s*=\\s*\"([^ >\"]*)\"', 'gi'), 'src="$1" mce_src="$1"'); + s = s.replace(new RegExp('href\\s*=\\s*\"([^ >\"]*)\"', 'gi'), 'href="$1" mce_href="$1"'); + } + + return s; + }, + + removeTinyMCEFormElements : function(form_obj) { + // Check if form is valid + if (typeof(form_obj) == "undefined" || form_obj == null) + return; + + // If not a form, find the form + if (form_obj.nodeName != "FORM") { + if (form_obj.form) + form_obj = form_obj.form; + else + form_obj = tinyMCE.getParentElement(form_obj, "form"); + } + + // Still nothing + if (form_obj == null) + return; + + // Disable all UI form elements that TinyMCE created + for (var i=0; i"); + rng.collapse(false); + rng.select(); + + tinyMCE.execCommand("mceAddUndoLevel"); + tinyMCE.triggerNodeChange(false); + return false; + } + } + + // Backspace or delete + if (e.keyCode == 8 || e.keyCode == 46) { + tinyMCE.selectedElement = e.target; + tinyMCE.linkElement = tinyMCE.getParentElement(e.target, "a"); + tinyMCE.imgElement = tinyMCE.getParentElement(e.target, "img"); + tinyMCE.triggerNodeChange(false); + } + + return false; + break; + + case "keyup": + case "keydown": + tinyMCE.hideMenus(); + tinyMCE.hasMouseMoved = false; + + if (inst && inst.handleShortcut(e)) + return false; + + if (e.target.editorId) + tinyMCE.selectedInstance = tinyMCE.instances[e.target.editorId]; + else + return; + + if (tinyMCE.selectedInstance) + tinyMCE.selectedInstance.switchSettings(); + + var inst = tinyMCE.selectedInstance; + + // Handle backspace + if (tinyMCE.isGecko && tinyMCE.settings['force_p_newlines'] && (e.keyCode == 8 || e.keyCode == 46) && !e.shiftKey) { + // Insert P element instead of BR + if (TinyMCE_ForceParagraphs._handleBackSpace(tinyMCE.selectedInstance, e.type)) { + // Cancel event + tinyMCE.execCommand("mceAddUndoLevel"); + e.preventDefault(); + return false; + } + } + + tinyMCE.selectedElement = null; + tinyMCE.selectedNode = null; + var elm = tinyMCE.selectedInstance.getFocusElement(); + tinyMCE.linkElement = tinyMCE.getParentElement(elm, "a"); + tinyMCE.imgElement = tinyMCE.getParentElement(elm, "img"); + tinyMCE.selectedElement = elm; + + // Update visualaids on tabs + if (tinyMCE.isGecko && e.type == "keyup" && e.keyCode == 9) + tinyMCE.handleVisualAid(tinyMCE.selectedInstance.getBody(), true, tinyMCE.settings['visual'], tinyMCE.selectedInstance); + + // Fix empty elements on return/enter, check where enter occured + if (tinyMCE.isMSIE && e.type == "keydown" && e.keyCode == 13) + tinyMCE.enterKeyElement = tinyMCE.selectedInstance.getFocusElement(); + + // Fix empty elements on return/enter + if (tinyMCE.isMSIE && e.type == "keyup" && e.keyCode == 13) { + var elm = tinyMCE.enterKeyElement; + if (elm) { + var re = new RegExp('^HR|IMG|BR$','g'); // Skip these + var dre = new RegExp('^H[1-6]$','g'); // Add double on these + + if (!elm.hasChildNodes() && !re.test(elm.nodeName)) { + if (dre.test(elm.nodeName)) + elm.innerHTML = "  "; + else + elm.innerHTML = " "; + } + } + } + + // Check if it's a position key + var keys = tinyMCE.posKeyCodes; + var posKey = false; + for (var i=0; i'; + h += ''; + h += ''; + } else { + // Normal button + h += ''; + h += ''; + h += ''; + } + + return h; + }, + + addButtonMap : function(m) { + var i, a = m.replace(/\s+/, '').split(','); + + for (i=0; i 0); + + if (tinyMCE.settings['custom_undo_redo']) { + undoIndex = inst.undoRedo.undoIndex; + undoLevels = inst.undoRedo.undoLevels.length; + } + + tinyMCE.dispatchCallback(inst, 'handle_node_change_callback', 'handleNodeChange', editorId, elm, undoIndex, undoLevels, inst.visualAid, anySelection, setup_content); + } + + if (this.selectedInstance && (typeof(focus) == "undefined" || focus)) + this.selectedInstance.contentWindow.focus(); + }, + + _customCleanup : function(inst, type, content) { + var pl, po, i; + + // Call custom cleanup + var customCleanup = tinyMCE.settings['cleanup_callback']; + if (customCleanup != "" && eval("typeof(" + customCleanup + ")") != "undefined") + content = eval(customCleanup + "(type, content, inst);"); + + // Trigger plugin cleanups + pl = inst.plugins; + for (i=0; i 0) { + for (i=ar.length-1; i>=0; i--) { + s = ar[i].substring(2, ar[i].length-1); + + if (s.indexOf('lang_') == 0 && tinyMCELang[s]) + h = tinyMCE.replaceVar(h, s, tinyMCELang[s]); + else if (as && as[s]) + h = tinyMCE.replaceVar(h, s, as[s]); + else if (tinyMCE.settings[s]) + h = tinyMCE.replaceVar(h, s, tinyMCE.settings[s]); + } + } + + h = tinyMCE.replaceVar(h, "themeurl", tinyMCE.themeURL); + + return h; + }, + + replaceVar : function(h, r, v) { + return h.replace(new RegExp('{\\\$' + r + '}', 'g'), v); + }, + + openWindow : function(template, args) { + var html, width, height, x, y, resizable, scrollbars, url; + + args['mce_template_file'] = template['file']; + args['mce_width'] = template['width']; + args['mce_height'] = template['height']; + tinyMCE.windowArgs = args; + + html = template['html']; + if (!(width = parseInt(template['width']))) + width = 320; + + if (!(height = parseInt(template['height']))) + height = 200; + + // Add to height in M$ due to SP2 WHY DON'T YOU GUYS IMPLEMENT innerWidth of windows!! + if (tinyMCE.isMSIE) + height += 40; + else + height += 20; + + x = parseInt(screen.width / 2.0) - (width / 2.0); + y = parseInt(screen.height / 2.0) - (height / 2.0); + + resizable = (args && args['resizable']) ? args['resizable'] : "no"; + scrollbars = (args && args['scrollbars']) ? args['scrollbars'] : "no"; + + if (template['file'].charAt(0) != '/' && template['file'].indexOf('://') == -1) + url = tinyMCE.baseURL + "/themes/" + tinyMCE.getParam("theme") + "/" + template['file']; + else + url = template['file']; + + // Replace all args as variables in URL + for (var name in args) { + if (typeof(args[name]) == 'function') + continue; + + url = tinyMCE.replaceVar(url, name, escape(args[name])); + } + + if (html) { + html = tinyMCE.replaceVar(html, "css", this.settings['popups_css']); + html = tinyMCE.applyTemplate(html, args); + + var win = window.open("", "mcePopup" + new Date().getTime(), "top=" + y + ",left=" + x + ",scrollbars=" + scrollbars + ",dialog=yes,minimizable=" + resizable + ",modal=yes,width=" + width + ",height=" + height + ",resizable=" + resizable); + if (win == null) { + alert(tinyMCELang['lang_popup_blocked']); + return; + } + + win.document.write(html); + win.document.close(); + win.resizeTo(width, height); + win.focus(); + } else { + if ((tinyMCE.isMSIE && !tinyMCE.isOpera) && resizable != 'yes' && tinyMCE.settings["dialog_type"] == "modal") { + height += 10; + + var features = "resizable:" + resizable + + ";scroll:" + + scrollbars + ";status:yes;center:yes;help:no;dialogWidth:" + + width + "px;dialogHeight:" + height + "px;"; + + window.showModalDialog(url, window, features); + } else { + var modal = (resizable == "yes") ? "no" : "yes"; + + if (tinyMCE.isGecko && tinyMCE.isMac) + modal = "no"; + + if (template['close_previous'] != "no") + try {tinyMCE.lastWindow.close();} catch (ex) {} + + var win = window.open(url, "mcePopup" + new Date().getTime(), "top=" + y + ",left=" + x + ",scrollbars=" + scrollbars + ",dialog=" + modal + ",minimizable=" + resizable + ",modal=" + modal + ",width=" + width + ",height=" + height + ",resizable=" + resizable); + if (win == null) { + alert(tinyMCELang['lang_popup_blocked']); + return; + } + + if (template['close_previous'] != "no") + tinyMCE.lastWindow = win; + + eval('try { win.resizeTo(width, height); } catch(e) { }'); + + // Make it bigger if statusbar is forced + if (tinyMCE.isGecko) { + if (win.document.defaultView.statusbar.visible) + win.resizeBy(0, tinyMCE.isMac ? 10 : 24); + } + + win.focus(); + } + } + }, + + closeWindow : function(win) { + win.close(); + }, + + getVisualAidClass : function(class_name, state) { + var aidClass = tinyMCE.settings['visual_table_class']; + + if (typeof(state) == "undefined") + state = tinyMCE.settings['visual']; + + // Split + var classNames = new Array(); + var ar = class_name.split(' '); + for (var i=0; i 0) + className += " "; + + className += classNames[i]; + } + + return className; + }, + + handleVisualAid : function(el, deep, state, inst) { + if (!el) + return; + + var tableElement = null; + + switch (el.nodeName) { + case "TABLE": + var oldW = el.style.width; + var oldH = el.style.height; + var bo = tinyMCE.getAttrib(el, "border"); + + bo = bo == "" || bo == "0" ? true : false; + + tinyMCE.setAttrib(el, "class", tinyMCE.getVisualAidClass(tinyMCE.getAttrib(el, "class"), state && bo)); + + el.style.width = oldW; + el.style.height = oldH; + + for (var y=0; y', 'gi'), ''); + + html_content = tinyMCE.cleanupHTMLCode(html_content); + + // Try innerHTML if it fails use pasteHTML in MSIE + try { + tinyMCE.setInnerHTML(doc.body, html_content); + } catch (e) { + if (this.isMSIE) + doc.body.createTextRange().pasteHTML(html_content); + } + + // Content duplication bug fix + if (tinyMCE.isMSIE && tinyMCE.settings['fix_content_duplication']) { + // Remove P elements in P elements + var paras = doc.getElementsByTagName("P"); + for (var i=0; i<\/o:p>", "
    "); + html = tinyMCE.regexpReplace(html, " <\/o:p>", ""); + html = tinyMCE.regexpReplace(html, "", ""); + html = tinyMCE.regexpReplace(html, "

    <\/p>", ""); + html = tinyMCE.regexpReplace(html, "

    <\/p>\r\n

    <\/p>", ""); + html = tinyMCE.regexpReplace(html, "

     <\/p>", "
    "); + html = tinyMCE.regexpReplace(html, "

    \s*(

    \s*)?", "

    "); + html = tinyMCE.regexpReplace(html, "<\/p>\s*(<\/p>\s*)?", "

    "); + }*/ + + // Always set the htmlText output + tinyMCE.setInnerHTML(doc.body, html); + } + + tinyMCE.cleanupAnchors(doc); + + if (tinyMCE.getParam("convert_fonts_to_spans")) + tinyMCE.convertSpansToFonts(doc); + }, + + getEditorId : function(form_element) { + var inst = this.getInstanceById(form_element); + if (!inst) + return null; + + return inst.editorId; + }, + + getInstanceById : function(editor_id) { + var inst = this.instances[editor_id]; + if (!inst) { + for (var n in tinyMCE.instances) { + var instance = tinyMCE.instances[n]; + if (!tinyMCE.isInstance(instance)) + continue; + + if (instance.formTargetElementId == editor_id) { + inst = instance; + break; + } + } + } + + return inst; + }, + + queryInstanceCommandValue : function(editor_id, command) { + var inst = tinyMCE.getInstanceById(editor_id); + if (inst) + return inst.queryCommandValue(command); + + return false; + }, + + queryInstanceCommandState : function(editor_id, command) { + var inst = tinyMCE.getInstanceById(editor_id); + if (inst) + return inst.queryCommandState(command); + + return null; + }, + + setWindowArg : function(n, v) { + this.windowArgs[n] = v; + }, + + getWindowArg : function(n, d) { + return (typeof(this.windowArgs[n]) == "undefined") ? d : this.windowArgs[n]; + }, + + getCSSClasses : function(editor_id, doc) { + var output = new Array(); + + // Is cached, use that + if (typeof(tinyMCE.cssClasses) != "undefined") + return tinyMCE.cssClasses; + + if (typeof(editor_id) == "undefined" && typeof(doc) == "undefined") { + var instance; + + for (var instanceName in tinyMCE.instances) { + instance = tinyMCE.instances[instanceName]; + if (!tinyMCE.isInstance(instance)) + continue; + + break; + } + + doc = instance.getDoc(); + } + + if (typeof(doc) == "undefined") { + var instance = tinyMCE.getInstanceById(editor_id); + doc = instance.getDoc(); + } + + if (doc) { + var styles = tinyMCE.isMSIE ? doc.styleSheets : doc.styleSheets; + + if (styles && styles.length > 0) { + for (var x=0; x 0) + tinyMCE.cssClasses = output; + + return output; + }, + + regexpReplace : function(in_str, reg_exp, replace_str, opts) { + if (in_str == null) + return in_str; + + if (typeof(opts) == "undefined") + opts = 'g'; + + var re = new RegExp(reg_exp, opts); + return in_str.replace(re, replace_str); + }, + + trim : function(s) { + return s.replace(/^\s*|\s*$/g, ""); + }, + + cleanupEventStr : function(s) { + s = "" + s; + s = s.replace('function anonymous()\n{\n', ''); + s = s.replace('\n}', ''); + s = s.replace(/^return true;/gi, ''); // Remove event blocker + + return s; + }, + + getControlHTML : function(c) { + var i, l, n, o, v; + + l = tinyMCE.plugins; + for (n in l) { + o = l[n]; + + if (o.getControlHTML && (v = o.getControlHTML(c)) != '') + return tinyMCE.replaceVar(v, "pluginurl", o.baseURL); + } + + o = tinyMCE.themes[tinyMCE.settings['theme']]; + if (o.getControlHTML && (v = o.getControlHTML(c)) != '') + return v; + + return ''; + }, + + evalFunc : function(f, idx, a) { + var s = '(', i; + + for (i=idx; i 0) + return true; + + if (ins != null) { + for (i=0, l = ins.plugins; i 0) + return true; + } + } + + l = tinyMCE.themes; + for (on in l) { + o = l[on]; + + if (o[n] && (v = tinyMCE.evalFunc(o[n], 3, a)) == s && m > 0) + return true; + } + + return false; + }, + + xmlEncode : function(s) { + s = "" + s; + s = s.replace(/&/g, '&'); + s = s.replace(new RegExp('"', 'g'), '"'); + s = s.replace(/\'/g, '''); // ' is not working in MSIE + s = s.replace(//g, '>'); + + return s; + }, + + extend : function(p, np) { + var o = {}; + + o.parent = p; + + for (n in p) + o[n] = p[n]; + + for (n in np) + o[n] = np[n]; + + return o; + }, + + hideMenus : function() { + var e = tinyMCE.lastSelectedMenuBtn; + + if (tinyMCE.lastMenu) { + tinyMCE.lastMenu.hide(); + tinyMCE.lastMenu = null; + } + + if (e) { + tinyMCE.switchClass(e, tinyMCE.lastMenuBtnClass); + tinyMCE.lastSelectedMenuBtn = null; } } }; -TinyMCE.prototype.addMCEControl = function(replace_element, form_element_name, target_document) { - var id = "mce_editor_" + tinyMCE.idCounter++; - var inst = new TinyMCEControl(tinyMCE.settings); +// Global instances +var TinyMCE = TinyMCE_Engine; // Compatiblity with gzip compressors +var tinyMCE = new TinyMCE_Engine(); +var tinyMCELang = {}; - inst.editorId = id; - this.instances[id] = inst; +/* file:jscripts/tiny_mce/classes/TinyMCE_Control.class.js */ - inst.onAdd(replace_element, form_element_name, target_document); +function TinyMCE_Control(settings) { + var t, i, to, fu, p, x, fn, fu, pn, s = settings; + + this.undoRedoLevel = true; + this.isTinyMCE_Control = true; + + // Default settings + this.settings = s; + this.settings['theme'] = tinyMCE.getParam("theme", "default"); + this.settings['width'] = tinyMCE.getParam("width", -1); + this.settings['height'] = tinyMCE.getParam("height", -1); + this.selection = new TinyMCE_Selection(this); + this.undoRedo = new TinyMCE_UndoRedo(this); + this.cleanup = new TinyMCE_Cleanup(); + this.shortcuts = new Array(); + this.hasMouseMoved = false; + + this.cleanup.init({ + valid_elements : s.valid_elements, + extended_valid_elements : s.extended_valid_elements, + entities : s.entities, + entity_encoding : s.entity_encoding, + debug : s.cleanup_debug, + url_converter : 'TinyMCE_Cleanup.prototype._urlConverter', + indent : s.apply_source_formatting, + invalid_elements : s.invalid_elements, + verify_html : s.verify_html, + fix_content_duplication : s.fix_content_duplication + }); + + // Wrap old theme + t = this.settings['theme']; + if (!tinyMCE.hasTheme(t)) { + fn = tinyMCE.callbacks; + to = {}; + + for (i=0; i 0) { + for (i=0; i 1 && tinyMCE.currentConfig != this.settings['index']) { + tinyMCE.settings = this.settings; + tinyMCE.currentConfig = this.settings['index']; + } + }, + + getBody : function() { + return this.getDoc().body; + }, + + getDoc : function() { + return this.contentWindow.document; + }, + + getWin : function() { + return this.contentWindow; + }, + + addShortcut : function(m, k, d, cmd, ui, va) { + var n = typeof(k) == "number", ie = tinyMCE.isMSIE, c, sc, i; + var scl = this.shortcuts; + + if (!tinyMCE.getParam('custom_shortcuts')) + return false; + + m = m.toLowerCase(); + k = ie && !n ? k.toUpperCase() : k; + c = n ? null : k.charCodeAt(0); + d = d && d.indexOf('lang_') == 0 ? tinyMCE.getLang(d) : d; + + sc = { + alt : m.indexOf('alt') != -1, + ctrl : m.indexOf('ctrl') != -1, + shift : m.indexOf('shift') != -1, + charCode : c, + keyCode : n ? k : (ie ? c : null), + desc : d, + cmd : cmd, + ui : ui, + val : va + }; + + for (i=0; i 0) + rng.pasteHTML('
    ' + rng.htmlText + "
    "); + + tinyMCE.triggerNodeChange(); + return; + } + } + } + + switch (command) { + case "mceRepaint": + this.repaint(); + return true; + + case "InsertUnorderedList": + case "InsertOrderedList": + var tag = (command == "InsertUnorderedList") ? "ul" : "ol"; + + if (tinyMCE.isSafari) + this.execCommand("mceInsertContent", false, "<" + tag + ">
  •  
  • <" + tag + ">"); + else + this.getDoc().execCommand(command, user_interface, value); + + tinyMCE.triggerNodeChange(); + break; + + case "Strikethrough": + if (tinyMCE.isSafari) + this.execCommand("mceInsertContent", false, "" + this.selection.getSelectedHTML() + ""); + else + this.getDoc().execCommand(command, user_interface, value); + + tinyMCE.triggerNodeChange(); + break; + + case "mceSelectNode": + this.selection.selectNode(value); + tinyMCE.triggerNodeChange(); + tinyMCE.selectedNode = value; + break; + + case "FormatBlock": + if (value == null || value == "") { + var elm = tinyMCE.getParentElement(this.getFocusElement(), "p,div,h1,h2,h3,h4,h5,h6,pre,address"); + + if (elm) + this.execCommand("mceRemoveNode", false, elm); + } else { + if (value == '
    ' && tinyMCE.isGecko) + value = 'div'; + + this.getDoc().execCommand("FormatBlock", false, value); + } + + tinyMCE.triggerNodeChange(); + + break; + + case "mceRemoveNode": + if (!value) + value = tinyMCE.getParentElement(this.getFocusElement()); + + if (tinyMCE.isMSIE) { + value.outerHTML = value.innerHTML; + } else { + var rng = value.ownerDocument.createRange(); + rng.setStartBefore(value); + rng.setEndAfter(value); + rng.deleteContents(); + rng.insertNode(rng.createContextualFragment(value.innerHTML)); + } + + tinyMCE.triggerNodeChange(); + + break; + + case "mceSelectNodeDepth": + var parentNode = this.getFocusElement(); + for (var i=0; parentNode; i++) { + if (parentNode.nodeName.toLowerCase() == "body") + break; + + if (parentNode.nodeName.toLowerCase() == "#text") { + i--; + parentNode = parentNode.parentNode; + continue; + } + + if (i == value) { + this.selection.selectNode(parentNode, false); + tinyMCE.triggerNodeChange(); + tinyMCE.selectedNode = parentNode; + return; + } + + parentNode = parentNode.parentNode; + } + + break; + + case "SetStyleInfo": + var rng = this.getRng(); + var sel = this.getSel(); + var scmd = value['command']; + var sname = value['name']; + var svalue = value['value'] == null ? '' : value['value']; + //var svalue = value['value'] == null ? '' : value['value']; + var wrapper = value['wrapper'] ? value['wrapper'] : "span"; + var parentElm = null; + var invalidRe = new RegExp("^BODY|HTML$", "g"); + var invalidParentsRe = tinyMCE.settings['merge_styles_invalid_parents'] != '' ? new RegExp(tinyMCE.settings['merge_styles_invalid_parents'], "gi") : null; + + // Whole element selected check + if (tinyMCE.isMSIE) { + // Control range + if (rng.item) + parentElm = rng.item(0); + else { + var pelm = rng.parentElement(); + var prng = doc.selection.createRange(); + prng.moveToElementText(pelm); + + if (rng.htmlText == prng.htmlText || rng.boundingWidth == 0) { + if (invalidParentsRe == null || !invalidParentsRe.test(pelm.nodeName)) + parentElm = pelm; + } + } + } else { + var felm = this.getFocusElement(); + if (sel.isCollapsed || (new RegExp('td|tr|tbody|table', 'gi').test(felm.nodeName) && sel.anchorNode == felm.parentNode)) + parentElm = felm; + } + + // Whole element selected + if (parentElm && !invalidRe.test(parentElm.nodeName)) { + if (scmd == "setstyle") + tinyMCE.setStyleAttrib(parentElm, sname, svalue); + + if (scmd == "setattrib") + tinyMCE.setAttrib(parentElm, sname, svalue); + + if (scmd == "removeformat") { + parentElm.style.cssText = ''; + tinyMCE.setAttrib(parentElm, 'class', ''); + } + + // Remove style/attribs from all children + var ch = tinyMCE.getNodeTree(parentElm, new Array(), 1); + for (var z=0; z=0; i--) { + var elm = nodes[i]; + var isNew = tinyMCE.getAttrib(elm, "mce_new") == "true"; + + elm.removeAttribute("mce_new"); + + // Is only child a element + if (elm.childNodes && elm.childNodes.length == 1 && elm.childNodes[0].nodeType == 1) { + //tinyMCE.debug("merge1" + isNew); + this._mergeElements(scmd, elm, elm.childNodes[0], isNew); + continue; + } + + // Is I the only child + if (elm.parentNode.childNodes.length == 1 && !invalidRe.test(elm.nodeName) && !invalidRe.test(elm.parentNode.nodeName)) { + //tinyMCE.debug("merge2" + isNew + "," + elm.nodeName + "," + elm.parentNode.nodeName); + if (invalidParentsRe == null || !invalidParentsRe.test(elm.parentNode.nodeName)) + this._mergeElements(scmd, elm.parentNode, elm, false); + } + } + + // Remove empty wrappers + var nodes = doc.getElementsByTagName(wrapper); + for (var i=nodes.length-1; i>=0; i--) { + var elm = nodes[i]; + var isEmpty = true; + + // Check if it has any attribs + var tmp = doc.createElement("body"); + tmp.appendChild(elm.cloneNode(false)); + + // Is empty span, remove it + tmp.innerHTML = tmp.innerHTML.replace(new RegExp('style=""|class=""', 'gi'), ''); + //tinyMCE.debug(tmp.innerHTML); + if (new RegExp('', 'gi').test(tmp.innerHTML)) { + for (var x=0; x 0) { + value = tinyMCE.replaceVar(value, "selection", selectedText); + tinyMCE.execCommand('mceInsertContent', false, value); + } + + tinyMCE.triggerNodeChange(); + break; + + case "mceSetAttribute": + if (typeof(value) == 'object') { + var targetElms = (typeof(value['targets']) == "undefined") ? "p,img,span,div,td,h1,h2,h3,h4,h5,h6,pre,address" : value['targets']; + var targetNode = tinyMCE.getParentElement(this.getFocusElement(), targetElms); + + if (targetNode) { + targetNode.setAttribute(value['name'], value['value']); + tinyMCE.triggerNodeChange(); + } + } + break; + + case "mceSetCSSClass": + this.execCommand("SetStyleInfo", false, {command : "setattrib", name : "class", value : value}); + break; + + case "mceInsertRawHTML": + var key = 'tiny_mce_marker'; + + this.execCommand('mceBeginUndoLevel'); + + // Insert marker key + this.execCommand('mceInsertContent', false, key); + + // Store away scroll pos + var scrollX = this.getDoc().body.scrollLeft + this.getDoc().documentElement.scrollLeft; + var scrollY = this.getDoc().body.scrollTop + this.getDoc().documentElement.scrollTop; + + // Find marker and replace with RAW HTML + var html = this.getBody().innerHTML; + if ((pos = html.indexOf(key)) != -1) + tinyMCE.setInnerHTML(this.getBody(), html.substring(0, pos) + value + html.substring(pos + key.length)); + + // Restore scoll pos + this.contentWindow.scrollTo(scrollX, scrollY); + + this.execCommand('mceEndUndoLevel'); + + break; + + case "mceInsertContent": + // Force empty string + if (!value) + value = ''; + + var insertHTMLFailed = false; + this.getWin().focus(); + + if (tinyMCE.isGecko || tinyMCE.isOpera) { + try { + // Is plain text or HTML, &,   etc will be encoded wrong in FF + if (value.indexOf('<') == -1 && !value.match(/(&| |<|>)/g)) { + var r = this.getRng(); + var n = this.getDoc().createTextNode(tinyMCE.entityDecode(value)); + var s = this.getSel(); + var r2 = r.cloneRange(); + + // Insert text at cursor position + s.removeAllRanges(); + r.deleteContents(); + r.insertNode(n); + + // Move the cursor to the end of text + r2.selectNode(n); + r2.collapse(false); + s.removeAllRanges(); + s.addRange(r2); + } else { + value = tinyMCE.fixGeckoBaseHREFBug(1, this.getDoc(), value); + this.getDoc().execCommand('inserthtml', false, value); + tinyMCE.fixGeckoBaseHREFBug(2, this.getDoc(), value); + } + } catch (ex) { + insertHTMLFailed = true; + } + + if (!insertHTMLFailed) { + tinyMCE.triggerNodeChange(); + return; + } + } + + // Ugly hack in Opera due to non working "inserthtml" + if (tinyMCE.isOpera && insertHTMLFailed) { + this.getDoc().execCommand("insertimage", false, tinyMCE.uniqueURL); + var ar = tinyMCE.getElementsByAttributeValue(this.getBody(), "img", "src", tinyMCE.uniqueURL); + ar[0].outerHTML = value; + return; + } + + if (!tinyMCE.isMSIE) { + var isHTML = value.indexOf('<') != -1; + var sel = this.getSel(); + var rng = this.getRng(); + + if (isHTML) { + if (tinyMCE.isSafari) { + var tmpRng = this.getDoc().createRange(); + + tmpRng.setStart(this.getBody(), 0); + tmpRng.setEnd(this.getBody(), 0); + + value = tmpRng.createContextualFragment(value); + } else + value = rng.createContextualFragment(value); + } else { + // Setup text node + var el = document.createElement("div"); + el.innerHTML = value; + value = el.firstChild.nodeValue; + value = doc.createTextNode(value); + } + + // Insert plain text in Safari + if (tinyMCE.isSafari && !isHTML) { + this.execCommand('InsertText', false, value.nodeValue); + tinyMCE.triggerNodeChange(); + return true; + } else if (tinyMCE.isSafari && isHTML) { + rng.deleteContents(); + rng.insertNode(value); + tinyMCE.triggerNodeChange(); + return true; + } + + rng.deleteContents(); + + // If target node is text do special treatment, (Mozilla 1.3 fix) + if (rng.startContainer.nodeType == 3) { + var node = rng.startContainer.splitText(rng.startOffset); + node.parentNode.insertBefore(value, node); + } else + rng.insertNode(value); + + if (!isHTML) { + // Removes weird selection trails + sel.selectAllChildren(doc.body); + sel.removeAllRanges(); + + // Move cursor to end of content + var rng = doc.createRange(); + + rng.selectNode(value); + rng.collapse(false); + + sel.addRange(rng); + } else + rng.collapse(false); + + tinyMCE.fixGeckoBaseHREFBug(2, this.getDoc(), value); + } else { + var rng = doc.selection.createRange(); + var c = value.indexOf('"; - - default: // Unknown - return "[UNKNOWN NODETYPE " + node.nodeType + "]"; + var fColor = s[i].style.color; + if (fColor != null && fColor != "") { + tinyMCE.setAttrib(s[i], 'color', tinyMCE.convertRGBToHex(fColor)); + s[i].style.color = ''; + } } }; -TinyMCE.prototype.convertStringToXML = function(html_data) { - var output = ""; +TinyMCE_Engine.prototype.convertFontsToSpans = function(doc) { + var sizes = tinyMCE.getParam('font_size_style_values').replace(/\s+/, '').split(','); - for (var i=0; i 127) - output += '&#' + chr + ";"; - else - output += String.fromCharCode(chr); + var fsClasses = tinyMCE.getParam('font_size_classes'); + if (fsClasses != '') + fsClasses = fsClasses.replace(/\s+/, '').split(','); + else + fsClasses = null; - continue; - } + var s = doc.getElementsByTagName("span"); + for (var i=0; i 0 && fSize < 8) { + if (fsClasses != null) + tinyMCE.setAttrib(s[i], 'class', fsClasses[fSize-1]); + else + s[i].style.fontSize = sizes[fSize-1]; } - // Force check - if ((pos = attribName.indexOf(':')) != -1) { - attribForce = attribName.substring(pos+1); - attribName = attribName.substring(0, pos); - } - - // Force check - if ((pos = attribName.indexOf('<')) != -1) { - attribMustBe = attribName.substring(pos+1).split('?'); - attribName = attribName.substring(0, pos); - } - - attribs[x] = new Array(attribName, attribDefault, attribForce, attribMustBe); + s[i].removeAttribute('size'); } - validElements[i] = attribs; + if (fFace != "") { + s[i].style.fontFamily = fFace; + s[i].removeAttribute('face'); + } + + if (fColor != "") { + s[i].style.color = fColor; + s[i].removeAttribute('color'); + } } - - var invalidElements = tinyMCE.settings['invalid_elements'].split(','); - for (var i=0; i/gi, '>'); - - return html; - } - - if (on_save && tinyMCE.getParam("convert_fonts_to_spans")) - tinyMCE.convertFontsToSpans(doc); - - // Call custom cleanup code - tinyMCE._customCleanup(inst, on_save ? "get_from_editor_dom" : "insert_to_editor_dom", doc.body); - - // Move bgcolor to style - var n = doc.getElementsByTagName("font"); - for (var i=0; i=0; x--) + tinyMCE.insertAfter(cn[x], an[i]); } } - - // Set these for performance - tinyMCE.cleanup_validElements = tinyMCE.settings['cleanup_validElements']; - tinyMCE.cleanup_invalidElements = tinyMCE.settings['cleanup_invalidElements']; - tinyMCE.cleanup_verify_html = tinyMCE.settings['verify_html']; - tinyMCE.cleanup_force_br_newlines = tinyMCE.settings['force_br_newlines']; - tinyMCE.cleanup_urlconverter_callback = tinyMCE.settings['urlconverter_callback']; - tinyMCE.cleanup_verify_css_classes = tinyMCE.settings['verify_css_classes']; - tinyMCE.cleanup_visual_table_class = tinyMCE.settings['visual_table_class']; - tinyMCE.cleanup_apply_source_formatting = tinyMCE.settings['apply_source_formatting']; - tinyMCE.cleanup_inline_styles = tinyMCE.settings['inline_styles']; - tinyMCE.cleanup_visual_aid = visual; - tinyMCE.cleanup_on_save = on_save; - tinyMCE.cleanup_idCount = 0; - tinyMCE.cleanup_elementLookupTable = new Array(); - - var startTime = new Date().getTime(); - - // Cleanup madness that breaks the editor in MSIE - if (tinyMCE.isMSIE) { - // Remove null ids from HR elements, results in runtime error - var nodes = element.getElementsByTagName("hr"); - for (var i=0; i[ \n\r]*[ \n\r]*

    ', '
    ', 'gi')); - tinyMCE.setInnerHTML(element, tinyMCE.regexpReplace(element.innerHTML, '', '', 'gi')); - } - - var html = this.cleanupNode(element); - - if (tinyMCE.settings['debug']) - tinyMCE.debug("Cleanup process executed in: " + (new Date().getTime()-startTime) + " ms."); - - // Remove pesky HR paragraphs and other crap - html = tinyMCE.regexpReplace(html, '


    ', '
    '); - html = tinyMCE.regexpReplace(html, '

     


     

    ', '
    '); - html = tinyMCE.regexpReplace(html, '
    \\s*
    \\s*
     \s*
    \s*<\/td>/g, '
     '; break; - if (parentNode.nodeName.toLowerCase() == "#text") { - i--; - parentNode = parentNode.parentNode; - continue; - } + case 'title': + h += '
    ' + t + ''; + break; - if (i == value) { - this.selectNode(parentNode, false); - tinyMCE.triggerNodeChange(); - tinyMCE.selectedNode = parentNode; - return; - } + case 'disabled': + h += '
    ' + t + ''; + break; - parentNode = parentNode.parentNode; + default: + h += '
    ' + t + ''; } - break; + h += '
    '; - // Whole element selected check - if (tinyMCE.isMSIE) { - // Control range - if (rng.item) - parentElm = rng.item(0); - else { - var pelm = rng.parentElement(); - var prng = doc.selection.createRange(); - prng.moveToElementText(pelm); + e.innerHTML = h; - if (rng.htmlText == prng.htmlText || rng.boundingWidth == 0) { - if (invalidParentsRe == null || !invalidParentsRe.test(pelm.nodeName)) - parentElm = pelm; - } - } - } else { - var felm = this.getFocusElement(); - if (sel.isCollapsed || (/td|tr|tbody|table/ig.test(felm.nodeName) && sel.anchorNode == felm.parentNode)) - parentElm = felm; - } + this.needsUpdate = false; + this.updateBlocker(); + }, - // Whole element selected - if (parentElm && !invalidRe.test(parentElm.nodeName)) { - if (scmd == "setstyle") - tinyMCE.setStyleAttrib(parentElm, sname, svalue); - - if (scmd == "setattrib") - tinyMCE.setAttrib(parentElm, sname, svalue); - - if (scmd == "removeformat") { - parentElm.style.cssText = ''; - tinyMCE.setAttrib(parentElm, 'class', ''); - } - - // Remove style/attribs from all children - var ch = tinyMCE.getNodeTree(parentElm, new Array(), 1); - for (var z=0; z=0; i--) { - var elm = nodes[i]; - var isNew = tinyMCE.getAttrib(elm, "mce_new") == "true"; - - elm.removeAttribute("mce_new"); - - // Is only child a element - if (elm.childNodes && elm.childNodes.length == 1 && elm.childNodes[0].nodeType == 1) { - //tinyMCE.debug("merge1" + isNew); - this._mergeElements(scmd, elm, elm.childNodes[0], isNew); - continue; - } - - // Is I the only child - if (elm.parentNode.childNodes.length == 1 && !invalidRe.test(elm.nodeName) && !invalidRe.test(elm.parentNode.nodeName)) { - //tinyMCE.debug("merge2" + isNew + "," + elm.nodeName + "," + elm.parentNode.nodeName); - if (invalidParentsRe == null || !invalidParentsRe.test(elm.parentNode.nodeName)) - this._mergeElements(scmd, elm.parentNode, elm, false); - } - } - - // Remove empty wrappers - var nodes = doc.getElementsByTagName(wrapper); - for (var i=nodes.length-1; i>=0; i--) { - var elm = nodes[i]; - var isEmpty = true; - - // Check if it has any attribs - var tmp = doc.createElement("body"); - tmp.appendChild(elm.cloneNode(false)); - - // Is empty span, remove it - tmp.innerHTML = tmp.innerHTML.replace(new RegExp('style=""|class=""', 'gi'), ''); - //tinyMCE.debug(tmp.innerHTML); - if (new RegExp('', 'gi').test(tmp.innerHTML)) { - for (var x=0; x 0) { - value = tinyMCE.replaceVar(value, "selection", selectedText); - tinyMCE.execCommand('mceInsertContent', false, value); - } - - tinyMCE.triggerNodeChange(); - break; - - case "mceSetAttribute": - if (typeof(value) == 'object') { - var targetElms = (typeof(value['targets']) == "undefined") ? "p,img,span,div,td,h1,h2,h3,h4,h5,h6,pre,address" : value['targets']; - var targetNode = tinyMCE.getParentElement(this.getFocusElement(), targetElms); - - if (targetNode) { - targetNode.setAttribute(value['name'], value['value']); - tinyMCE.triggerNodeChange(); - } - } - break; - - case "mceSetCSSClass": - this.execCommand("SetStyleInfo", false, {command : "setattrib", name : "class", value : value}); - break; - - case "mceInsertRawHTML": - var key = 'tiny_mce_marker'; - - this.execCommand('mceBeginUndoLevel'); - - // Insert marker key - this.execCommand('mceInsertContent', false, key); - - // Store away scroll pos - var scrollX = this.getDoc().body.scrollLeft + this.getDoc().documentElement.scrollLeft; - var scrollY = this.getDoc().body.scrollTop + this.getDoc().documentElement.scrollTop; - - // Find marker and replace with RAW HTML - var html = this.getBody().innerHTML; - if ((pos = html.indexOf(key)) != -1) - tinyMCE.setInnerHTML(this.getBody(), html.substring(0, pos) + value + html.substring(pos + key.length)); - - // Restore scoll pos - this.contentWindow.scrollTo(scrollX, scrollY); - - this.execCommand('mceEndUndoLevel'); - - break; - - case "mceInsertContent": - var insertHTMLFailed = false; - this.getWin().focus(); - - if (tinyMCE.isGecko || tinyMCE.isOpera) { - try { - // Is plain text or HTML - if (value.indexOf('<') == -1) { - var r = this.getRng(); - var n = this.getDoc().createTextNode(tinyMCE.entityDecode(value)); - var s = this.getSel(); - var r2 = r.cloneRange(); - - // Insert text at cursor position - s.removeAllRanges(); - r.deleteContents(); - r.insertNode(n); - - // Move the cursor to the end of text - r2.selectNode(n); - r2.collapse(false); - s.removeAllRanges(); - s.addRange(r2); - } else { - value = tinyMCE.fixGeckoBaseHREFBug(1, this.getDoc(), value); - this.getDoc().execCommand('inserthtml', false, value); - tinyMCE.fixGeckoBaseHREFBug(2, this.getDoc(), value); - } - } catch (ex) { - insertHTMLFailed = true; - } - - if (!insertHTMLFailed) { - tinyMCE.triggerNodeChange(); - return; - } - } - - // Ugly hack in Opera due to non working "inserthtml" - if (tinyMCE.isOpera && insertHTMLFailed) { - this.getDoc().execCommand("insertimage", false, tinyMCE.uniqueURL); - var ar = tinyMCE.getElementsByAttributeValue(this.getBody(), "img", "src", tinyMCE.uniqueURL); - ar[0].outerHTML = value; - return; - } - - if (!tinyMCE.isMSIE) { - var isHTML = value.indexOf('<') != -1; - var sel = this.getSel(); - var rng = this.getRng(); - - if (isHTML) { - if (tinyMCE.isSafari) { - var tmpRng = this.getDoc().createRange(); - - tmpRng.setStart(this.getBody(), 0); - tmpRng.setEnd(this.getBody(), 0); - - value = tmpRng.createContextualFragment(value); - } else - value = rng.createContextualFragment(value); - } else { - // Setup text node - var el = document.createElement("div"); - el.innerHTML = value; - value = el.firstChild.nodeValue; - value = doc.createTextNode(value); - } - - // Insert plain text in Safari - if (tinyMCE.isSafari && !isHTML) { - this.execCommand('InsertText', false, value.nodeValue); - tinyMCE.triggerNodeChange(); - return true; - } else if (tinyMCE.isSafari && isHTML) { - rng.deleteContents(); - rng.insertNode(value); - tinyMCE.triggerNodeChange(); - return true; - } - - rng.deleteContents(); - - // If target node is text do special treatment, (Mozilla 1.3 fix) - if (rng.startContainer.nodeType == 3) { - var node = rng.startContainer.splitText(rng.startOffset); - node.parentNode.insertBefore(value, node); - } else - rng.insertNode(value); - - if (!isHTML) { - // Removes weird selection trails - sel.selectAllChildren(doc.body); - sel.removeAllRanges(); - - // Move cursor to end of content - var rng = doc.createRange(); - - rng.selectNode(value); - rng.collapse(false); - - sel.addRange(rng); - } else - rng.collapse(false); - } else { - var rng = doc.selection.createRange(); - var c = value.indexOf('