thomas-institut / apm

Digital Edition web application for the Averroes Project
GNU General Public License v3.0
2 stars 0 forks source link

Editor reuses item id when splitting an item #27

Closed rafaelnajera closed 7 years ago

rafaelnajera commented 7 years ago

If formatting is removed in the middle of an item, the item is effectively split in two and should have two different item id. Currently the editor maintains the same id in the two parts and this produces a "duplicate item id" in the API call when saving

rafaelnajera commented 7 years ago

There doesn't seem to be a normal use case in which it is useful to split an item in two. In order to avoid the problem, the "clear formatting" button is disabled in selections entirely within an item thus preventing splitting. With this fix formatting can only be cleared on selections that include one of the ends of the item.