Merged
Conversation
Co-authored-by: Artem Nistuley <artem@superdoc.dev>
…rt (#2832) * feat(executor): add tab character to tab node conversion in text insert * feat(executor): enhance text insertion to handle restrictive parent content for tab nodes - Introduced a new integration test for the `executeTextInsert` function to validate behavior when inserting text into nodes that disallow tab nodes, specifically for the `total-page-number` type. - Updated the `executeTextInsert` function to check if the parent node allows tab nodes before creating them, ensuring that raw tab characters are preserved as text when necessary. - Added a utility function `parentAllowsNode` to determine if a node type can be inserted based on the parent's content match. * feat(tabs): implement tab handling in text insertion and document extraction - Introduced `buildTextWithTabs` and `textBetweenWithTabs` functions to manage tab characters, converting them to tab nodes during text insertion and ensuring they are correctly represented in document extraction. - Updated existing commands (`insertHeadingAt`, `insertListItemAt`, `insertParagraphAt`) to utilize the new tab handling functions, enhancing text formatting capabilities. - Modified tests to validate the new tab handling behavior, ensuring that tab characters are preserved and correctly processed in various scenarios. - Added comprehensive tests for the new helper functions to ensure robust functionality across different document structures. This update enhances the editor's ability to handle tab characters, improving the overall user experience when working with formatted text.
Contributor
|
🎉 This PR is included in esign v2.4.0 The release is available on GitHub release |
Contributor
|
🎉 This PR is included in superdoc-sdk v1.7.0 |
Contributor
|
🎉 This PR is included in superdoc v1.28.0 The release is available on GitHub release |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.