gitbucket / Markedj
Licence: apache-2.0
JVM port of graceful markdown processor marked.js
Stars: ✭ 77
Programming Languages
java
68154 projects - #9 most used programming language
Labels
Projects that are alternatives of or similar to Markedj
Laravel Smartmd
🎯 A simple markdown editor compatible most markdown parse,You can choose any parse methods on server or client,like Mathematical formula、flowchart、upload image...
Stars: ✭ 76 (-1.3%)
Mutual labels: markdown
Siyuan
📕 SiYuan is a local-first personal knowledge management system, support fine-grained block-level reference and Markdown instant-render editing.
Stars: ✭ 1,196 (+1453.25%)
Mutual labels: markdown
Markdowngenerator
Swift library to programmatically generate Markdown output and files
Stars: ✭ 76 (-1.3%)
Mutual labels: markdown
Markdown widget
📖Rendering markdown by flutter!Welcome for pr and issue.
Stars: ✭ 74 (-3.9%)
Mutual labels: markdown
Jsdoc To Markdown
Generate markdown documentation from jsdoc-annotated javascript
Stars: ✭ 1,199 (+1457.14%)
Mutual labels: markdown
Taskboard
A Kanban-inspired app for keeping track of things that need to get done. (Don't forget to read the Wiki page!)
Stars: ✭ 1,191 (+1446.75%)
Mutual labels: markdown
Stylelint
A mighty, modern linter that helps you avoid errors and enforce conventions in your styles.
Stars: ✭ 9,350 (+12042.86%)
Mutual labels: markdown
Flybook
✈️ FlyBook is a simple utility to generate static website such as gh-pages, manual of you projects
Stars: ✭ 76 (-1.3%)
Mutual labels: markdown
Foliant
Comprehensive markdown-based documentation toolkit
Stars: ✭ 74 (-3.9%)
Mutual labels: markdown
Markdeep Thesis
Write your (under)graduate thesis with Markdeep and typeset it right in your browser.
Stars: ✭ 74 (-3.9%)
Mutual labels: markdown
Glim
Static site generator which is semi-compatible with Jekyll
Stars: ✭ 76 (-1.3%)
Mutual labels: markdown
Markdownmonster
An extensible Markdown Editor, Viewer and Weblog Publisher for Windows
Stars: ✭ 1,203 (+1462.34%)
Mutual labels: markdown
Parvula
An extremely simple & flexible CMS generated from flat files with a complete RESTful API —
Stars: ✭ 76 (-1.3%)
Mutual labels: markdown
markedj
JVM port of graceful markdown processor marked.js.
Usage
First, add following dependency into your pom.xml
:
<dependencies>
<dependency>
<groupId>io.github.gitbucket</groupId>
<artifactId>markedj</artifactId>
<version>1.0.16</version>
</dependency>
</dependencies>
You can easily use markedj via io.github.gitbucket.markedj.Marked
:
import io.github.gitbucket.markedj.*;
String markdown = ...
// With default options
String html1 = Marked.marked(markdown);
// Specify options
Options options = new Options();
options.setSanitize(true);
String html2 = Marked.marked(markdown, options);
Options
io.github.gitbucket.markedj.Options
has following properties to control Markdown conversion:
Name | Default | Description |
---|---|---|
gfm | true | Enable GitHub Flavored Markdown. |
tables | true | Enable GFM tables. This option requires the gfm option to be true. |
breaks | false | Enable GFM line breaks. This option requires the gfm option to be true. |
sanitize | false | Ignore any HTML that has been input. |
langPrefix | "lang-" | Prefix of class attribute of code block |
headerPrefix | "" | Prefix of id attribute of header |
whitelist | See Options.java | Whitelist of HTML tags. |
By default, markedj uses Jsoup's whitelist mechanism for HTML rendering. It restricts renderable tags, attributes and even protocols of attribute values. For example, the image url must be http://
or https://
by default. You can remove this restriction by customizing the whitelist as follows:
String html1 = Marked.marked("![alt text](/img/some-image.png \"title\")");
// => <p><img alt=\"alt text\" title=\"title\"></p>
Options options = new Options();
options.getWhitelist().removeProtocols("img", "src", "http", "https");
String html2 = Marked.marked("![alt text](/img/some-image.png \"title\")", options);
// => <p><img src="/img/some-image.png" alt="alt text" title="title"></p>
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].