예제 #1
0
 @Override
 protected void actionPerformed(final ActionEvent e, final NodeModel node) {
   final String nodeText = node.getText();
   if (HtmlUtils.isHtmlNode(nodeText)) {
     ((MTextController) TextController.getController())
         .setNodeText(node, HtmlUtils.htmlToPlain(nodeText));
   }
 }
예제 #2
0
 private String toHtml(String htmlOrPlainText) {
   if (HtmlUtils.isHtmlNode(htmlOrPlainText))
     return htmlOrPlainText.replaceAll("</?(html|body)>", "");
   else return HtmlUtils.toHTMLEscapedText(htmlOrPlainText);
 }