wpbsav
@ 21
wpbsav / SagreraWP / wp-content / themes / bsav / js / tinyButtons.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
(function() { /* Register the buttons */ tinymce.create('tinymce.plugins.MyButtons', { init : function(ed, url) { ed.addButton( 'button_shortcode', { title : 'Lista introducción', text : 'Intro artículo', onclick : function() { ed.selection.setContent('[intro][/intro]'); } }); ed.addButton( 'button_columna1', { title : 'Columna 1', text : 'Columna 1', onclick : function() { ed.selection.setContent('[columna1][/columna1]'); } }); ed.addButton( 'button_columna2', { title : 'Columna 2', text : 'Columna 2', onclick : function() { ed.selection.setContent('[columna2][/columna2]'); } }); ed.addButton( 'button_shortcode_title', { title : 'Título', text : 'Título', onclick : function() { ed.selection.setContent('[titulo][/titulo]'); } }); ed.addButton( 'button_contenido2', { title : 'Contenido ancho', text : 'Contenido ancho', onclick : function() { ed.selection.setContent('[contenidoancho][/contenidoancho]'); } }); }, createControl : function(n, cm) { return null; }, }); /* Start the buttons */ tinymce.PluginManager.add( 'bsav_button_script', tinymce.plugins.MyButtons ); })(); |
Commits for wpbsav/SagreraWP/wp-content/themes/bsav/js/tinyButtons.js
Revision | Author | Commited | Message |
---|---|---|---|
21 | amaraver | Thu 23 Apr, 2015 09:42:43 +0000 | shortcodes |