com.atlassian.confluence.xhtml.api.XhtmlContent.convertWikiToView()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(120)

本文整理了Java中com.atlassian.confluence.xhtml.api.XhtmlContent.convertWikiToView()方法的一些代码示例,展示了XhtmlContent.convertWikiToView()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XhtmlContent.convertWikiToView()方法的具体详情如下:
包路径:com.atlassian.confluence.xhtml.api.XhtmlContent
类名称:XhtmlContent
方法名:convertWikiToView

XhtmlContent.convertWikiToView介绍

暂无

代码示例

代码示例来源:origin: org.randombits.support/support-confluence

  1. private String renderWiki( Renderable renderable ) throws RenderException {
  2. List<RuntimeException> exceptions = new ArrayList<RuntimeException>();
  3. try {
  4. String value = xhtmlContent.convertWikiToView( renderable.getText(), renderable.getConversionContext(), exceptions );
  5. if ( !exceptions.isEmpty() ) {
  6. throw new RenderException( "Exceptions occurred while rendering wiki markup.", exceptions );
  7. }
  8. return XhtmlUtils.stripParagraphWrapper(value);
  9. } catch ( XMLStreamException e ) {
  10. throw new RenderException( e.getMessage(), e );
  11. } catch ( XhtmlException e ) {
  12. throw new RenderException( e.getMessage(), e );
  13. }
  14. }

代码示例来源:origin: com.atlassian.confluence.extra.chart/chart-plugin

  1. public String execute(Map parameters, String body, RenderContext renderContext) throws MacroException
  2. {
  3. try
  4. {
  5. ConversionContext conversionContext = new DefaultConversionContext(renderContext);
  6. List<RuntimeException> errorList = new ArrayList<>();
  7. body = xhtmlContent.convertWikiToView(body, conversionContext, errorList);
  8. if(!errorList.isEmpty())
  9. {
  10. for(RuntimeException runtimeException : errorList)
  11. {
  12. log.error("RuntimeException while parsing wiki markup ", runtimeException);
  13. }
  14. throw new MacroException(getI18NBean().getText("confluence.extra.chart.chart.error.parseWikiToStorage"));
  15. }
  16. return execute(parameters, body, conversionContext);
  17. }
  18. catch (MacroExecutionException | XhtmlException | XMLStreamException e)
  19. {
  20. throw new MacroException(e);
  21. }
  22. }

代码示例来源:origin: com.atlassian.labs/confluence-mentions-plugin

  1. velocityContext.put("contentHtml", xhtmlContent.convertWikiToView(contentEntityObject.getDisplayTitle(),
  2. conversionContext, new ArrayList<RuntimeException>()));

相关文章