Skip to content

Using media_selector as the basis of a tinymce plugin for choosing from an existing image from a specified provider or uploading a new image to the provider and returning HTML for image to TinyMCE editor instance.

License

Notifications You must be signed in to change notification settings

kete/image_selector_tinymce_plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image_selector_tinymce_plugin

Description

Based on media_selector (https://github.com/kete/media_selector) JavaScript mini-application. See media_selector's README for dependencies, etc.

Image Selector is a jQuery and Sammy.js based mini-application for choosing from a list of providers' media assets (images in this case) that integrates into TinyMCE editor as a plugin.

Because of its dependency on jQuery, it doesn't currently work with TinyMCE's i18n translation scheme. See http://www.tinymce.com/forum/viewtopic.php?id=16761 for details. Hopefully this issue will be resolved in the future. In the meantime, translate_i18n is set to false.

Installation

Copy the contents of this directory to directory called imageselector under your TinyMCE install's plugins director. Configure TinyMCE to use it via the init declaration.

You'll also need to set up JSON files for your image providers and the size you want. IMPORTANT! These are assumed to be under /javascripts/image_selector_config/ on your site. See https://github.com/kete/media_selector/blob/master/data/providers.json and https://github.com/kete/media_selector/blob/master/data/sizes.json for how (you'll need to adjust URLs, etc. to suit).

Highly Recommended

When you configure TinyMCE, choose to use the 'inlinepopups' plugin and also dialog_type of "modal". I've found that IE and FireFox otherwise will not present the vertical scrollbar when you need it with image selector.

Dependencies

TinyMCE provides the plugin API that we are integrating with.

jQuery (through a link to Google's CDN), Handlebars.js, and Sammy.js along with some Sammy.js plugins that are included in the javascripts directory.

Author

image_selector_tinymce_plugin was created for the Kete project (http://kete.net.nz) and is maintained by Walter McGinnis .

License

image_selector_tinymce_plugin is covered by the MIT License. See LICENSE for more information.

About

Using media_selector as the basis of a tinymce plugin for choosing from an existing image from a specified provider or uploading a new image to the provider and returning HTML for image to TinyMCE editor instance.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published