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

Add method to change block type #470

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kyselberg
Copy link
Contributor

I found it very useful to use this function to set header tags (e.g. h1, h2, h3).

this.editor.changeBlockType('h1');
this.editor.changeBlockType('h2');
this.editor.changeBlockType('h3');

To be clear, it's your @neilj example from this PR.

If this type of method doesn't fit to the Squire's philosophy or plans right now, then could we expose couple "private" methods so we can build more upon the Squire (the best open-source editor out there imho) and not patch anything.

@legendetm
Copy link

This would be very helpful. With Squire 1.x it was possible to extend Squire, but with 2.x rewrite the internal method are not accessible anymore (not exported) and this makes extending very complicated (e.g. getBlockWalker, empty). Also the source is not included in package.

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.

2 participants