question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Toolbar - choose type of heading to display in style option

See original GitHub issue

Hi everyone, awesome job here. I’m playing with the editor but cannot find a way to tell the toolbar option I want only the h1, h2 and code formatting. Is there a way? Am I doing something wrong? Tried like this:

   ... toolbar: [
            ['mybutton', ['hello']],
            ['style', ['h1', 'h2', 'code']], // <--- here
            ['font', ['strikethrough', 'superscript', 'subscript', 'bold', 'italic', 'underline']],
            ['para', ['ul', 'ol', 'paragraph']]
        ] ...

But no luck, any idea?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5

github_iconTop GitHub Comments

4reactions
flaushicommented, Jun 8, 2019

This does work for me:

     toolbar: [
            ['style', ['style']],
            ['font', ['bold', 'italic', 'clear']],
            ['color', ['color']],
            ['para', ['ul', 'ol', 'paragraph']],
            ['table', ['table']],
            ['insert', ['link', 'picture', 'hr', 'codeview']]
        ],
        styleTags: ['p', 'h1', 'h2', 'h3', 'h4', 'h5'],
        tableClassName: 'table table-bordered table-striped',
        codemirror: {
            lineNumbers: true,
            theme: 'monokai'
        },...
2reactions
bariewcommented, Jun 8, 2019

does not work for me

toolbar: [ [‘style’, [‘style’, ‘code’]], ] , styleTags: [‘h1’, ‘h2’]

‘style’ is not only the name of the group but also a button with available tags dropdown

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add and remove styles from the Quick Styles gallery
On the Home tab, click the Styles Dialog Box Launcher. · In the lower-right corner of the Styles pane, click Options. · Under...
Read more >
Display Document Styles - Suzanne S. Barnhill
Apply Styles toolbar. The keyboard shortcut Ctrl+Shift+S will open the Apply Styles toolbar. This small floating toolbar can be dragged anywhere on your...
Read more >
Displaying the Styles You Want Displayed - Word Ribbon Tips
Using the Select Styles to Show drop-down list choose In Current Document. Click OK. The styles that appear in the Styles pane are...
Read more >
How to Display All Available Styles in a Word Document ...
By default, only some of the available styles (including heading styles) are displayed in the Home tab in the Ribbon. There are 9...
Read more >
How to Create a Custom Heading Style in Microsoft Word
Right-click the text, and then select Styles from the Mini toolbar. Styles button in the Mini toolbar in Word 365. Figure 5. Styles...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found