Hi dear friends,
How can i make a plugin like a button on the toolbar, I need this button to display a popup to configure a page properties like margins and paper type and then save it to the database.
Can you help me please, any example.
Thanks.
How can i make a plugin like a button on the toolbar, I need this button to display a popup to configure a page properties like margins and paper type and then save it to the database.
Can you help me please, any example.
Thanks.

Re: How need make a button on toolbar ...
Hi,
After some hours investigating this, I could achieve what I was looking for: A custom Toolbar Button which opens a popup window with my custom made Picture Gallery dialog, made on .NET .
Hope this helps, here's what I've made (procedures and code):
1 - Create a new folder for your plugin on /ckeditor/plugins folder. ex: /ckeditor/plugins/newplugin
2 - Inside this newplugin folder, create a JS file: ex. plugin.js
3 - Copy a toolbar button icon image to this newplugin folder. This can be a gif/jpg/etc..
4 - Edit the /ckeditor/config.js.
If you are using CKEditor version 3.3.X (and maybe on some earlier versions), your /ckeditor/config.js file looks like this:
CKEDITOR.editorConfig = function( config ) { // Define changes to default configuration here. For example: // config.language = 'fr'; // config.uiColor = '#AADC6E'; };In my case, I have a customized toolbar, showing some ckeditor toolbar buttons only.
Also, I've specified my newplugin in this section.
My /ckeditor/config.js file looks like this:
CKEDITOR.editorConfig = function( config ) { // Define changes to default configuration here. For example: // config.language = 'fr'; // config.uiColor = '#AADC6E'; //-------------------- // Referencing the new plugin config.extraPlugins = 'newplugin'; // Define the toolbar buttons you want to have available config.toolbar = 'MyToolbar'; config.toolbar_MyToolbar = [ ['Newplugin', 'Preview'], ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Scayt'], ['Undo', 'Redo', '-', 'Find', 'Replace', '-', 'SelectAll', 'RemoveFormat'] ]; };Finally, here's my /ckeditor/plugins/newplugin/plugin.js file:
CKEDITOR.plugins.add('newplugin', { init: function (editor) { var pluginName = 'newplugin'; editor.ui.addButton('Newplugin', { label: 'My New Plugin', command: 'OpenWindow', icon: CKEDITOR.plugins.getPath('newplugin') + 'mybuttonicon.gif' }); var cmd = editor.addCommand('OpenWindow', { exec: showMyDialog }); } }); function showMyDialog(e) { window.open('/Default.aspx', 'MyWindow', 'width=800,height=700,scrollbars=no,scrolling=no,location=no,toolbar=no'); }I'm using CKEditor version 3.3.2
Good luck, and sorry for my bad english.
JL
(Portugal)