TinyMCE javascript question

I asked this at the tinymce support forum for the imagemanager plugin, but the only advice the Moxiecode administrator gave me was "check the tinymce api".  That's like a Chinese guy telling me to go learn the chinese language instead of translating a single word for me.

Here's the code that adds a custom button to TinyMCE:

            ed.addButton('image_edit', {
                title : 'image_tools.edit',
                cmd : 'mceImage',
                label : 'image_tools.edit_label',
                image : url + '/img/image_edit.png'
            });

 

Here's example code from Moxiecode to open a specific image in the imagemanager edit window where it can be cropped, resized, flipped, etc.

<script type="text/javascript" src="<yourinstallationpath>/js/mcimagemanager.js"></script>

<p>
       
<ahref="javascript:;"onclick="mcImageManager.edit({path :'{0}/teddybear.jpg', onsave :function(res){alert(res.file.url);}});">[Edit image]</a>
</p>

Here's how the command might look that is called when the custom button is clicked:

            ed.addCommand('mceImage', function(){
mcImageManager.edit({
path : '{0}/',
onsave : function(res) {alert(res.file.url);}});
            });

 

Obviously, that  path : '{0}/',   isn't going to do anything.  What it needs to do, is get the path to an image that is already inserted into the tinyMCE editor window, and selected.  The only place to get that would be from the scr attribute of the image.

I don't want anyone's time for free where real work is concerned, so I'll offer 50 bucks to anyone that helps me get this working.

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 24 Feb 2013

I created a TinyMCE plugin that would allow one to insert the bits for fancybox.  Fancybox works from the anchor tag so that is what I was working off of.  It has been a year since I worked with that plugin.  It worked, except that when you went to edit the fancybox link, it would not read back in the current settings (which may be linked to what you are seeing).  I got sidetrack on other things.  I will dig up the plugin if you think it may help you in this.  I worked off of the advance link plugin as a basis for the fancybox plugin.

Geeks, making the world a better place
Quote · 24 Feb 2013

I have come to the conclusion that product support at TinyMCE sucks. 

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 25 Feb 2013

 

I have come to the conclusion that product support at TinyMCE sucks. 

Yes, your conclusion is accurate.  If people think it is hard to get answers here, they have not been on the TinyMCE forum.  And the developers answers at TinyMCE to questions is RTFM.

Geeks, making the world a better place
Quote · 25 Feb 2013

"Obviously, that  path : '{0}/',   isn't going to do anything."

Well the {0}/  is suppose to grab the file path to the files upload folder in the config file.  so they say...   but i am not seeing a place to set the absolute path in the manager to the image upload folder.

I'll play with it for a bit more and see if i get it.



https://dolphin-techs.com - Skype: Dolphin Techs
Quote · 25 Feb 2013
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.