So what *is* the state of SVG and Drupal?

Events happening in the community are now at Drupal community events on www.drupal.org.
Al2004's picture

There doesn't seem to be much life in this group, but just in case... :)

I need to develop a site which shows interactive svg charts. I've written the code which auto-generates the svg files, which contain a lot of JavaScript. At this point, I thought - Ok, the easy bit, all I have to do now is find some way to get this code onto a web page.

Well, it's turned out to be a lot harder than I thought. I started with Joomla, because I've used it before, and tried to embed the svg file onto a page by using the HTML embed, object, or iframe tags (see http://www.w3schools.com/svg/svg_inhtml.asp). This doesn't work. If I use TinyMCE, the editor will show me the graphic, but when I try to save the page, it just deletes my HTML code. I can't find out what the problem is, as there doesn't seem to be any svg interest at Joomla.

Some searching got me here but, as far as I can make out, Drupal can't handle svgs either. Is this right?

I've obviously misunderstood something very basic here. I can easily manually create an HTML page which embeds an svg file, and it will display on practically any browser (although IE6/7/8 require a plugin). Why is it so difficult to get a CMS to do this? Or have I misunderstood?

Thanks -

Al

Comments

TinyMCE may be your problem

metzlerd's picture

TinyMCE is notorious for stripping tags out of HTML. It's a good thing when you're trying to paste in a word document, but a bad thing when you're trying to embed fancy HTML. There is some conversion about allowed tags, but a wysiwyg editor with SVG support is a tall order.

I don't think that (provided you eliminate the wysiwg) and configure your input filters properly, that there is any barrier to embedding SVG in drupal.

Thanks...

Al2004's picture

...this got me going on the right route. Some more googling, and another question on the Joomla forums, got the right answer(s). See http://forum.joomla.org/viewtopic.php?f=615&t=628714 if you're interested.
So, won't be changing to Drupal just yet... :)

Graphing & SVG

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: