Indent first line BBcode

Post Reply
steven
Posts: 133
Joined: Sun Oct 01, 2017 3:08 pm

Indent first line BBcode

Post by steven »

This BBcode indents the first line in a paragraph or a single line of text 25 pixels. You can increase or decrease the pixel number to change the amount of indentation.

BBcode Usage:

Code: Select all

[Indent]{TEXT}[/Indent]
HTML Replacement:

Code: Select all

<div style="text-indent:25px";>{TEXT}</div>
Help line:

Code: Select all

Indent one line [Indent]TEXT[/Indent]
When used on a paragraph only the first line is indented.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

It is easier to keep formatting consistent by using a preset indentation. You may have situations where you want to use varying amounts of indentation in a post. The following code allows you to enter a number before the text to set the indentation in pixels.
 
Example of a line indented 50px.
 
BBcode Usage:

Code: Select all

[IndentX={NUMBER}]{TEXT}[/IndentX]
HTML Replacement:

Code: Select all

<div style="text-indent:{NUMBER}px";>{TEXT}</div>
Help line:

Code: Select all

[IndentX=NUMBER]TEXT[/IndentX]
Post Reply