diff --git a/lib/javascript.php b/lib/javascript.php index 74a51cb7d05..07dfe267907 100644 --- a/lib/javascript.php +++ b/lib/javascript.php @@ -27,7 +27,7 @@ function openpopup(url,name,options,fullscreen) { } function copyrichtext(textname) { - textname.value = document.richedit.docHtml; +/// Legacy stub for old editor - to be removed soon return true; } diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 089587afcea..24c7d5dfc37 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -1574,21 +1574,29 @@ function ini_get_bool($ini_get_arg) { } function can_use_richtext_editor() { +/// Compatibility stub to provide backward compatibility + return can_use_html_editor(); +} + +function can_use_html_editor() { /// Is the HTML editor enabled? This depends on site and user /// settings, as well as the current browser being used. +/// Returns false is editor is not being used, otherwise +/// returns "MSIE" or "Gecko" global $USER, $CFG; if (!empty($USER->htmleditor) and !empty($CFG->htmleditor)) { if (check_browser_version("MSIE", 5.5)) { - return true; - } else if (check_browser_version("Gecko", 20030516) and !empty($CFG->useneweditor) ) { - return true; + return "MSIE"; + } else if (check_browser_version("Gecko", 20030516)) { + return "Gecko"; } } return false; } + function check_gd_version() { /// Hack to find out the GD version by parsing phpinfo output $gdversion = 0; diff --git a/lib/rte/README_MOODLE b/lib/rte/README_MOODLE deleted file mode 100644 index b8d4a9035b4..00000000000 --- a/lib/rte/README_MOODLE +++ /dev/null @@ -1,26 +0,0 @@ -10/10/2002: - -This version of the Richtext editor started out as 0.3 beta 1, -and I've hacked richedit.html to make the toolbars more compact. - -I've also changed the smilies to refer to Moodle smilies, and -added/removed some. - - - -12/10/2003: - -I've just added and further hacked some changes from Janne -Mikkonen (http://moodle.org/mod/forum/discuss.php?d=2126) -to allow a popup so that images can be selected from the -course files area. - -This includes these PHP files in this folder: - - -- courseimages.php - -- dlg_ins_image.php - -- richedit.php - -- rte.php - - -Martin Dougiamas diff --git a/lib/rte/_header_css.txt b/lib/rte/_header_css.txt deleted file mode 100644 index 02e22639d81..00000000000 --- a/lib/rte/_header_css.txt +++ /dev/null @@ -1,46 +0,0 @@ -/******************************************************************************* -** -** $Header$ -** -** HTML Text Editing Component for hosting in Web Pages -** Copyright (C) 2001 Ramesys (Contracting Services) Limited -** -** This library is free software; you can redistribute it and/or -** modify it under the terms of the GNU Lesser General Public -** License as published by the Free Software Foundation; either -** version 2.1 of the License, or (at your option) any later version. -** -** This library is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** Lesser General Public License for more details. -** -** You should have received a copy of the GNU LesserGeneral Public License -** along with this program; if not a copy can be obtained from -** -** http://www.gnu.org/copyleft/lesser.html -** -** or by writing to: -** -** Free Software Foundation, Inc. -** 59 Temple Place - Suite 330, -** Boston, -** MA 02111-1307, -** USA. -** -** Original Developer: -** -** Austin David France -** Ramesys (Contracting Services) Limited -** Mentor House -** Ainsworth Street -** Blackburn -** Lancashire -** BB1 6AY -** United Kingdom -** email: Austin.France@Ramesys.com -** -** Home Page: http://richtext.sourceforge.net/ -** Support: http://richtext.sourceforge.net/ -** -*******************************************************************************/ diff --git a/lib/rte/_header_html.txt b/lib/rte/_header_html.txt deleted file mode 100644 index 87dbcc2abf4..00000000000 --- a/lib/rte/_header_html.txt +++ /dev/null @@ -1,48 +0,0 @@ - diff --git a/lib/rte/_header_js.txt b/lib/rte/_header_js.txt deleted file mode 100644 index ff94710e677..00000000000 --- a/lib/rte/_header_js.txt +++ /dev/null @@ -1,46 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// -// $Header$ -// -// HTML Text Editing Component for hosting in Web Pages -// Copyright (C) 2001 Ramesys (Contracting Services) Limited -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU LesserGeneral Public License -// along with this program; if not a copy can be obtained from -// -// http://www.gnu.org/copyleft/lesser.html -// -// or by writing to: -// -// Free Software Foundation, Inc. -// 59 Temple Place - Suite 330, -// Boston, -// MA 02111-1307, -// USA. -// -// Original Developer: -// -// Austin David France -// Ramesys (Contracting Services) Limited -// Mentor House -// Ainsworth Street -// Blackburn -// Lancashire -// BB1 6AY -// United Kingdom -// email: Austin.France@Ramesys.com -// -// Home Page: http://richtext.sourceforge.net/ -// Support: http://richtext.sourceforge.net/ -// -//////////////////////////////////////////////////////////////////////////////// diff --git a/lib/rte/about_logo.swf b/lib/rte/about_logo.swf deleted file mode 100644 index d849cea8aee..00000000000 Binary files a/lib/rte/about_logo.swf and /dev/null differ diff --git a/lib/rte/about_logo.swi b/lib/rte/about_logo.swi deleted file mode 100644 index a741b7c65e5..00000000000 Binary files a/lib/rte/about_logo.swi and /dev/null differ diff --git a/lib/rte/changelog b/lib/rte/changelog deleted file mode 100644 index 2fec2ef238a..00000000000 --- a/lib/rte/changelog +++ /dev/null @@ -1,90 +0,0 @@ -Version DEV - -- Added multi-lingual support. The editor detects the userLanguage - of the browser and uses this select the relevent language from the - new rte_lang.js module which is then applied to the main editor - window. This is a work in progress, dialog need translation also. - -- Re-implemented Undo/Redo (history) option this time using the - document.execCommand('Undo'/'Redo') options which although - documented as not implemented do work in IE 6.0. - -Version 0.2.3 - -- Improved option handling to maintain an array of options that are - not "features" and added a getOption() private method to obtain - the current option value. - -- The saveHistory() function is now a no-op if the history option is - not enabled. Previously it was still doing all the buffer saving - behind the scenes. This should improve the performance of the - editor. - -- Corrected version and company information in the about dialog. - -- Remove showHistory() status (debug) messages - -- After set editor options, apply them. In most circumstances the - options property is set after the editor has initialised and so - the options need to be processed as the options are set not - when the editor is initialised. - -- Added numerous options: - styleBar=yes|no default yes - style=yes|no default yes - font=yes|no default yes - fontSize=yes|no default yes - colour=yes|no default yes - dragdrop=yes|no default no - -- Added code to disable drag and drop in the editor. Previously - it was possible to drag a toolbar button and drop a copy of it - into the editor window. Now, nothing can be dragged from the - toolbar and nothing can be dropped into the editor window. - This does not disable any functionality because the editor - window did not act as a drop target for objects from outside - of the IE control. It was however possible to drag elements - from one page and drop them into the editor, this is now not - possible unless dragdrop=yes is specified. However, the - dragdrop handling is weak (non-existent) and so is disabled - by default. - -- Some minor cosmetic changes to the toolbar. - -- Added debug window functionality to aid development and support - of the editor. Over time, diagnostic debugs will be added to - the editor code. - -- Default edit area to not editable (effectivly disabled) until - inisialisation of the editor is complete. - -- Added Full Justify Option - -- Re-worked font color/back color resetting (color none) so that - a) it worked and b) it only removes the fore/background color - and preserves the other formatting that bit of text may have. - -- Disable post button when in view source mode. The post button - is greyed out whilst disabled. - -Version 0.2.2 -============= -- Disabled buggy history and view source options by default in preparation - for official 0.2 release (to be officially released in a later release). - -- Added editor.options property to allow optional functionality to be - enabled/disabled. - -Version 0.2.1 -============= -- Corrected a bug in test_embedded.asp (JavaScript error). - -Version 0.2.0 -============= -- Added support for Custom Fields -- Beta versions of undo-history and view source options added - -Version 0.1 -=========== -- Original release of The Richtext Editor - diff --git a/lib/rte/colorchooser.html b/lib/rte/colorchooser.html deleted file mode 100644 index 670d878ea6f..00000000000 --- a/lib/rte/colorchooser.html +++ /dev/null @@ -1,178 +0,0 @@ - - -
- - - - - - - -| Standard Colors | -|||||||||||||||||
| Web Safe | |||||||||||||||||
| None | |||||||||||||||||