Sha256: 8f776ed1d4a3121de514f9919fe2fbc86599d9c6e32445bed91d573da9b32099
Contents?: true
Size: 1.23 KB
Versions: 17
Compression:
Stored size: 1.23 KB
Contents
/*! * medium-editor-insert-plugin v0.3.2 - jQuery insert plugin for MediumEditor * * https://github.com/orthes/medium-editor-insert-plugin * * Copyright (c) 2014 Pavel Linkesch (http://linkesch.sk) * Released under the MIT license */ (function ($) { $.fn.mediumInsert.registerAddon('maps', { /** * Maps initial function * @return {void} */ init: function () { this.$el = $.fn.mediumInsert.insert.$el; }, insertButton: function(buttonLabels){ var label = 'Map'; if (buttonLabels === 'fontawesome' || typeof buttonLabels === 'object' && !!(buttonLabels.fontawesome)) { label = '<i class="fa fa-map-marker"></i>'; } if (typeof buttonLabels === 'object' && buttonLabels.map) { label = buttonLabels.map; } return '<button data-addon="maps" data-action="add" class="medium-editor-action mediumInsert-action">'+label+'</button>'; }, /** * Add map to placeholder * @param {element} placeholder Placeholder to add map to * @return {void} */ add: function (placeholder) { $.fn.mediumInsert.insert.deselect(); placeholder.append('<div class="mediumInsert-maps">Map - Coming soon...</div>'); } }); }(jQuery));
Version data entries
17 entries across 17 versions & 1 rubygems