From a0109c4933e0bfb5ed9dbcf94f932991ca689542 Mon Sep 17 00:00:00 2001 From: svncommit <devs@roundcube.net> Date: Wed, 13 Sep 2006 23:49:28 -0400 Subject: [PATCH] Initial TinyMCE editor support (still need to work on spellcheck and skins) --- index.php | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 deletions(-) diff --git a/index.php b/index.php index 85a9eef..4e9dee1 100644 --- a/index.php +++ b/index.php @@ -81,6 +81,7 @@ require_once('include/bugs.inc'); require_once('include/main.inc'); require_once('include/cache.inc'); +require_once('lib/html2text.inc'); require_once('PEAR.php'); @@ -143,6 +144,21 @@ if ($_action=='error' && !empty($_GET['_code'])) { raise_error(array('code' => hexdec($_GET['_code'])), FALSE, TRUE); + } + +// handle HTML->text conversion +if ($_action=='html2text') + { + $htmlText = $HTTP_RAW_POST_DATA; + $converter = new html2text($htmlText); + + // TODO possibly replace with rcube_remote_response() + send_nocacheing_headers(); + header('Content-Type: text/plain'); + $plaintext = $converter->get_text(); + print $plaintext; + + exit; } @@ -240,7 +256,6 @@ rcube_remote_response(''); exit; } - // include task specific files if ($_task=='mail') -- Gitblit v1.9.1