I created a rich:editor custom plugin. It opens a new dialog and you can add code inside. Once you code, I add a html tag and I wanted the final html to be returned as below.
<pre name="code" class="java"> this is a java code </pre>
<pre class="java"> this is a java code </pre>
Does it works using just tinyMCE widget instead of RichFaces component? If works the same try to check tinyMCE knowledgebase. We do not changed the original tinyMCE processing behaviour. We made special conversions only if SeamText is used to make it valid for seamText.