rich:editor ruins html?

Posted by Ben on Stack Overflow See other posts from Stack Overflow or by Ben
Published on 2010-04-25T14:40:51Z Indexed on 2010/04/25 14:43 UTC
Read the original article Hit count: 275

Filed under:
|
|

Hi,

Strange behaviour. I use rich:editor with these attributes: (Irrelevant data removed)

    HtmlEditor editor = new HtmlEditor();
    editor.setValueExpression("value", ve);
    editor.setTheme("advanced");
    editor.setValueExpression("viewMode", viewModeValueExpression);
            panel.getChildren().add(editor);

Now my problem is that whenever I load a ready-made html text such as this (In source mode):

<html lang="en" xml:lang="en">
<head>
<title>Done</title>
</head>
<body style="direction: ltr; font-size: medium; color: #0000FF;">
    <p>When the menu loads, navigate to and open Image Editor.</p>
</body>
</html>

Change to VisualMode and then back to SourceMode, I see that the editor removed all of my html data and now the source mode is this:

<p>When the menu loads, navigate to and open Chul Muzal.</p>

Anyone knows why this happens?

Thanks!!

© Stack Overflow or respective owner

Related posts about jsf

Related posts about richfaces