2008/02/03

GoogleMaps in FCKeditor

A little while ago I took the task suggested by dynamical.biz to implement a plugin for FCKeditor that would allow any end user to easily create a Google Map that can be inserted in the content and so it will be shown in the final page as he wanted.

It isn't an easy task because there are several little problems, mainly the fact that any javascript code is automatically protected so it won't be available in the DOM. Also, the plugin should be able to update the existing maps because we know that while you are editing something looks mostly OK, but when you finally see all the final page maybe you wish that it could have been a little bigger, or smaller, the map should have been centered a little to the north...

But if I'm writing this post is because of course it did work, so you can test it online

The integration with any installation is quite straightforward and is clearly documented, the only special thing is that you must get a Google Maps API key, but even that step is very easy.

Go, download it and play with it. For developers its code might have very interesting surprises, I'm not saying that the code is perfect, but I think that it does open the doors to make other plugins and code that previously were thought as "too difficult" (for example handling Flash files with the SWFObject, or being able to show at least a simple textarea to edit comments of PHP code). If you read this code (sorry if there aren't enough comments or everything is a little mixed up for the moment), you might find the bits that you need. And if you find this code useful, please contribute back your own ideas, plugins or why not?, a little donation

 

3 comments:

Raj Madhuram said...

Very cool!! Excellent work.

Andy said...

Do you know if is available for the version 3?
I've searched on internet but i haven't found that plugin with v3 for fckeditor.

Alfonso Martínez de Lizarrondo said...

FCKeditor is old and unsupported long ago. You should have upgraded to CKEditor by now!

The plugin for CKEditor uses the Google Maps 3: http://alfonsoml.blogspot.com.es/2011/12/google-maps-plugin-with-lines-and-areas.html