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

Text formatting of token text nodes #6059

Closed
lacroixdavid1 opened this issue May 8, 2024 · 1 comment
Closed

Text formatting of token text nodes #6059

lacroixdavid1 opened this issue May 8, 2024 · 1 comment

Comments

@lacroixdavid1
Copy link
Contributor

lacroixdavid1 commented May 8, 2024

The RangeSelection.formatText function does not format token text nodes between the range selection. Is there a reason why? I wish I could have text nodes that support rich-text formatting and still behave like text nodes. Any solutions?

Reference:

if (!textNode.isToken()) {

EDIT:

if (firstNode.is(lastNode)) {

The above IF occurring when only a single node is selected allows token text node to be formatted. I don't see any reason why nodes in the middle of the selection shouldn't be formatted either. This behaviour is inconsistent. I can open a Pull Request if you are open to this.

Thank you!

@lacroixdavid1
Copy link
Contributor Author

Closing as PR was merged.

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

1 participant