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

Extend shorthand menu options to include List and Headings #388

Open
maheshwaricharu opened this issue Oct 25, 2024 · 1 comment
Open

Extend shorthand menu options to include List and Headings #388

maheshwaricharu opened this issue Oct 25, 2024 · 1 comment

Comments

@maheshwaricharu
Copy link

Hi @givanz
We need to extend the shorthand menu in Editor to include Headings(h1,h2,h3,etc) and Lists (Ordered/Unordered). Please find attached the snapshot exactly which place I am referring to :
image
Please suggest is there an option to configure the same in the editor settings?
Thank you for your support in advance.

@givanz
Copy link
Owner

givanz commented Oct 28, 2024

Hi

You can add new buttons to text editor toolbar by adding the html to editor.html#L530-L535 and then add the event listener with the code to apply the style in libs/builder/builder.js#L683-L689

For headings you can use self.editorSetStyle("h1");

To insert new elements like lists at selection you can use iframeWindow.getSelection(); libs/builder/builder.js#L621

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

No branches or pull requests

2 participants