Difference between revisions of "Quote Lines"

From TED Notepad
m
Line 26: Line 26:
 
{{example_end}}
 
{{example_end}}
  
{{tip}} If you are writting a list (or a table) in an HTML document, you may write all the lines of such a list first without having to bother with HTML tags. Then select all relevant lines, invoke the {{feature|Quote..}} tool (hotkey {{hotkey|Alt+Ctrl+Q}}), and enter quoting phrase like {{string|<nowiki><LI></nowiki>}}.
+
{{tip}} Combine the {{feature|Quote..}} tool with the {{feature|Close..}} tool in order to write paragraphs or lists in HTML documents without having to bother with {{string|<nowiki><p></nowiki>}} and {{string|<nowiki><li></nowiki>}} tags while writing. Write all paragraphs first, each one on a separate line (you may use {{feature|word wrap}} (hotkey {{hotkey|Ctrl+W}}) to see paragraphs wrapped into several lines, since the {{feature|word wrap}} does not affect tools). When done, select all the lines and use both {{feature|Quote..}} and {{feature|Close..}} tools to add the {{string|<nowiki><p></nowiki>}} and {{string|<nowiki></p></nowiki>}} tags (or {{string|<nowiki><li></nowiki>}} and {{string|<nowiki></li></nowiki>}} tags) to each line.
 +
 
 +
{{example_start}}Example:
 +
{{example_body}}{{example_select|<nowiki>Great notepad!
 +
 
 +
Tabs, you need tabs for multiple documents. Cosmetic, supeficial,
 +
of course. But that's what people are looking for these days.</nowiki>}}
 +
{{example_end}}
 +
 
 +
{{example_start}}Result, quoting with {{string|<nowiki><li></nowiki>}} and closing with {{string|<nowiki></li></nowiki>}}:
 +
{{example_body}}<nowiki><li>Great notepad!</li>
 +
 
 +
<li>Tabs, you need tabs for multiple documents. Cosmetic, supeficial,</li>
 +
<li>of course. But that's what people are looking for these days.</li></nowiki>
 +
{{example_end}}

Revision as of 16:47, 28 April 2010

You see work in progress here; this section already reflects future TED Notepad version 6.0.0.14.
This section may contain incomplete, premature, or mistaken information, prone to change without notice.

Quote.. (Alt+Ctrl+Q)

Asks for a Quote phrase to work with and then quotes (i.e. indents) the selection with the specified phrase at the beginning of each line.

Optionally, only non-empty lines can be quoted, which ensures that empty lines are not modified at all.

Optionally, the quoting phrase may be inserted just after all leading white-spaces on each line. This way, any current line indentation is kept unmodified, and the quoting phrase is appended to that indentation, before the first graph (i.e. non-white-space) character.

Note: When quoting of empty lines is allowed, and leading white-spaces are to be skipped, special consequential case occurs. On empty lines, quoting phrase is simply appended, because leading white-spaces is all that those line contain.

Example: (an e-mail received from a user)
----- Original Message ----- Great notepad! Tabs, you need tabs for multiple documents. Cosmetic, supeficial, of course. But that's what people are looking for these days.
Result, using Quote: >_ and Quote non-empty lines only checked:
----- Original Message ----- > Great notepad! > Tabs, you need tabs for multiple documents. Cosmetic, supeficial, > of course. But that's what people are looking for these days.

Tip: Combine the Quote.. tool with the Close.. tool in order to write paragraphs or lists in HTML documents without having to bother with <p> and <li> tags while writing. Write all paragraphs first, each one on a separate line (you may use word wrap (hotkey Ctrl+W) to see paragraphs wrapped into several lines, since the word wrap does not affect tools). When done, select all the lines and use both Quote.. and Close.. tools to add the <p> and </p> tags (or <li> and </li> tags) to each line.

Example:
Great notepad! Tabs, you need tabs for multiple documents. Cosmetic, supeficial, of course. But that's what people are looking for these days.
Result, quoting with <li> and closing with </li>:
<li>Great notepad!</li> <li>Tabs, you need tabs for multiple documents. Cosmetic, supeficial,</li> <li>of course. But that's what people are looking for these days.</li>