Hi @ginaginagina,
Unfortunately, that isn’t something this plugin will help with. This plugin is mainly for sanitising SVG files on upload, any fixes to the admin area are purely there to make life a bit easier for the user.
That said, if you’re pasting your SVG markup into the html section of the editor, when you switch back to visual, I see no reason that the editor shouldn’t convert it for you.
I’m sorry I can’t be much more help.
Cheers,
Daryll
Oh, shoot! 🙁 Yeah, apparently, WP won’t insert raw svg code, at least from what I’ve been reading online. (Would be super happy to be wrong!) I would upload the SVG as a file, but I don’t know how; especially because I need to have one line of it be dynamic (update the month/year within the graphic). I guess I have more learning to do!
Thank you. 🙂
-
This reply was modified 7 years, 10 months ago by
ginaginagina.
Hey, I actually just got done implementing this for my own site. Here is a gist for a WordPress filter that will replace svg-img tags with the inline SVG code from the sourced file when the page loads. It’s coded to only work on locally-hosted SVG files stored in your WordPress content folder and it runs the code through @enshrined’s svg-sanitizer library (which must be installed) just in case the SVG got uploaded to the site by some means that avoids this plugin (an integrated forum’s posts, for example).
To use this, paste the entire code into your theme’s functions.php or get a plugin like code snippets and add it as a snippet to that.
-
This reply was modified 7 years, 9 months ago by
jadeddragoon. Reason: forgot the link, derp
-
This reply was modified 7 years, 9 months ago by
jadeddragoon.
-
This reply was modified 7 years, 9 months ago by
jadeddragoon.