Adding ImageMaps through the WordPress Editor
-
So I needed to add image maps to images that I uploaded through the WordPress editor. The best option looked like :
https://www.maschek.hu/imagemap/imgmap
So I downloaded the version that would be easiest it integrate into the current tinymce 3 WordPress editor.
plugin_tinymce3_108.zip
I then unzipped and uploaded this to the following folder:
/wp-includes/js/tinymce/plugins/imgmap/
Then to actually make this work I made the following edits on the post.php file.
/wp-admin/includes/post.php
1303
$mce_external_plugins = apply_filters(‘mce_external_plugins’, array());
to
$mce_external_plugins = apply_filters(‘mce_external_plugins’, array(‘imgmap’ => ‘https://domain.ext/wp-includes/js/tinymce/plugins/imgmap/editor_plugin.js’));
1382
$mce_buttons = apply_filters(‘mce_buttons’, array(‘bold’, ‘italic’, ‘strikethrough’, ‘|’, ‘bullist’, ‘numlist’, ‘blockquote’, ‘|’, ‘justifyleft’, ‘justifycenter’, ‘justifyright’, ‘|’, ‘link’, ‘unlink’, ‘wp_more’, ‘|’, ‘spellchecker’, ‘fullscreen’, ‘wp_adv’ ));
to
$mce_buttons = apply_filters(‘mce_buttons’, array(‘bold’, ‘italic’, ‘strikethrough’, ‘|’, ‘bullist’, ‘numlist’, ‘blockquote’, ‘|’, ‘justifyleft’, ‘justifycenter’, ‘justifyright’, ‘|’, ‘link’, ‘unlink’, ‘wp_more’, ‘|’, ‘spellchecker’, ‘fullscreen’, ‘imgmap’, ‘wp_adv’ ));
After saving and uploading it seems to work properly.
Noted for others who may need this, as integration of this TinyMCE plug-in into WordPress is not documented anywhere. Not as good as a proper WordPress plug-in, but I have enough projects already.
ls
- The topic ‘Adding ImageMaps through the WordPress Editor’ is closed to new replies.