@Override public int getType() { return wrapped.getType(); }
@Override public int getType() { return wrapped.getType(); }
@Override public void putAttributes(AttributeGenerator generator) { if (content != null) { String type = content.getType() == TextConstruct.Type.TEXT ? "plain" : "html"; generator.put("type", type); if (content != null) { if (content instanceof HtmlTextConstruct) { HtmlTextConstruct html = (HtmlTextConstruct) content; generator.setContent(html.getHtml()); } else { generator.setContent(content.getPlainText()); } } } }
@Override public void putAttributes(AttributeGenerator generator) { if (content != null) { String type = content.getType() == TextConstruct.Type.TEXT ? "plain" : "html"; generator.put("type", type); if (content != null) { if (content instanceof HtmlTextConstruct) { HtmlTextConstruct html = (HtmlTextConstruct) content; generator.setContent(html.getHtml()); } else { generator.setContent(content.getPlainText()); } } } }