本文整理汇总了Java中com.vladsch.flexmark.ext.autolink.AutolinkExtension类的典型用法代码示例。如果您正苦于以下问题:Java AutolinkExtension类的具体用法?Java AutolinkExtension怎么用?Java AutolinkExtension使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AutolinkExtension类属于com.vladsch.flexmark.ext.autolink包,在下文中一共展示了AutolinkExtension类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: MarkdownSupport
import com.vladsch.flexmark.ext.autolink.AutolinkExtension; //导入依赖的package包/类
public MarkdownSupport() {
options = new MutableDataSet().set(TablesExtension.CLASS_NAME, "GFMtables")
.set(EmojiExtension.USE_IMAGE_URLS, true)
.set(EmojiExtension.ATTR_IMAGE_SIZE, "25")
;
extensions = Arrays.asList(TablesExtension.create(),
AbbreviationExtension.create(),
AsideExtension.create(),
EmojiExtension.create(),
FootnoteExtension.create(),
StrikethroughExtension.create(),
TaskListExtension.create(),
AutolinkExtension.create()
// SimTocExtension.create()
);
}
开发者ID:vsite-hr,项目名称:mentor,代码行数:19,代码来源:MarkdownSupport.java
示例2: EditorExtAutoLinkItem
import com.vladsch.flexmark.ext.autolink.AutolinkExtension; //导入依赖的package包/类
public EditorExtAutoLinkItem(Dictionary dictionary, MarkdownParser markdownParser, TabFactory tabFactory, boolean defaultValue) {
super(dictionary.TOOLBAR_EDITOR_EXTENSIONS_AUTO_LINK_ITEM);
autoLinkExtension = AutolinkExtension.create();
setSelected(defaultValue);
if(defaultValue)
markdownParser.addExtension(autoLinkExtension);
setToolTip(new Tooltip(dictionary.TOOLBAR_EDITOR_EXTENSIONS_AUTO_LINK_TOOLTIP));
setOnAction(event -> getClickAction(markdownParser, tabFactory));
}
开发者ID:jdesive,项目名称:textmd,代码行数:10,代码来源:EditorExtAutoLinkItem.java
示例3: render
import com.vladsch.flexmark.ext.autolink.AutolinkExtension; //导入依赖的package包/类
@Override
public String render(String markdown, @Nullable String baseUrl, boolean postProcess) {
Preconditions.checkArgument(baseUrl == null || baseUrl.startsWith("/"));
List<Extension> extensions = new ArrayList<>();
extensions.add(AnchorLinkExtension.create());
extensions.add(TablesExtension.create());
extensions.add(TaskListExtension.create());
extensions.add(DefinitionExtension.create());
extensions.add(TocExtension.create());
extensions.add(AutolinkExtension.create());
extensions.add(new UrlResolveExtension());
extensions.addAll(contributedExtensions);
MutableDataHolder options = new MutableDataSet()
.set(HtmlRenderer.GENERATE_HEADER_ID, true)
.set(AnchorLinkExtension.ANCHORLINKS_SET_NAME, true)
.set(AnchorLinkExtension.ANCHORLINKS_ANCHOR_CLASS, "header-anchor")
.set(AnchorLinkExtension.ANCHORLINKS_TEXT_SUFFIX, "<i class='fa fa-link'></i>")
.set(Parser.SPACE_IN_LINK_URLS, true)
.setFrom(ParserEmulationProfile.GITHUB_DOC)
.set(TablesExtension.COLUMN_SPANS, false)
.set(TablesExtension.APPEND_MISSING_COLUMNS, true)
.set(TablesExtension.DISCARD_EXTRA_COLUMNS, true)
.set(TablesExtension.HEADER_SEPARATOR_COLUMN_MATCH, true)
.set(UrlResolveExtension.BASE_URL, baseUrl)
.set(Parser.EXTENSIONS, extensions);
Parser parser = Parser.builder(options).build();
HtmlRenderer htmlRenderer = HtmlRenderer.builder(options).build();
Node document = parser.parse(markdown);
String html = htmlRenderer.render(document);
if (postProcess)
html = postProcess(html);
return html;
}
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:41,代码来源:DefaultMarkdownManager.java
注:本文中的com.vladsch.flexmark.ext.autolink.AutolinkExtension类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论