3 Replies Latest reply on Jan 14, 2011 4:26 AM by Bin Liu

    rich:editor + seam text not working with formatted html

    Sean Li Newbie

      I use rich:editor set useSeamText to "true" to get input and store it to DB, and displaying it using s:formattedText.

       

      The problem happens if I copy something from an html page and paste it to rich:editor.

       

      We can easily replicate this using rich:editor demo here: http://livedemo.exadel.com/richfaces-demo/richfaces/editor.jsf , with the following steps

       

      1) tick "Toggle Preview" and "use seam text" checkboxes

      2) go to http://download.oracle.com/docs/cd/E12840_01/wls/docs103/nodemgr/starting_nodemgr.html

      3) copy "Using Node Manager to Control Servers" from the weblogic document

       

      you will see the editor preview bit is not working.

       

      This can actually be fixed by adding <s:validateFormattedText /> to rich:editor. BUT, it doesn't solve the problem that if the pasted text is seam text format compliant while not valid html.

       

      If you copy part of a table to rich:editor, it's valid seam text and saved to DB. in DB, you can see things like tr td in the field, but no table tag. once you display it using s:formattedText, the whole page is messed up.

       

      I did some google research but couldn't find one talking about this.