MDFX has moved to JPro Platform!
🚨 IMPORTANT NOTICE: This repository has been relocated. All the content, issues, and activity have been transferred to our new repository.
We've decided to consolidate our repositories into a single one to better manage and streamline our projects. This will allow us to better prioritize and address issues and pull requests, as well as to release new versions faster.
MDFX is a simple markdown-renderer for JavaFX. It's based on flexmark-java. It is used to render the documentation for jpro at jpro.one.
For Gradle, add the following to your build.gradle
:
Add the following repository:
repositories {
maven {
url "https://sandec.jfrog.io/artifactory/repo"
}
}
Add The following dependency:
dependencies {
compile "com.sandec:mdfx:0.2.12"
}
Usage:
import com.sandec.mdfx.MarkdownView;
MarkdownView mdfx = new MarkdownView("your-markdown");
Simple Application: Source Code
Feature Overview: Reference-Markdown-File
You can personalize the looking of your markdown via css.
Minimal default-file
To use your own css, you have to overwrite the getDefaultStylehsheets
.
protected List<String> getDefaultStylehsheets() {
return List.of("/your-css.css");
}
Alternatively, you can also return an empty list, and add your css via the getStylesheets
of the Scene.
- It's no longer necessary to add the default-css. You can add your own css via
getDefaultStylehsheets
.
- Fixed wrong layouting of the Image.
- Added a new default implementation for Images. The images no longer expand outside of the viewport.
- The images are now also loaded asynchronously.
- Fixed an issue, which caused that sometimes a whitespace was missing in links.
- Changed JavaFX Dependencie to be compile only.
- Updated Flexmark to 0.64
- Fixed Newline character in links.
- Fixed an bug with nested Sorted/Unsorted lists.
- Fixed an layouting issue with lists. In some situations "..." was shown for left label counting the entries.
- The blockquote is now configured with the css variables
-mdfx-bq-color-border
and-mdfx-bq-color-border
. Users might want to add these variables to their css. - Ordered lists start now with 1 instead of 0.
- -- skip this version --
- Added support for BlockQuotes
- Added support for TaskLists
- Renamed MDFXNode to MarkdownView
- Moved internal classes to an impl package
- Added support for ordered lists.
- We now us the Java11 Module System. At least Java11 is now required.
- Added support for strikethrough
- It's now possible to change the link color in the css with
-mdfx-link-color
- Updated flexmark to 0.62.2
- The property mdString of MDFXNode is now public
Run the sample:
./gradlew example:run
./gradlew example:jproRun
Deploy new release:
./gradlew :publish