Ionaru / easy-markdown-editor

EasyMDE: A simple, beautiful, and embeddable JavaScript Markdown editor. Delightful editing for beginners and experts alike. Features built-in autosaving and spell checking.
https://stackblitz.com/edit/easymde
MIT License
2.45k stars 319 forks source link

How to hide toggle side by side and toggle full screen #134

Open bsde1234 opened 4 years ago

bsde1234 commented 4 years ago

How to hide toggle side by side and toggle full screen from toolbar?

And I would like to add a bootstrap button in toolbar which give out put like, <button class="btn btn-primary"></button>. Is it possible?

A-312 commented 4 years ago

Similar/Duplicate : https://github.com/Ionaru/easy-markdown-editor/issues/21

timonson commented 4 years ago

I would be interested in this, too. The reason is that side by side and toggle full screen make decrease the window size. I would rather just deactivate it.

Ionaru commented 4 years ago

You can completely customise the toolbar, for example this code

        new EasyMDE({
            toolbar: [{
                name: "bold",
                action: EasyMDE.toggleBold,
                className: "fa fa-bold",
                title: "Bold",
            }, '|', { // Separator
                ...
            }],
        });

Will show only the toggle-bold button and a separator, all others are hidden. You can use this method to add only the buttons you want to your toolbar.

Maybe not the easiest way, but it is possible.

dmcbane commented 4 years ago

You could just disable the standard buttons that you don't want.

  new EasyMDE({
            hideIcons: ['side-by-side', 'fullscreen'],
        });