Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function ckeditor_insert_view_ckeditor_plugin() {
- return array(
- 'insert_view' => array(
- // Plugin name.
- 'name' => 'insert_view',
- // Plugin description - it will be displayed in the plugins management section of the profile settings.
- 'desc' => t('Plugin for adding Insert Views shortcode.'),
- // The full path to the CKEditor plugin directory, trailing slash included.
- 'path' => drupal_get_path('module', 'ckeditor_insert_view') . '/plugins/insert_view/',
- // Plugin buttons definition (optional).
- 'buttons' => array(
- 'insert_view' => array('label' => 'Insert View', 'icon' => 'icons/insert_view.png')
- )
- )
- );
- }
- CKEDITOR.plugins.add( 'insert_view', {
- init: function( editor ) {
- editor.addCommand( 'insert_view', new CKEDITOR.dialogCommand( 'viewDialog' ) );
- editor.ui.addButton( 'View', {
- label: 'Insert View',
- command: 'insert_view',
- //toolbar: 'insert',
- icon: this.path + 'icons/insert_view.png'
- });
- CKEDITOR.dialog.add( 'viewDialog', this.path + 'dialogs/insert_view.js' );
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement