Comments (5)
If you play around with Microsoft Word's track changes, they merge blocks, with the difference that they keep track of block boundaries so you can reject/restore changes.
If it is overly problematic to retain block merging, then I would consider getting rid of it.
from ice.
It's not impossible to keep it the way you have it right now. Right now it's there as an option that can be turned on or off.
But the question is what to do if you delete over a boundary between a list and a p-element. Or an H1-element and a p-element. To me it would seem wrong if the p-element merges into the list or the headline. So I would like to keep it only for merging p-elements with other p-elements or possible always merging equal elements (H1 with H1, ul with ul, ol with ol, etc.) and leavign block boundaries if two elements of different types meet.
I don't know your guys'es usecase that well. It would seem to me that if you do merge blocks, you'd want to keep track of the block boundaries so you can restore them in case you don't like the changes at all (the way you describe MsWord). Is that not a concern?
from ice.
Merging was a preference since that is the way MsWord handles when deleting from block to block. Also, if blocks aren't merged, then it forces the implementer to remove empty blocks when cleaning since they will be emptied by ice during cleaning.
It's just a preference and I would be willing to remove it, especially if it introduces a lot of work when we support more blocks.
from ice.
Ok, I have added simple tests for deleting images and lists from the left and right and made it all work in Firefox and Webkit. Further tests should be made whenever one comes across a problem, I would think.
I have also removed the mergeBlocks option.
The changes overall are in a few extra functions I have added to dom.js, and in ICE a rewrite of _deleteFromLeft, _deleteFromRight, _deleteFromSelection as well as replacing the _addTextNodeTracking function with an _addNodeTracking function that can cover other things than text nodes. It can be used to move the range, but if you don't hand it a range, it can work with just marking the node for deletion as well. I initially pulled from some earlier trials of getting images and lists to work with ICE, and have then developed that further.
I think it is a good idea to take it piecemeal, but in the case of the rewrite of these functions, one almost has to look at them in their entirety. I have tried to comment as much as possible.
from ice.
Closing this since we finished #49 where we decided to remove the block merging.
from ice.
Related Issues (20)
- Text removed with delete button is not tracked
- Update library
- Help Wanted - Looking for maintainers HOT 17
- Track changes not working for CUT and PASTE HOT 1
- adding track changes in tinymce 4.4.3 HOT 1
- Ice not found in jsDelivr HOT 1
- Ice not tracking mark and insert
- Firefox 52 and tinyMce 4.6.0
- Question: How would I use this with react-tinymce HOT 1
- Support for Froala editor? HOT 1
- trackchange default off HOT 2
- Backspace deletion is not tracked in Firefox 65.0.1 HOT 2
- Track Changes for Tinymce 5 HOT 8
- How to customize tracker.AcceptAll() to accept all the changes from multiple TinyMCE editors
- with track changes on , backspace between two paragraphs deletes extra char
- Port to Quill editor?
- Ice is not defined HOT 1
- Selection in numbering,bullets and alphanumbering doesn't redline on tracking changes
- Online Contract Editor problem HOT 2
- Publish NPM package
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ice.