[css3-regions][css3-multicol] how to cutt up elements

Hey,
given that CSS Regions unfortunately have been (temporarily) removed from
Blink, I've been experimenting with what other options there are to cut op
content, but letting the browser do the actual cutting.

The only solutions I have come up with is using multiple CSS columsn and
then to determine where one columns ends
using caretPositionFromPoint/caretRangeFromPoint, and then cutting using
range.extractContents to remove the parts that don't fit.

I have recreated most of the options I had available in the old
pagination.js using this method in this test:
http://fiduswriter.github.io/simplePagination.js/simplePagination.html(working
in Chrome and Firefox if the browser is occupying the entire
screen).

It is somewhat of a hack,
because caretPositionFromPoint/caretRangeFromPoint only works if one first
scrolls to the place where one uses it.


So my question to you guys: Is this how you suggest one cuts up contents?
Is there no less hackish way envisioned for javascript to determine what
content belongs to one specific column? It seems like that would be quite
an important piece of information for many uses.

-- 
Johannes Wilm
Fidus Writer
http://www.fiduswriter.com

Received on Tuesday, 15 April 2014 20:05:57 UTC