Page 1 of 1

The WYSIWYG editor removes part of Google Maps integration link [SOLVED]

Posted: Thu Aug 05, 2010 6:34 pm
by kief24
I made a map in Google Map with diffrent locations in Berlin.

I want to show this map on my CMS site, and google provides a code you can paste in your html to show the map on your site.

On my pages, where I normally add content trough the WYSIWYG editor, I switch to html mode, to paste the Google Maps html code.

Code looks like this :

Code: Select all

<__iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.be/maps/ms?hl=nl&ie=UTF8&msa=0&msid=109691600846151473740.00048d03be0fbabb0ad17&t=h&ll=52.496691,13.451914&spn=0.001922,0.005552&output=embed"></__iframe><br /><small><a href="http://maps.google.be/maps/ms?hl=nl&ie=UTF8&msa=0&msid=109691600846151473740.00048d03be0fbabb0ad17&t=h&ll=52.496691,13.451914&spn=0.001922,0.005552&source=embed" style="color:#0000FF;text-align:left">Arena Berlin en omgeving</a> weergeven op een grotere kaart</small>
If I paste this, and hit the 'apply' button in admin panel, the maps shows well on the site.

BUT

If I switch to the WYSIYG editor again, the map dissapears on the site.
And the Google code is changed.

If I check it in html modus, the code has been automatically changed to this :

Code: Select all

<small><a style="color: #0000ff; text-align: left;" href="http://maps.google.be/maps/ms?hl=nl&ie=UTF8&msa=0&msid=109691600846151473740.00048d03be0fbabb0ad17&t=h&ll=52.496691,13.451914&spn=0.001922,0.005552&source=embed">Arena Berlin en omgeving</a> weergeven op een grotere kaart</small>
the part is gone....

any suggestions to fix this ?

Thx a lot!

Re: The WYSIWYG editor removes part of Google Maps integration link

Posted: Thu Aug 05, 2010 6:40 pm
by Rolf
Hi kief24,

An WYSIWYG editor is made for text and images, not for code.
If you want to add code to your page, you better switch WYSIWYG off. Look in the Options tab in the page editor and tick the box at "Disable WYSIWYG editor on this page (regardless of template or user settings)"

Grtz. Rolf  :)

ps.
Or put the code in a Global Content Block (Set WYSIWYG off in Global Settings)
and call the block in the page {global_content name='google-maps'}, TinyMCE won't delete {tags}

Re: The WYSIWYG editor removes part of Google Maps integration link

Posted: Thu Aug 05, 2010 6:52 pm
by kief24
I found a solution that works :

- make a Global Content Block named whatevername.
- switch WYSIWYG off.
- insert your iframe code in this block

- On a content page add :
{global_content name='whatevername'}

and the (in my case) Google Map shows up nicely.
With or without use of the WYSIWYG editor.

Re: The WYSIWYG editor removes part of Google Maps integration link

Posted: Thu Aug 05, 2010 6:54 pm
by kief24
Thx Rolf.
It seems we posted the solution about the same moment  :)

Re: The WYSIWYG editor removes part of Google Maps integration link [SOLVED]

Posted: Fri Aug 06, 2010 8:48 am
by spike
You could have used the CGGoogleMaps module and then simply paste the convenient smarty tag into your page, possibly a more elegant solution.
gruss - spike