How to make auto break new line Text in FabricJS? - html5-canvas

I want to make auto break new line Text when user typing a long text. Text's width is fixed ( behavior like attach video ). And user can drag middle left & middle right control point to change Text's width.
How to make that Text in fabricJS ?
!
Thank you!

Related

Label position in TradingView using Pine Script

How to make a label always stick to the right end of the screen even when we drag the chart to the left. Simply I need it to behave exactly like the label of the built in Horizontal line tool.
Thanks

Editable TableOfContents boxes in each Powerpoint slide header

I would like each slide in my Powerpoint 2013 presentation to have at the top an outline showing the location within the current chapter, something like:
I would like Powerpoint to create new slides based on this slide template, so I edited the Title+Content slide-type as above, in the Slides Master; I used the slide's default Title box for the title of my first section (Intro), then copied/pasted that box to obtain the boxes for the other presentation sections (Methods, Results).
I expected that, in the newly created slides, I'd be able to edit each of these boxes (highlight current section & current slide position), so as to suit the slide where I am at the moment, in terms of title and current slide.
However, I can only click inside the first box (the default one that Slide Master gave me) whereas the others are just "drawn" in the background. Also, even after clicking in that first box, the existing text disappears rather than being editable.
Also, is there a way to automate this slide layout somewhat? I used white/black dot circle symbols to indicate within-section current-slide number, but is there a smarter way to make this in Powerpoint based on slide count within the current section?
At the very least, I'd like to have editable text boxes at the top of each new slide, with pre-determined names that can nonetheless be edited, and (imporantly) that can be updated all at once from the Slide Master, in case I decide to change my chapter/section names.
Not a trivial task for Powerpoint, I know, but I'm hoping that the knowledgeable good people on here might give some good suggestions/workaround, for which I am grateful in advance.
You can trick PowerPoint into adding editable shapes to the slide master by inserting a text placeholder and changing to shape to your desired shape. A little clunky but it works.
See this link.
Alternatively, you could write some PowerPoint VBA to create the slides with the desired objects.
Update
I use PowerPoint 2013. I downloaded your PPT. I wasn't sure whether you were referring to the textbox with the text "replace text ... " or the main text box for the slide. I'll assume you're referring to the textbox with the text "replace text ... " (mind you ... the answer is still the same).
It looks like you're adding a text box to the slide master (which is not what I think you want). Add a text placeholder like the screen shot below which you add from the Slide Master ribbon. Once added you can change the default text formatting (which is a set of bullet points), and you can change the shape (in this example to a rounded rectangle). I don't believe (?) that its possible to create default text for the text placeholder in Slide Master that appears as default text when the default slide is created using the master.
Then when you leave master mode, you have an editable text box. If you reset the slide, this shape reverts to its default formatting and position, but any text you've added is retained.
You can also change the default text box on the slide master in the same way (shape, shape formatting and text formatting).

How do I shift a set of lines one space to the right within a text editor?

How do I shift a set of lines one space to the right within a text editor?
If I wanted to shift a set of lines several spaces to the right, I would perform:
selected text + Tab
However, I just want to shift the text one space to the right without tabbing.
Any suggestions?
Hold down the alt key, left-click and hold the mouse button down on the first line where you wish to insert your space. Then, while still holding down the left mouse button, drag the mouse vertically to extend this edit point to all the lines you want to move. Dragging it horizontally will create a box selection, which you want to avoid, as the selected text will end up being replaced, rather than a space be added.
Also, you cannot select individual, disjoint lines to move. You can only use alt-drag over a contiguous block of lines.
Once you have your multiline edit point created, hit the spacebar once.
Tada.
Here's a blog post by Scott Guthrie with more details and a vidya demo
If you don't want to use the mouse, you can use shift+alt+(up, down, left, or right) to create a box selection, or a multiline edit point.

How can I change size between lines in Unity3D's GUILabel

For my GUI I am using GUILabel.
How can I change the size between lines?
Unlike a GUIText there is no way to set line spacing for a GUILabel.
While a GUILabel is able to show multi-line text, to adjust the spacing you would have to insert extra newlines or modify the font used.
You can change the line height if you create a editable copy of the font, you just have to click in the font (in the Assets panel), go to the gear icon of the Inspector panel and click "Create Editable Copy". The new copy on the Assets panel has a parameter called "Line Spacing" that you can modify at will.
I think you need to assign a GUIStyle to your label then you can use:
http://docs.unity3d.com/Documentation/ScriptReference/GUIStyle-lineHeight.html
== EDIT ==
lineHeight is readonly ... seems not possible currently.. try modifying the font instead

Does Visual Studio have center of screen typing mode? I.e. keep focus of input in vertical middle of screen

Can I get the editor to keep the current input in the vertical center of the window?
So that the page text auto scrolls.
I found something useful for what I wanted, but would still like centered typing focus mode.
Ctrl+↑ – moves view up one line at a time, so the text scrolls 'down' one line at a time
Ctrl+↓ – moves view down one line at a time, so the text scrolls 'up' one line at a time

Resources