performant-software / DM

DM is an environment for the study and annotation of images and texts. It is a suite of tools, enabling scholars to gather and organize the evidence necessary to support arguments based in digitized resources.
https://digitalmappa.org/
Other
18 stars 6 forks source link

Text format safeguarding #139

Closed akstuhl closed 7 years ago

akstuhl commented 7 years ago

What does this PR do?

When their contents have changed, text editors will check for the kind of style map attached to blocks of rich text when they are pasted in. If found (if text has just been pasted in), the editor will convert the generic class names used in the style maps into unique names. This will prevent the collision of repeated class names in rich text blocks pasted in at different times or in different documents.

What issues does it address?

Closes #68 (removes need for nuclear option), closes #138

How to test

SteveMarvin commented 7 years ago

Formatting is pretty bulletproof. I do get some formatting spill from existing text onto pasted text, especially when I paste within a block of existing text, but that is to be expected.

Breakdown comes when opening a read-only version of a heavily formatted text resource. The formatting changes markedly, including spacing and even font changes, such as from serif to sans serif.

screen shot 2017-07-20 at 10 58 04 am