- Issue created by @jackwrfuller
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
I'm migrating my personal site from Drupal 7 to 11, and adopted this module instead of https://www.drupal.org/project/markdown β .
Footnotes not being supported is a massive surprise. Per https://commonmark.thephpleague.com/2.4/extensions/footnotes/, this is trivial to support.
The absence of this makes me want to switch back to the Markdown module. But then there's π Subformstate incorrect interface error Active and π Automated Drupal 11 compatibility fixes for markdown Active that are ostensibly even bigger problems to tackle π¬π«
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
(#3 allows me to gradually move all my writings over to Standard's Basic HTML/Full HTML combined with https://www.drupal.org/project/footnotes β
^4
. I'll keep using this module for user comments though.) @wim-leers check out my MR, I've added optional footnote support.
I agree with you that we should allow the user to access CommonMark's additional extensions. As I've done it with the footnotes, it would be easy to add.
It would also be good for markdown_easy to allow you to configure CommonMark's settings. For example, changing the default footnote hrefs (which I had to do because drupal breaks the footnote linking, since it filters out id's with colons in them).
- First commit to issue fork.
- πΊπΈUnited States ultimike Florida, USA
I've update the MR to address the things I noted above as well as I improved one of the functional tests to actually test the footnote extension.
I'm still on the fence about whether or not the Footnotes extension should be enabled by default or not seeing how there are additional tags that have been added to the "Limit allowed HTML tags and correct faulty HTML" configuration to support footnotes.
Regardless, once this is merged, I'll need to remember to add something to the release notes letting folks know that if they're upgrading and enable the Footnotes extension, they'll need to add the following to the "Limit allowed HTML tags and correct faulty HTML" config:
id
to the existing<li>
as well as<sup id>
.I am amenable to adding additional extensions, but I really want to keep this module dead-simple to use - perhaps that means enabling and configuring extensions by default without giving users the option to enable/disable them in the filter's settings form.
Thoughts?
-mike
Personally, I use markdown a lot for other stuff, and I found it quite jarring that I couldn't use footnotes out of the box (hence why I made the MR). I'm not fussed whether its enabled by default or not though.
In terms of keeping the module easy to use, how about keeping the additional extensions hidden behind an "advanced" section in the settings form?
- πΊπΈUnited States ultimike Florida, USA
I talked this over with some folks during DrupalEasy Office Hours and I'm leaning towards doing the following:
- Remove the option to enable Footnotes.
- Add (at least) a new "flavor", calling it something like "GitHub flavored+" and including Footnotes and maybe a few other commonly-used extensions (I'm open to suggestions.) If we go this route, then I may want to consider automatically updating the "Limit allowed HTML" config based on the flavor selected.
The goal is to both keep the codebase of this module as simple as possible (for easy updates) as well as keeping its implementation as easy as possible for end users.
Thoughts?
-mike
- πΊπΈUnited States ultimike Florida, USA
As I mentioned in my previous comment, I didn't want to go down the road of adding additional configuration to the Markdown Easy so I decided to remove the Footnotes extension option and add a new "Markdownpalooza" flavor that includes both the Footnotes extension as well as the Description lists extension. (Full list of all possible extensions provided by the CommonMark library this module is already using.)
I believe that adding this functionality this way keeps my mission of this module intact: to be easy-to-use and easy-to-maintain.
Summarizing the three available flavors:
- Existing flavor "Standard Markdown" is comprised of only the CommonMarkCoreExtension.
- Existing flavor "GitHub-flavored Markdown" is comprised of the GithubFlavoredMarkdownExtension which is the same as CommonMarkCoreExtension plus the following extensions: Autolinks, Disallowed Raw HTML, Strikethrough, Tables, and Task Lists.
- New flavor "Markdownpalooza" is comprised of GithubFlavoredMarkdownExtension plus the Description list extension and the Footnotes extension.
Some additional thoughts:
- I am not against adding addition extensions to Markdownpalooza, but after going through the list of available extensions, I didn't see much value in any of the other available extensions.
- I'm not 100% in love with the name Markdownpalooza, and am open to suggestions. My only criteria is that I'd like a name that is a bit fun.
Additional changes in this MR:
- I added the relevant Footnotes and Description list HTML tags to the default configuration of the Markdown text format that is installed with this module.
- I added test support for the new Markdownpalooza extensions.
- I renamed the "Important" information when configuring the Markdown Easy text filter to "Tips" and added some additional information.
- I added a new hook_markdown_easy_environment_modify that will allow folks to add additional extensions via a small custom module. Once this MR is merged, I'll update https://www.drupal.org/docs/extending-drupal/contributed-modules/contrib... β with an example of how to use it. I'm happy to provide issue credit for anyone who wants to help me with this.
- As this is a fairly significant addition to the module, once merged, I'll be releasing a 1.1.0 version.
- Similarly, once 1.1.0 is released, I'll be reviewing and updating all of the documentation (including the README.md). I'm happy to provide issue credit for anyone who wants to help me with this.
Thoughts? Feedback?
thanks,
-mike - πΊπΈUnited States ultimike Florida, USA
Possible new flavor names suggested by DrupalEasy alumni:
- Markdown Goulash
- Markie Markdown and the Funky Bunch
- Markdown Loaded
- Markdown Madness
We also discussed the possibility of adding additional extensions like Table of Contents, but the concern is that they're always on, and not enable-able (or disable-able) on a per entity basis.
-mike