When creating a Tumblr post, and using the HTML editor option, when I add specific HTML attributes to elements, the TinyMCE rich text editor strips nearly everything off.
i.e. this:
<span class="something" data-random="foobar">
becomes this:
<span class="something">
and this is unaffected:
<span class="something" title="foobar">
So can I either 1) disable this scrubbing (which is ridiculous, at least how it's currently implemented) or 2) get a list of all valid attributes so I can choose the best semantic choice?
This was killing me too. And searching google for any tumblr dev help more complicated than "how do I edit text color", oy vey. I wouldn't wish it on anyone.
Tumblr users don't have any control of the html or js that runs the control panel, and so can't add any files that alter TinyMCE configuration. But you can just turn it off. In the Dashboard tab of your Tumblr settings, you'll find a Text Editor section. Selecting plain html or Markdown will deactivate TinyMCE and allow you to post forms, data attributes, and any non-whitelist html to your heart's content.