WordPress.org

Ready to get started?Download WordPress

Forums

WordPress automatically deletes all HTML image map code (6 posts)

  1. webbkevin
    Member
    Posted 4 years ago #

    Hi,

    I run robberbaronscomedy.com, and am currently developing a new version using wordpress MU 2.8.4 and Buddypress 1.03.

    Right now, I am trying to develop a cast page that uses an image map to overlay Facebook-like rectangles over castmembers' faces, which when clicked would lead to their profile pages.

    Unfortunately, anytime I enter in mapping code, WordPress deletes all the map and area tags automatically. I have disabled the WYSIWYG editor, and I have tried deactivating all plugins and changing themes. So for example, this

    <map name="myMap" id="myMap">
    <area href="http://en.wikipedia.org/wiki/Rectangle" shape="rect" coords=รข"x1, y1, x2, y2" alt="rectangle" />
    <area href="http://en.wikipedia.org/wiki/Circle" shape="circle" coords="x3, y3, r" alt="circle" />
    <area href="http://en.wikipedia.org/wiki/Polygon" shape="poly" coords="x4, y4, x5, y5, x6, y6" alt="polygon" />
    </map>
    <img alt="map" src="http://www.nietoperzka.com/wptraining/wp-content/uploads/2007/09/img.png" width="420" height="185" usemap="#myMap" />

    becomes:

    <img alt="map" src="http://www.nietoperzka.com/wptraining/wp-content/uploads/2007/09/img.png" width="420" height="185" />

    Any suggestions? I also am open to other methods of making the facebook tagged photo function work, though I would prefer not to use CSS for the one page.

    Thanks!

  2. alintx
    Member
    Posted 4 years ago #

    Did you get any response to this, or figure it out?

  3. mukaumedia
    Member
    Posted 4 years ago #

    I don't know how WordPress MU works or what Buddypress is but here are two things I have found out:

    1) When editing a wordpress.org page / post, if you add HTML imagemap code into the Text editor (rather than switching to the HTML editor) it will disappear as you've shown. Solution: always switch to HTML editor to add HTML (sorry if it sounds obvious)

    2) If you're using a wordpress.com hosted site you can't use any additional HTML code (or javascript etc). This is to keep THEIR servers safe and working.

  4. alism
    Member
    Posted 4 years ago #

    Yep, as mukaumedia says, don't use the visual editor at all once you've pasted your html code in. Not even for a quick nanosecond sneaky peek of how it might look, as when you switch back, you will find the code has been stripped out.

  5. beradmin
    Member
    Posted 4 years ago #

    Hi guys, I am editing a wordpress.org page/post and I always switch to HTML mode to edit my code. And I am having the same problem. Is it for the same reason as .com, keep their servers safe and working?

    I am inserting a embedded media (Flash) that is aligned to the right. It works fine in Firefox but it doesn't in Explorer. The media stays on the left side and all the text shows up underneath it. I even set up the publishing setting in Flash to align to the right but Explorer just ignores it.

    Then I tryed to change the <object... code in HTML mode but when I change back to VIEW mode or publish it WordPress keeps changing my code back, or modifying to a weird code. I even tryed to put the <object.. in beteween <div align=center></div> but them WordPress change <div align=center> to <div> and put a <p></p> after </div>...

  6. beradmin
    Member
    Posted 4 years ago #

    Me again... I kind of solved the problem. I "cheated". I create a table aligned to the right I put the embedded media inside the table. Since Explore didn't read the cell-padding I added a column to the left of the table. :-)

Topic Closed

This topic has been closed to new replies.

About this Topic