Skip to content

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.

3 participants