Skip to content

Commit 498a6db

Browse files
committed
v1.0.1
1 parent 0978d33 commit 498a6db

28 files changed

+2301
-9
lines changed
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: 🐞 Bug Report
2+
description: Create a report to help us improve
3+
title: "[Bug] <Short description of the bug>"
4+
labels: ["bug"]
5+
assignees:
6+
- raghul-tech
7+
8+
body:
9+
- type: markdown
10+
attributes:
11+
value: |
12+
## 🙋‍♂️ Thank you for taking the time to report a bug!
13+
14+
- type: input
15+
id: environment
16+
attributes:
17+
label: 💻 Environment
18+
description: What system are you using?
19+
placeholder: "e.g. Windows 11, Java 17, JavaFX 20"
20+
validations:
21+
required: true
22+
23+
- type: textarea
24+
id: description
25+
attributes:
26+
label: 📝 Describe the bug
27+
description: Give a clear and concise description of what the bug is.
28+
placeholder: "When I launch the preview with an empty file, the app crashes..."
29+
validations:
30+
required: true
31+
32+
- type: textarea
33+
id: steps
34+
attributes:
35+
label: 🔁 Steps to Reproduce
36+
description: How can we reproduce the behavior?
37+
placeholder: |
38+
1. Go to '...'
39+
2. Click on '...'
40+
3. Scroll down to '...'
41+
4. See error
42+
validations:
43+
required: true
44+
45+
- type: textarea
46+
id: expected
47+
attributes:
48+
label: ✅ Expected behavior
49+
description: What did you expect to happen?
50+
placeholder: "I expected the preview to open without crashing."
51+
validations:
52+
required: true
53+
54+
- type: textarea
55+
id: screenshots
56+
attributes:
57+
label: 📸 Screenshots (if applicable)
58+
description: Add any screenshots that help explain your problem.
59+
60+
- type: textarea
61+
id: logs
62+
attributes:
63+
label: 📄 Relevant log output (if any)
64+
description: Paste any stack trace or console output here.
65+
render: shell
66+
67+
- type: checkboxes
68+
id: terms
69+
attributes:
70+
label: ✅ Checklist
71+
options:
72+
- label: I have searched the [existing issues](https://github.com/raghul-tech/javafx-markdown-preview/issues).
73+
required: true
74+
- label: I am using the **latest version** of JavaFX Markdown Preview.
75+
required: true
76+
- label: I have provided all necessary information.
77+
required: true

.github/workflows/codeql.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: CodeQL Analysis
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
schedule:
9+
- cron: '0 0 * * 0' # weekly run
10+
11+
jobs:
12+
analyze:
13+
name: Analyze CodeQL
14+
runs-on: ubuntu-latest
15+
permissions:
16+
actions: read
17+
contents: read
18+
security-events: write
19+
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
language: [ 'java' ]
24+
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v3
28+
29+
- name: Initialize CodeQL
30+
uses: github/codeql-action/init@v2
31+
with:
32+
languages: ${{ matrix.language }}
33+
34+
- name: Build project
35+
run: ./gradlew build
36+
37+
- name: Perform CodeQL Analysis
38+
uses: github/codeql-action/analyze@v2

.github/workflows/maven.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Maven Build
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v3
16+
17+
- name: Set up JDK
18+
uses: actions/setup-java@v3
19+
with:
20+
java-version: '17'
21+
distribution: 'temurin'
22+
23+
- name: Build with Maven
24+
run: mvn clean install

CHANGELOG.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# 📦 Changelog
2+
3+
All notable changes to **JavaFX Markdown Preview** will be documented in this file.
4+
5+
---
6+
7+
## [1.0.1] - 2025-06-12
8+
9+
### ✨ Added
10+
-**Dual input support**: Preview from a `.md` **file** or **raw string content**.
11+
- 🪟 **Reopen preview window** after closing — useful for interactive demos or CLI tools.
12+
- 🖼️ **Screenshot and project badges** added to README for better presentation.
13+
- 📁 **Example usage code** added under the `examples/` folder.
14+
- 📤 **Maven Central instructions** and manual `.jar` usage guide added.
15+
- 📜 **CONTRIBUTING.md** and GitHub **issue templates** added for community support.
16+
17+
### 🛠️ Improved
18+
- 🧹 Refactored `JavaFXMarkdownPreview` class to support both `File` and `String` inputs.
19+
- 🪄 Optimized JavaFX thread handling and WebView initialization logic.
20+
- 📘 Enhanced documentation with clearer setup steps and inline code blocks.
21+
22+
### 🐞 Fixed
23+
- 🐛 Fixed preview not updating correctly when launched with string content.
24+
- 🐛 Resolved encoding issues when previewing Markdown files with special characters.
25+
- ⚠️ Prevented crashes on empty or invalid Markdown files.
26+
27+
---
28+
29+
## ⚠️ Known Issues
30+
31+
### 🔄 Real-Time Typing Issues
32+
- The Markdown preview may occasionally break or flicker while typing quickly.
33+
- This happens because the renderer tries to parse the content mid-edit.
34+
- **Workaround:** Pause briefly between edits or trigger a manual refresh if needed.
35+
36+
### 😀 Emoji Rendering in Offline Environments
37+
- Emojis may not render correctly when offline — especially if loaded via CDNs or external sources.
38+
- Some emojis may appear as empty boxes or missing symbols.
39+
- ➕ This is due to font or system limitations, not a bug in the library.
40+
41+
> If you encounter other issues, feel free to [open an issue](https://github.com/raghul-tech/javafx-markdown-preview/issues).
42+
43+
---
44+
45+
## [1.0.0] - 2025-06-12
46+
47+
- 🎉 Initial release of **JavaFX Markdown Preview**!
48+
- Preview `.md` files using JavaFX WebView and Flexmark library.
49+
- Minimal, embeddable, and designed for easy Markdown rendering in Java apps.

CODE_OF_CONDUCT.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Code of Conduct
2+
3+
## 👋 Our Pledge
4+
5+
We as contributors and maintainers of **JavaFX-Markdown-Preview** pledge to make participation in our project a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
We are committed to making this project a welcoming and respectful space for all.
8+
9+
---
10+
11+
## ✅ Expected Behavior
12+
13+
- Be respectful, kind, and constructive.
14+
- Use welcoming and inclusive language.
15+
- Gracefully accept constructive criticism.
16+
- Focus on what is best for the community and the project.
17+
- Show empathy towards other community members.
18+
19+
---
20+
21+
## 🚫 Unacceptable Behavior
22+
23+
- Harassment, abuse, or threats of any kind.
24+
- Discriminatory jokes, language, or imagery.
25+
- Public or private harassment.
26+
- Personal attacks or insulting comments.
27+
- Other conduct which could reasonably be considered inappropriate in a professional setting.
28+
29+
---
30+
31+
## 🧑‍⚖️ Reporting Issues
32+
33+
If you see or experience unacceptable behavior, please report it by contacting the project maintainer:
34+
35+
**📬 Contact**: [raghultech.app@gmail.com](mailto:raghultech.app@gmail.com)
36+
37+
All reports will be reviewed and investigated confidentially and respectfully.
38+
39+
---
40+
41+
## 🙌 Enforcement
42+
43+
Anyone asked to stop unacceptable behavior is expected to comply immediately. Maintainers have the right to remove, edit, or reject comments, commits, code, or other contributions that violate this Code of Conduct.
44+
45+
---
46+
47+
## 📄 Attribution
48+
49+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1.
50+
51+
---
52+
53+
Thank you for helping make **JavaFX-Markdown-Preview** a friendly and inclusive project! 🚀

CONTRIBUTING.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# 🙌 Contributing to JavaFX Markdown Preview
2+
3+
First off, thanks for taking the time to contribute! 🎉
4+
Contributions are what make the open-source community such an amazing place to learn, inspire, and create.
5+
6+
Whether it's fixing a bug, adding a new feature, improving documentation, or suggesting enhancements—your help is appreciated!
7+
8+
---
9+
10+
## 🚀 How to Contribute
11+
12+
### 1. Fork the Repository
13+
14+
Click the **Fork** button at the top-right corner of this page to create your own copy.
15+
16+
### 2. Clone Your Fork
17+
18+
```bash
19+
git clone https://github.com/your-username/javafx-markdown-preview.git
20+
21+
cd javafx-markdown-preview
22+
```
23+
24+
### 3. Create a New Branch
25+
```bash
26+
git checkout -b your-feature-name
27+
```
28+
- 💡 Tip: Use descriptive branch names like `fix-live-refresh`, `add-theme-support`, etc.
29+
30+
### 4. Make Your Changes
31+
- Make your edits to the code, documentation, or tests.
32+
33+
### 5. Commit and Push
34+
```bash
35+
git add .
36+
37+
git commit -m "✨ Add new feature: ..."
38+
39+
git push origin your-feature-name
40+
```
41+
42+
### 6. Open a Pull Request
43+
44+
- Go to the Pull Requests tab in the GitHub repo.
45+
46+
- Click "New pull request".
47+
48+
- Set the base branch to main and compare it with your feature branch.
49+
50+
- Add a meaningful title and description.
51+
52+
---
53+
54+
## ✅ Code Guidelines
55+
- Follow standard Java code formatting.
56+
57+
- Use clear commit messages.
58+
59+
- Add JavaDoc comments where necessary.
60+
61+
- Include example usage if you're adding a new public method.
62+
63+
- Ensure your code doesn't break existing examples.
64+
65+
---
66+
67+
## 🧪 Running Examples
68+
- Test your changes using the sample files under the `examples/` folder.
69+
- If adding a new feature, please consider adding a demo for it too.
70+
71+
---
72+
73+
## 🛠️ Reporting Issues
74+
- Found a bug or have a feature suggestion?
75+
76+
1. Go to the Issues section.
77+
78+
2. Click New Issue.
79+
80+
3. Fill out the issue template with steps to reproduce or describe your suggestion clearly.
81+
82+
4. Add screenshots if applicable.
83+
84+
---
85+
86+
## 🙏 Thank You
87+
Thanks again for your interest and support in making JavaFX Markdown Preview better!
88+
Let’s build something awesome together.
89+
90+
@raghul-tech
91+
---
92+

0 commit comments

Comments
 (0)