How to do I stop text from overflowing from input - html

Say I type in 5000 words in a textarea box that gets stored in a database and then call it onto the page. What can I do so it stops at a certain point and travels starts on the next row?

You can use word_wrap
$formated_string = wordwrap($str,1000,"<br>",true);
http://www.php.net/manual/en/function.wordwrap.php

Related

Close tags dropping below highlighted line

I have minimal experience with HTML script so this may all go horribly wrong here.
Alright so I have a very simple yet very time consuming task of taking complete papers and converting them into HTML script. I'm using Sublime Text 3 with Emmet plugin.
Basically,
This is the first header
This is the first paragraph that needs to be tagged
This is the second header
This is the second paragraph that needs to be tagged
So super simple I need to put header tags on the headers and paragraph tags on the paragraphs.
What I have been doing is holding Ctrl and manually highlighting the desired text as it is all rather random. Problem is that takes forever to manually highlight the text like that.
I am aware of other ways to highlight such as Ctrl + L for the line. Problem is my close tags end up under the highlighted line.
Example:
<h2>This is the first header
</h2><p>This is the first paragraph that needs to be tagged
</p>
It's not a big deal but it makes the code harder to go through later and really chaotic.
The same problem persists if I click the corresponding number of the line.
Seeing as I have hundreds of pages to enter and even more headers, paragraphs, and pictures to properly tag; I'm looking for a solution to the tag dropping below the line or a faster method to entering text.
So, is there a fast method for entering text from a word document to Sublime text and quickly get the corresponding tags? e.g. <h2>,<h3>,<p>,<ul>,<li> and so on.
Any help will save my sanity, thanks.
When you select a line with CtrlL, it automatically selects the entire line, and moves the cursor down to the first position on the following line. There are two ways around this. The first is to place the cursor in the first position on the line you want to select, then just hit ShiftEnd and the line will be selected, with the cursor now sitting in the last position on that same line. Alternatively, use CtrlL, then hit Shift← (left arrow) to move the cursor from the first position on the next line to the last position on the selected line. Either way, you can now hit the key combo in Emmet for inserting a tag pair, and you're all set.

ST2 -- split_selection_into_lines -- left side of block

Is it possible to split_selection_into_lines at the left side of the block, instead of the right?
It would be nice to select several lines (in one fell swoop) and then type something that will precede each line. I have been using the command+left-click for the left-hand margin, but it is difficult to know whether each line has actually been selected because each line is vertically aligned (e.g., flush-left) -- it is also time consuming to select each line manually.
A simple way is to just find-replace, and replace a delimiter with "\n [text that precedes this line]"
After selecting "split_selection_into_lines" (ctrl+shift+l), the keyboard shortcut command+left-arrow moves multiple cursors the left side of the highlighted block.
Alternatively, holding down the option(alt) key and holding down the left click on the mouse lets the user select everything within a vertical line that is defined by moving the mouse up or down.
https://tutsplus.com/lesson/multiple-cursors-and-incremental-search/

How could I recreate this using a table or matrix (Merging cells)

Here I have a manually created table using textboxes inside of a list object:
The problem with this is that if one of the textboxes has too much text only it will grow while the others will remain the same height.
Now the other issue is you can't merge two cells in the same column (vertical merge). Is there a way using a combination of controls that I could replicate what is in the picture such that if the Release Description textbox has too much text in it and it grows the other controls will grow along with it?
Two suggestions:
1) If you want to keep your current workaround, and wish to avoid the growing of your textboxes you can set the CanGrow property to False.
A UI solution for the long text will be using ToolTip: Lets say that your textbox can contain only 60 chars, in the textbox expression use the following:
=iif(Len(Fields!YourField.Value)>60, Left(Fields!YourField.Value,57) + "...",Fields!YourField.Value)
means that only 57 charecters will be displayed in the text box, the full text should be display will hovering the textbox (using tooltip).
2) If you want to merge cells vertically you can do some workarounds.
You can place a table inside another table's cell, that way using several tables you can perform your desired output.
Attaching sample of using table within another table (I use 3 tables):

What is the name of this type of control and how can I implement one?

This is kind of out there, but I have no idea what this type of control is even called, so I can't look up any examples on how to implement it.
The control has two text areas side by side with arrows in between them. If a user selects a value or multiple values in one text area and then clicks the arrow that points to the other text area, the selected values will jump over to the other text area and be removed from the initial text area.
What is this called?
There's no one control. Usually it's implemented with 2 <SELECT> list boxes, the arrows have javascript functions attached to take the selected values in the one listbox and move them to the other. Ie. delete from one box and add to the other.
Take a look at this example I found via Google:
http://blog.jeremymartin.name/2008/02/easy-multi-select-transfer-with-jquery.html

Detecting if particular string is currently visible on TextField()

I have a TextField() with a quite long text , sometimes last lines are not visible on screen (without scrolling).
Now I want to detect if e.g. word IBM is currently visible on screen, or is it outside of screen. Any ideas how to do this? I want to display this particular word IBM by scrolling myself the textField() to the right position.
Check the documentation of the getLineIndexOfChar() to determine the line which contains a given character, then compare the retreived value with scrollV and bottomScrollV to determine if the given line is visible or not.