maptool icon indicating copy to clipboard operation
maptool copied to clipboard

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

Open Baaaaaz opened this issue 1 year ago • 2 comments

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 avatar Jun 15 '24 21:06 Baaaaaz

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?

bubblobill avatar Jun 16 '24 07:06 bubblobill

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

Baaaaaz avatar Jun 16 '24 08:06 Baaaaaz