Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sourcedialog to plugins #260

Closed
wants to merge 1 commit into from
Closed

Add sourcedialog to plugins #260

wants to merge 1 commit into from

Conversation

GCorbel
Copy link

@GCorbel GCorbel commented Apr 14, 2013

Hello,

This is a just a pull request to add sourcedialog to the plugins list.

Thanks for your job!

@gabrielgarza
Copy link

This is a great pull request.

I would really love it and appreciate it if someone could accept this request very soon!

Thanks!

@gabrielgarza
Copy link

Yes, this worked!

I removed the code that was changing the toolbar and it worked:

editor.on( 'configLoaded', function() {           
     editor.config.extraPlugins = 'sourcedialog';
  });

However, seems that the full toolbar with all buttons appear. Is there a way to remove certain toolbar buttons and still make the Source button work? I can remove some button groups by removing plugins with:

editor.config.removePlugins = 'find,flash,forms,iframe,image,newpage,smiley,specialchar,stylescombo,templates';

but with this approach you can't move their position and can't decide to add/remove specific buttons.
Thanks for your help!

@gabrielgarza
Copy link

Got it to work!

The key was to specify it as 'Sourcedialog' instead of 'Source' while changing the toolbar.

editor.on( 'configLoaded', function() {  
    editor.config.toolbar = 'Full';

    editor.config.toolbar_Full =
    [
        { name: 'document', items : [ 'Sourcedialog' ] },

        { name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },

        { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'] },

        '/',
        { name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },


        { name: 'insert', items : [ 'Table','HorizontalRule','SpecialChar' ] },
        { name: 'colors', items : [ 'TextColor','BGColor' ] },
        '/',
        { name: 'styles', items : [ 'Styles','Format','Font','FontSize' ] },
        { name: 'links', items : [ 'Link'] },
        { name: 'tools', items : [ 'ShowBlocks' ] }
    ];

    editor.config.extraPlugins = 'sourcedialog';
});

Thanks again for your help.
Hope they accept your pull request soon.
Cheers

@galetahub galetahub closed this Sep 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants