Hi,
I am not sure if you still need help on this topic but I thought
giving you alternatives wouldn't hurt.
I believe the default behaviour is for tinyMCE to convert all
textareas into a TinyMCE WYSIWYG editor instance.
However, by calling the tinyMCE.init() function with configuration
options specified you can change this behaviour.
For example if you initialize tinyMCE with the configuration option
'mode' set to 'none' then no elements are converted and later your
page can call the tinyMCE.execCommand("mceAddControl", false, "id");
function to convert any DOM element on the fly.
tinyMCE WIKI - mode:
http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/mode
tinyMVE WIKI - execCommand:
http://wiki.moxiecode.com/index.php/TinyMCE:API/tinymce.Editor/execCommand
EG:
tinyMCE.init({mode : "none"});
This means you only need to initialize tinyMCE once.
Now, to convert an element in your infoWindow into a tinyMCE wysiwyg
editor instance you will need to add a unique id to it and pass that
through to tinyMCE.
EG:
var infoHTML = "<div id='mce_editor1'></div>";
marker.openInfoWindow(infoHTML);
Then you need to add a handler for the 'infowindowbeforeopen' event of
a marker. This handler will convert the element into a tinyMCE WYSIWYG
editor instance just before the infoWindow opens.
GEvent.addListener(marker, "infowindowbeforeopen", function() {
tinyMCE.execCommand('mceAddControl', false, 'mce_editor1');
tinyMCE.execCommand('mceFocus', false, 'mce_editor1');
});
I like to only deal with 1 instance of tinyMCE at a time so I add a
handler for the 'infowindowbeforeclose' event to convert the editor
instance back when the infoWindow is closed.
EG:
GEvent.addListener(marker, "infowindowbeforeclose", function() {
tinyMCE.execCommand('mceFocus', false, 'mce_editor1');
tinyMCE.execCommand('mceRemoveControl', false, 'mce_editor1');
});
of course you don't need to convert the editor back, using unique ID's
on the DOM element should be enough to make sure there are no
conflicts.
I hope this helps.
Thu
On Sep 22, 1:29 pm, purescape <[EMAIL PROTECTED]> wrote:
> Wow, thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---