diff options
author | svncommit <devs@roundcube.net> | 2006-09-14 03:49:28 +0000 |
---|---|---|
committer | svncommit <devs@roundcube.net> | 2006-09-14 03:49:28 +0000 |
commit | a0109c4933e0bfb5ed9dbcf94f932991ca689542 (patch) | |
tree | 955246969bf9da5d5335d1d7c483025fdbd50407 /index.php | |
parent | bb5ddfa0ade5fbd2ed9be16e51d4ce695252eece (diff) |
Initial TinyMCE editor support (still need to work on spellcheck and skins)
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -81,6 +81,7 @@ require_once('include/rcube_imap.inc'); require_once('include/bugs.inc'); require_once('include/main.inc'); require_once('include/cache.inc'); +require_once('lib/html2text.inc'); require_once('PEAR.php'); @@ -145,6 +146,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; + } + // try to log in if ($_action=='login' && $_task=='mail') @@ -241,7 +257,6 @@ if ($_action=='keep-alive') exit; } - // include task specific files if ($_task=='mail') { |