The Horde_Editor package provides an API to generate the code necessary for embedding javascript RTE editors in a web page. WWW: http://pear.horde.org