You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
996 B
36 lines
996 B
( function () { |
|
tinymce.create( 'tinymce.plugins.aldine_call_to_action', { |
|
init: function ( editor, url ) { |
|
editor.addButton( 'aldine_call_to_action', { |
|
title: aldine.call_to_action.title, |
|
icon: 'icon dashicons-flag', |
|
onclick: function () { |
|
editor.windowManager.open( { |
|
title: aldine.call_to_action.title, |
|
body: [ |
|
{ |
|
type: 'textbox', |
|
name: 'text', |
|
label: aldine.call_to_action.text, |
|
value: aldine.call_to_action.title, |
|
}, |
|
{ |
|
type: 'textbox', |
|
name: 'url', |
|
label: aldine.call_to_action.url, |
|
value: '#', |
|
}, |
|
], |
|
onsubmit: function ( e ) { |
|
editor.insertContent( '[aldine_call_to_action text="' + e.data.text + '" url="' + e.data.url + '"]' ); |
|
}, |
|
} ); |
|
}, |
|
} ); |
|
}, |
|
createControl: function ( n, cm ) { |
|
return null; |
|
}, |
|
} ); |
|
tinymce.PluginManager.add( 'aldine_call_to_action', tinymce.plugins.aldine_call_to_action ); |
|
} )();
|
|
|