Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Enable setting of HTML attributes via markdown and markdownToHtml() #4840

Open
Baaaaaz opened this issue Jun 15, 2024 · 2 comments
Labels
feature Adding functionality that adds value

Comments

@Baaaaaz
Copy link

Baaaaaz commented Jun 15, 2024

Describe the Problem

When using markdownToHtml() function I'm not able to set ids, classes, or other attributes in markdown script to be incorporated into the processed HTML output.

The Solution you'd like

Add the extension https://github.com/vsch/flexmark-java/tree/master/flexmark-ext-attributes to the to markdownToHtml() function and enable all its goodness.

Alternatives that you've considered.

Writing HTML in the markdown script in order to set the attributes, which defeats the purpose of using markdown in the first place.

Additional Context

No response

@Baaaaaz Baaaaaz added the feature Adding functionality that adds value label Jun 15, 2024
@bubblobill
Copy link
Collaborator

I'm not personally a fan of markdown so I'm not aware of what's available.
Bearing that in mind, constructing feature sets from various libraries ad-hoc seems less useful than plumbing in a library that is fully featured and copes with different dialects. Are there any off-the-shelf options that could be used without too much pain?

@Baaaaaz
Copy link
Author

Baaaaaz commented Jun 16, 2024

Not sure about the ad-hoc bit in this case! As doesn't MapTool already use the flexmark library and some of its extensions already in markdownToHtml? i.e. https://github.com/RPTools/maptool/blob/release-1.14/src/main/java/net/rptools/maptool/client/functions/MarkDownFunctions.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adding functionality that adds value
Projects
None yet
Development

No branches or pull requests

2 participants