From SpinetiX Support Wiki

Jump to: navigation, search


Forcing line breaks

  • You can use the .tbreak() method to force line breaks.
  • .tbreak() works exactly like .tspan() but inserts a line break instead of text.

Source code

      var layer = $.textArea({
        left: 240,
        top: 60,
        width: 800,
        height: 600,
        textAlign: 'start',
        fontFamily: 'Georgia',
        fontSize: 36,
        lineIncrement: 48

      var txt = $.tspan( "I quite agree with you." );
      txt.tspan( "And the moral of that is:" ).tbreak();
      txt.tspan( "Be what you would seem to be." ).tbreak();

      layer.text( txt ).addTo( 'svg' );



This page was last modified on 9 August 2017, at 17:21.