Usage documentation for posting in this blog

Edit this page | Edit master html

Please follow these simple instructions to post in this blog:
1. To create a syntax highlighted code like this:
 if(Objects.equals(pwd, lm.getEnteredPwd()) &&
                Objects.equals(un, lm.getEnteredUn())){
            lm.allowLogin(v);
        }
use the <pre></pre> tags. Write your code between these days. <pre> paired tag will preserve the format of your code exactly as you posted it. You can add additional classes to specify distinct language. ie. class="brush: java" is used for the given example here.
In the specific example given above, the <pre class="brush: java">...</pre> is used. The raw code is pasted between the <pre> tags. There can be several brushes. You can refer to the documentation on this page, to know more about the kinds of brushes that you can use.
Additional Note: Be Careful while formatting the content within pre-tag in blogger's compose window. You should never use automatic formatting like "justification", "right", "left", 'font change', 'highlight' etc. That can affect the content in the tag as the Syntax Highlighter js will assume that those changes are also a part of the code. It can look ugly; something like this:
if(Objects.equals(pwd, lm.getEnteredPwd()) &&
Objects.equals(un, lm.getEnteredUn())){
lm.allowLogin(v);
}
Users are highly recommended to only use html edit window while making changes relating to <pre> tag pages 

2. To make blockquotes like this:
Note: This part of the article is important
You should enclose the content between <blockquote>...</blockquote> tags. Or you can simply use the blockquote button that is available in the toolbar of Compose window in blogger's post editor page.

1 comments:

  1. Based on my experience using blogs, the detailed instructions on using code snippets and blockquotes are very helpful. However, to avoid unwanted formatting issues, I advise you to use the HTML editing window directly instead of Blogger's editor. This will help preserve the formatting of the code and quotes more accurately.
    Easy mehndi design

    ReplyDelete