After studying the filter-html
module it looks like the immediate answer is no --- there appears to be no way to change the filter options for a particular instance.
After some experimentation, however, I discovered that you can make small change to make something like this possible. Most attribute handling can be customized by changing the attributes-map
block, but inline style attributes are not handled in that block. They are dealt with specifically in the check-attributes
function.
I commented out these lines in check-attributes
which then causes all style attributes get stripped out by default:
if value: select attributes 'style [
append style value
]
You would need to add the ones you didn't want filtered back in to the specific html tags in attribute-map
. I make a copy of the original attribute-map
, make my changes, run filter-html
, then revert back to the original before the next filtering instance.