One method is to use a regex to enclose anything between <?php and ?> in textarea tags. That way, the php is visible in the editor as the textarea contents, but is not parsed by the editor.
Also bear in mind the security issues of doing this - a malicious editor could include all sorts of nasties like spambots, etc if you let them put any php they like in a page.
One method is to use a regex
One method is to use a regex to enclose anything between <?php and ?> in textarea tags. That way, the php is visible in the editor as the textarea contents, but is not parsed by the editor.
<textarea class='phpcode'><?php ...code.. ?></textarea>
Also bear in mind the security issues of doing this - a malicious editor could include all sorts of nasties like spambots, etc if you let them put any php they like in a page.