EEXCESS / c4

C4 - Cultural and sCientific Content in Context - is the EEXCESS context detection framework written in JavaScript. It provides supporting functionionality to enable easy user mining and querying for all EEXCESS clients. It supports for example Named Entity Recognition using the DOSeR Service, paragraph detection, Citation Buidling etc.
http://eexcess.eu/
1 stars 1 forks source link

[selection augmentation] set as paragraph #29

Closed schloett closed 8 years ago

schloett commented 8 years ago

If I remember correctly, a selection can only be set as paragraph, if it starts and ends within the same DOM-element. I think I have found a possible solution to overcome this issue: A new div could be added to the body, with position:absolute. This div should provide the visual bounding box for the selected paragraphs. Thus, it may not wrap these paragraphs (and crash) the layout, but act as an overlay to these paragraphs, with the top left corner position being the same as the top left corner of the top left element in the selection. With and height need to be adjusted such, that the div ends at the bottom right corner of the bottom right element in the selection. The newly added div should have transparent background and should be passed to the provided function for the "set as paragraph" function (as then the caller can set a border as desired).

treml05 commented 8 years ago

This new version is done. Now every selection can be handled as paragraph.

treml05 commented 8 years ago

Several new bugs were found and got fixed. (The div was drawn in the wrong position..)