Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dansoftowner/markdowneditorcontrolfx
Markdown editor control for JavaFX
https://github.com/dansoftowner/markdowneditorcontrolfx
desktop gui java javafx markdown
Last synced: 14 days ago
JSON representation
Markdown editor control for JavaFX
- Host: GitHub
- URL: https://github.com/dansoftowner/markdowneditorcontrolfx
- Owner: Dansoftowner
- License: apache-2.0
- Created: 2021-04-07T19:41:14.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-10-14T08:19:36.000Z (about 3 years ago)
- Last Synced: 2024-10-25T08:13:01.276Z (22 days ago)
- Topics: desktop, gui, java, javafx, markdown
- Language: Java
- Homepage:
- Size: 1.46 MB
- Stars: 27
- Watchers: 3
- Forks: 1
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MarkdownEditorControlFX
![GitHub release (latest by date)](https://img.shields.io/github/v/release/Dansoftowner/MarkdownEditorControlFX)
[![](https://jitpack.io/v/Dansoftowner/MarkdownEditorControlFX.svg)](https://jitpack.io/#Dansoftowner/MarkdownEditorControlFX)
![GitHub issues](https://img.shields.io/github/issues/Dansoftowner/MarkdownEditorControlFX)
![GitHub last commit](https://img.shields.io/github/last-commit/DansoftOwner/MarkdownEditorControlFX)
![GitHub](https://img.shields.io/github/license/Dansoftowner/MarkdownEditorControlFX)**An advanced markdown-editor control for JavaFX.**
![Demo gif](screenshots/demo-dark.gif)
# Features
* Three **view modes** : `EDITOR_ONLY`, `PREVIEW_ONLY`, `BOTH`
* Formatting toolbar items: `bold`, `italic`, `strikethrough`, `monospaced`
* Live preview
* Styleable through `JavaFX CSS`
* ...and more### TODO
* Syntax highlighting in the `editor-area`
* Internationalization support
* Find dialogContributions are welcome!
# Requirements
Java 11 or higher# Projects using MarkdownEditorControlFX
If you use this library in your project, let me know in the [discussions](https://github.com/Dansoftowner/MarkdownEditorControlFX/discussions)!
* [Boomega](https://github.com/Dansoftowner/Boomega) - A modern book explorer & catalog application
# Download
#### Maven example
```xml
jitpack.io
https://jitpack.io
```
```xml
com.github.Dansoftowner
MarkdownEditorControlFX
0.6.3```
#### Gradle example
```groovy
repositories {
...
// For MarkdownEditorControl
maven { url 'https://jitpack.io' }
// For some of it's dependencies
maven { url "http://sandec.bintray.com/repo"}
maven { url "https://dl.bintray.com/jerady/maven" }
}
``````groovy
dependencies {
implementation 'com.github.Dansoftowner:MarkdownEditorControlFX:0.6.3'
}
```# View modes
As mentioned, the control supports multiple view modes.
Each view mode is represented by the enum: `com.dansoftware.mdeditor.MarkdownEditorControl.ViewMode`.
It can be set using the `MarkdownEditorControl#setViewMode` method.### 1. Editor only (`ViewMode.EDITOR_ONLY`)
In this mode, only the editor-area is visible.![Screenshot](screenshots/EditorOnly.jpg)
### 2. Preview only (`ViewMode.PREVIEW_ONLY`)
In this mode, only the preview-area is visible.![Screenshot](screenshots/PreviewOnly.jpg)
### 3. Editor and preview (`ViewMode.BOTH`)
![Screenshot](screenshots/EditorAndPreview.jpg)
# Basic usage
```java
MarkdownEditorControl control = new MarkdownEditorControl();
control.setToolbarVisible(true); // setting the toolbar visible on the top
control.setMarkdown("# Default "); // setting an initial text// ...add it to your container or whatever
container.getChildren().add(control);
```# Demos
* [LightDemo](src/test/java/com/dansoftware/mdeditor/test/LightDemo.java) - Light-style example
* [DarkDemo](src/test/java/com/dansoftware/mdeditor/test/DarkDemo.java) - Dark-style example# Used libraries
* [markdown-javafx-renderer](https://github.com/JPro-one/markdown-javafx-renderer) - JavaFX markdown renderer based on [flexmark](https://github.com/vsch/flexmark-java)
* [RichTextFX](https://github.com/FXMisc/RichTextFX) - Rich-text area for JavaFX
* [FontAwesomeFX](https://bitbucket.org/Jerady/fontawesomefx/src/master/) - for the iconsUsed libraries for the demos:
* [JMetro](https://www.pixelduke.com/java-javafx-theme-jmetro/)# License
**Apache 2.0**