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

Allow toolbar to be multiline #1244

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

noirbizarre
Copy link

@noirbizarre noirbizarre commented Nov 13, 2016

Sometimes, depending on the number of enabled buttons,
it's necessary to split them on two (or more) lines.

This PR allow to specify multiline toolbar buttons by nesting arrays:

var editor = new MediumEditor('.editable', {
    toolbar: {
        buttons: [
            ['bold', 'italic', 'underline', 'strikethrough', 'superscript', 'subscript', 'pre'],
            ['h2', 'h3', 'justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull', 'quote'],
            ['orderedlist', 'unorderedlist', 'outdent', 'indent', 'anchor', 'image', 'removeFormat']
        ],
    },
   buttonLabels: 'fontawesome'
});

A demo has be added to see the rendering for each theme.

Some examples with flat, bootstrap and tim themes:

screenshot-multiline-flat
screenshot-multiline-bootstrap
screenshot-multiline-tim

@noirbizarre noirbizarre force-pushed the multiline-toolbar branch 2 times, most recently from 27cf587 to 10d7990 Compare November 13, 2016 21:10
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 14bdf87 on noirbizarre:multiline-toolbar into * on yabwe:master*.

@zuck
Copy link

zuck commented Aug 26, 2017

Any chance to get it merged?

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