summernote
summernote copied to clipboard
Rework bullet points
What does this PR do?
Working with bullet points was sometimes problematic when whitespaces were present. Copy & Paste also caused some trouble. This PR modifies the bullet point functions For this to work, the dom and range class were extended by adding some helper functions.
Where should the reviewer start?
- best is to start with dom.js and range.js and check the additional methods.
- bullet.js contains major changes
How should this be manually tested?
- use the editor to create and modify lists (OL / UL)
Any background context you want to provide?
If a li-element contains formattings or additional elements (div, span), the splitNode function doesn't work well and creates some additional lines or refuses to split. This needs to be addressed in the future. The splitNode function was not modified by this PR.
What are the relevant tickets?
Screenshot (if for frontend)
Checklist
- [x] Added relevant tests or not required
- [X] Didn't break anything
Summary by CodeRabbit
Release Notes
-
New Features
- Enhanced DOM manipulation capabilities with improved empty node detection and traversal logic.
- Introduced methods for setting range endpoints and retrieving child nodes in the WrappedRange class.
- Improved handling of list and paragraph structures during indentation and toggling of lists.
-
Bug Fixes
- Refined Instagram URL matching for better embedding functionality.
-
Tests
- Updated tests for indentation functionality to reflect new behavior.
- Added tests for embedding Instagram reel URLs to ensure proper handling.