WYSIWYG: Add custom buttons to load blocks?
Hi!
I would like to add a button to the WYSIWYG editor in the backend so that my clients can insert blocks without having to type the simplified markdown like {fuel_block('...')}. I am new to FUEL and I am learning very slowly, so would someone be willing to help me out by pointing me in the right direction? What would need to be done to (1) make a new button on the editor (2) when that button is clicked, load a window (like when you are adding tags/categories/etc.) with a list of all blocks and then (3) when a block is chosen, insert the markdown for that block by the cursor in the editor.
Thanks so much!
Z
Comments
$config['ckeditor']['default'] = array( 'toolbar' => array( array('Bold', 'Italic', 'Strike'), array('Format'), array('FUELImage', 'HorizontalRule'), array('NumberedList', 'BulletedList'), array('FUELLink', 'FUELUnlink'), array('Undo', 'Redo', 'RemoveFormat'), array('PasteFromWord', 'PasteText'), array('Maximize'), ), 'contentsCss' => WEB_PATH.'assets/css/main.css', 'htmlEncodeOutput' => FALSE, 'entities' => FALSE, 'bodyClass' => 'ckeditor', /*'protectedSource' => array('/\{fuel_\w+\(.+\)\}/g', '/<\?[\s\S]*?\?>/g'), */ 'toolbarCanCollapse' => FALSE, 'extraPlugins' => 'fuellink,fuelimage', 'removePlugins' => 'link,image', 'allowedContent' => TRUE, );
http://docs.ckeditor.com/#!/guide/plugin_sdk_sample_1