com.vladsch.flexmark.ext.emoji.EmojiImageType Java Examples
The following examples show how to use
com.vladsch.flexmark.ext.emoji.EmojiImageType.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Utils.java From para with Apache License 2.0 | 5 votes |
private static MutableDataHolder getMarkdownOptions() { return new MutableDataSet() .set(HtmlRenderer.ESCAPE_HTML, true) .set(EmojiExtension.USE_IMAGE_TYPE, EmojiImageType.UNICODE_FALLBACK_TO_IMAGE) // for full GFM table compatibility add the following table extension options: .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(Parser.EXTENSIONS, Arrays.asList(TablesExtension.create(), EmojiExtension.create(), StrikethroughExtension.create(), TaskListExtension.create())); }
Example #2
Source File: PMarkdownOptions.java From jphp with Apache License 2.0 | 5 votes |
@Signature public PMarkdownOptions addEmojiExtension(@Arg(type = HintType.ARRAY) @Optional("null") Memory options) { parserExtensions.add(EmojiExtension.create()); Memory imageType = options.valueOfIndex("imageType"); if (!imageType.isNull()) { this.options.set(EmojiExtension.USE_IMAGE_TYPE, EmojiImageType.valueOf(imageType.toString())); } Memory shortcutType = options.valueOfIndex("shortcutType"); if (!shortcutType.isNull()) { this.options.set(EmojiExtension.USE_SHORTCUT_TYPE, EmojiShortcutType.valueOf(shortcutType.toString())); } Memory imagePath = options.valueOfIndex("imagePath"); if (!shortcutType.isNull()) { this.options.set(EmojiExtension.ROOT_IMAGE_PATH, imagePath.toString()); } Memory imageClass = options.valueOfIndex("imageClass"); if (!shortcutType.isNull()) { this.options.set(EmojiExtension.ATTR_IMAGE_CLASS, imageClass.toString()); } Memory imageSize = options.valueOfIndex("imageSize"); if (!shortcutType.isNull()) { this.options.set(EmojiExtension.ATTR_IMAGE_SIZE, imageSize.toString()); } return this; }