pressbooks aldine theme the theme used for the front page or default book
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.
|
|
|
( 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: 'link',
|
|
|
|
label: aldine.call_to_action.link,
|
|
|
|
value: '#',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
onsubmit: function ( e ) {
|
|
|
|
editor.insertContent(
|
|
|
|
'[aldine_call_to_action text="' +
|
|
|
|
e.data.text +
|
|
|
|
'" link="' +
|
|
|
|
e.data.link +
|
|
|
|
'"]'
|
|
|
|
);
|
|
|
|
},
|
|
|
|
} );
|
|
|
|
},
|
|
|
|
} );
|
|
|
|
},
|
|
|
|
createControl: function ( n, cm ) {
|
|
|
|
return null;
|
|
|
|
},
|
|
|
|
} );
|
|
|
|
tinymce.PluginManager.add(
|
|
|
|
'aldine_call_to_action',
|
|
|
|
tinymce.plugins.aldine_call_to_action
|
|
|
|
);
|
|
|
|
} )();
|