insertHTML and TinyMCE live update? or ajax?

I am successfully using the insertHTML webskin with TinyMCE, however, to associate objects via aObjectIDs for the TinyMCE to grab, I need to populate the aObjectsIDs array (associated media) then save the entry, go back into the entry and then I am able to “pick from my list”.

Is there an ajax-y way to associate a file or image with an entry, and then go right to the TinyMCE body and pop it in?

Via > https://farcry.jira.com/wiki/display/FCDEV40/richtext

Going to close this… for some reason it is working now…

its a long standing bug in FC 7. Very annoying. once you save the record, the RTE can find the related items but you have to related them, save, re-edit then you can insert links.

You can find the response we got the last time we brought this up here

and just like that, it is not working again…

@modius Can someone point me in the right direction to fix? A file, or files to poke around in?

2 Likes

The TinyMCE plugin that handles this can be found in core in the
core/webtop/thirdparty/tiny_mce/plugins/farcrycontenttemplates directory,
which interacts with /webtop/facade/tinyMCE.cfc. A similar issue was fixed
in the image_farcry TinyMCE plugin, which was to include the current value
of the array (retrieved from the hidden field) and pass that into the ajax
request. The fix for this would be the same.

Blair

2 Likes

Thanks Blair, I’m guessing that “update app” will not work, as I made a simple change and nothing is changed in the plugin.js file. Any further help would be awesome!

1 Like

TinyMCE caches the plugin JS fairly aggressively and it’s hard to refresh since it’s in an iframe. The easiest way around that would be to open Developer Tools in Chrome, go to the Network tab, and check “Disable cache”;

The browser cache will be disabled while the Developer Tools are open so a simple refresh should then do the trick.

Great. I’ll take a look at a fix

Corey Snyder

2 Likes