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

Plugin discovery Feature #721

Closed
wants to merge 10 commits into from
Closed

Plugin discovery Feature #721

wants to merge 10 commits into from

Conversation

jbalsas
Copy link
Contributor

@jbalsas jbalsas commented Apr 6, 2017

Hey guys,

This is the final (hopefully) PR for this. On top of #718 I've added the final API as:

var editor2 = AlloyEditor.editable('editable', {
    extraPlugins: AlloyEditor.Core.ATTRS.extraPlugins.value + ',ae_uibridge,ae_buttonbridge',
        toolbars: {
            styles: {
                selections: [
                    {
                        name: 'text',
                        // Should add the buttons ['Bold', 'Italic', 'Underline', 'link', 'twitter']
                        buttons: AlloyEditor.getButtons(['basicstyles', 'link', 'twitter']),
                        test: AlloyEditor.SelectionTest.text
                    }
                ]
            }
        }
    }
);

Thanks! 🤞

@ipeychev
Copy link
Contributor

ipeychev commented Apr 6, 2017

Just started reviewing :)

:octocat: Sent from GH.

@jbalsas
Copy link
Contributor Author

jbalsas commented Apr 6, 2017

Also, following the tutorials in http://alloyeditor.com/guides/ckeditor_plugins/ui_button/, this could be used as:

var selections = AlloyEditor.Selections;
var textButtons = selections[3].buttons; // ['styles', 'bold, 'italic', 'underline', 'link', twitter']
var moreButtons = textButtons.concat('undo'); // ['styles', 'bold, 'italic', 'underline', 'link', twitter', 'undo']

selections[3].buttons = AlloyEditor.getButtons(moreButtons); // should show ['styles', 'bold, 'italic', 'underline', 'link', twitter', 'Undo', 'Redo']

@ipeychev
Copy link
Contributor

ipeychev commented Apr 6, 2017

Thank you, pull request merged! See changes here.

:octocat: Sent from GH.

@ipeychev
Copy link
Contributor

ipeychev commented Apr 6, 2017

Great job, Chema! This is an awesome feature, a very useful one!
Thank you too, Julien, you did very good job too!

@julien @jbalsas

@ipeychev ipeychev closed this Apr 6, 2017
@jbalsas
Copy link
Contributor Author

jbalsas commented Apr 6, 2017

Victory Dance!! 🎉

victorydance

@ipeychev
Copy link
Contributor

ipeychev commented Apr 6, 2017

:)

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.

2 participants