Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>What you really want isn't necessarily to insert ">" in the flowed text at the beginning of every line. What you really want is for every line in a given block to have a ">" at the left of it. </p> <p>You could potentially do the latter by:</p> <p>1) Creating an image of the ">" character, with its height from top to bottom equivalent to the CSS <code>line-height</code> value you plan on using. Apply that image as a background on the container of the text you want this "inserted" into. Have it repeat vertically, but not horizontally. Pad the container the width of the character/image.</p> <p>2) Have some javascript get the computed value of the <code>line-height</code> property for the container you're working with. Then, assuming you're not artificially setting the height of this container, the number of "lines" of text in the container is its <code>offsetHeight</code> divided by the computed line-height. At this point, create a separate container that has nothing but that number of >'s as its content. Position it to the left edge of your content container. </p> <p>Your larger question about whether you have access to the text-flow algorithm the browser uses via JavaScript is an interesting one, but I'm pretty sure the answer is no. However, as more developers start playing with the Canvas element, people are writing their own (Canvas has text drawing, but not its own flow-layout algorithm for text). You might want to see what the Bespin guys did (<a href="https://bespin.mozillalabs.com/" rel="nofollow noreferrer">https://bespin.mozillalabs.com/</a> - it's a text editor implemented using the Canvas) or check out the source of some of the sandbag/image textwrapping javascript libraries like jQSlickWrap (<a href="http://jwf.us/projects/jQSlickWrap/" rel="nofollow noreferrer">http://jwf.us/projects/jQSlickWrap/</a> ).</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload