I'm trying to put an image map on my splashpage (which is created with Front Page Module. If I create the html in GIMP or Dreamweaver it works fine, but when I paste the html in to my html editor in Drupal (TinyMCE) it doesn't work.

It seems to be stripping the usemap="#map" section. I have turned off HTML Corrector and am using "Full HTML".

Here is my code:

<img src="/sites/default/files/frontpage.png" width="500" height="500" border="0" usemap="#map" />

<map name="map">
<!-- #$-:Image map file created by GIMP Image Map plug-in -->
<!-- #$-:GIMP Image Map plug-in by Maurits Rijk -->
<!-- #$-:Please do not edit lines starting with "#$" -->
<!-- #$VERSION:2.3 -->
<!-- #$AUTHOR:Mark Conroy -->
<area shape="poly" coords="248,457,253,443,255,431,262,422,268,411,287,408,306,406,321,410,324,421,327,429,324,443,316,454,307,463,296,472,279,475,263,477,255,473,250,469,248,461,248,457,250,456" href="http://www.markconroy.net/node" />
</map>

but it turns out as:

<img src="/sites/default/files/frontpage.png" width="500" height="500" border="0" />

<map name="map">
<!-- #$-:Image map file created by GIMP Image Map plug-in -->
<!-- #$-:GIMP Image Map plug-in by Maurits Rijk -->
<!-- #$-:Please do not edit lines starting with "#$" -->
<!-- #$VERSION:2.3 -->
<!-- #$AUTHOR:Mark Conroy -->
<area shape="poly" coords="248,457,253,443,255,431,262,422,268,411,287,408,306,406,321,410,324,421,327,429,324,443,316,454,307,463,296,472,279,475,263,477,255,473,250,469,248,461,248,457,250,456" href="http://www.markconroy.net/node" />
</map>

Any suggestions would be much appreciated.

Thanks,
Mark C.

Comments

WorldFallz’s picture

iirc, i believe you have to add usemap to the valid extended elements configuration for tinymce. If you do a search for "image map" over in the moxie code forums you should find the info you need.

markconroy’s picture

I have come up with a semi-solution. I turned off TinyMCE and did what I needed to do, then turned it on again. But now the blue border (link thing) is showing all the way around the image, as if I had just made the image a full link.

any ideas: it's at www.markconroy.net and only the blob at the end of the spill should be linked (which it is, but I need to get rid of the blue box).

Mark.
Thanks.

============

Drupal Core Maintainer for "Out of the Box" Initiative.

WorldFallz’s picture

I believe you need to add border="0" to the img tag for the image map.

markconroy’s picture

It works with the border at "0". Thanks so much for the help.

mark.

============

Drupal Core Maintainer for "Out of the Box" Initiative.