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.

Document what commands are available and how to use default functionality in custom buttons

See original GitHub issue

Version

3.0.0

Development Environment

Chrome on Windows 10

Current Behavior

editor.exec can be used to invoke commands, but the API documentation does not list which commands are available and what they do.

Also it is not documented how one would make use of the functionality of default buttons like Headings and Insert Table when creating a custom toolbar. In v2 there was an undocumented event property that could be used, but i could not determine how to do this in v3.

It would be helpful if these things were documented and accessible when creating custom buttons/toolbars.

Expected Behavior

Available commands and how to use them is documented. Things like the Headings and Insert ... popups can be used again in custom toolbars/buttons.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
js87zzcommented, Feb 10, 2022

@oraculum @Alyw234237 I checked it too late.😂🙏 You can add a heading node as below.

// level is heading level
editor.exec('heading', { level: 2 })
// If you want to fill the text, call insertText API
editor.insertText('heading')
1reaction
Alyw234237commented, Dec 12, 2021

Hello. I just wanted to check if there are any updates on this. I would also like to use custom UI buttons (and keyboard shortcuts) to toggle headings (H1–H6). It would be really helpful to have something like editor.exec('heading', [...]) for this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use a command button to start an action or a series of actions
Customize a command button · Select the command button. · Click either Move Up or Move Down on the Arrange tab. The command...
Read more >
Word 2016 - Customize the Ribbon Commands - How to Add ...
This Microsoft Word 2016 tutorial shows you how to use the MS Word Options dialog box to customize your Ribbon in Office 365....
Read more >
Microsoft Access Buttons: Use Command Buttons to Navigate ...
In this video, I'm going to show you how to use Command Buttons to navigate through the records, close a form, or open...
Read more >
How to Use Buttons, Check Boxes, and Radio Buttons
Ordinary buttons — JButton objects — have just a bit more functionality than the AbstractButton class provides: You can make a JButton be...
Read more >
Access Frequently Used Features and Commands from the ...
The default quick access toolbar contains actions to copy, cut, paste, open the Favorite Commands menu, and access the documentation. You can restore...
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