michael-milette / moodle-filter_filtercodes

FilterCodes filter for Moodle enables content creators to easily customize and personalize course and site content using plain text tags (no HTML). For premium support, contact us at https://www.tngconsulting.ca/contact
https://moodle.org/plugins/filter_filtercodes
GNU General Public License v3.0
32 stars 43 forks source link

Add CSS class support for details tag #238

Closed alexmorrisnz closed 1 year ago

alexmorrisnz commented 1 year ago

Resolves #230

The regex selector is [a-zA-Z0-9-_ ], which are the only valid css class name characters outside of ISO 10646 U+00A0 and higher. I've also allowed space so you could add multiple classes to one details tag, e.g. {details style1 style2} would transform to <details class="style1 style2">

michael-milette commented 1 year ago

Hey @alexmorrisnz , thank you so much for your contribution. Works perfectly!

Your change has been integrated into FilterCodes here on GitHub and will be included in the upcoming release on https://moodle.org/plugins/moodle-filter_filtercodes around the time of the launch of Moodle 4.1 in about a month.

Thanks again! I love the new feature and can see how others will find it useful as well.

Best regards,

Michael