2013-09-01 13:26 | Lable: Blog Func() |
minicode manual draft 草稿

minicode manual draft 草稿

[tit] @= <span style="font-size: 20pt; font-weight: bold;">
[/tit] @= </span>
[h1] @= <span style="font-size: 16pt; color: green;">
[/h1] @= </span>
[title1] @= <span style="font-size: 20pt; text-shadow: 0px 0px 3px #FF0000;">
[/title1] @= </span>
[hello1][/hello1] @= Just say hello.
[span_fake1] @= lt;span
[span_fake2] @= lt;/span&
minicode (variant of BBCode) - easy editing HTML


minicode is a lightweight markup language for miniroll easy editing, learn from BBCode.
The tags are indicated by square brackets [ ] surrounding a keyword.
It is designed for Blog, thus let through unsafe HTML like <script>.
minicode allow user to write HTML freely and unlimitedly.

  1. The minicode cannot nest:
    [url][/url] OK
    [b][url][/url][/b] This expression is ERROR!!!
    Because nest will be complex. In this situation, you can use HTML directly or use [lead_define].

  2. Difference between minicode and BBCode:
    [url][PHP Manual[/url]
    Note the tag option is close to the [tag] with a sigle square bracket:
    [tag]option]...[/tag], or [tag]...[option[/tag]
    Position of tag option depends on the implemented HTML sentence.
    Do not add newline in the tag option of a minicode, it will be failed.
Keywords and Usage:
  1. [code]
    while (ivec.size() != ivec.capacity())
    # Preformatted text for code:
    while (ivec.size() != ivec.capacity())

  2. [output]Reply from bytes=32 time=266ms TTL=37[/output]
    # Preformatted text for code with output style:
    Reply from bytes=32 time=266ms TTL=37

  3. [img][/img]
    # To insert an image:

    # The first expression omited the parameter for alt attribute.
    # It will be automatically converted to second expression with filename, or you can manually add.

  4. [url][/url]
    # A link to one page:

    # The second expression assigned a description text.

  5. [color]orange]Its name from the orange fruit.[/color]
    [color]#6495ED]Cornflower blue, a shade of azure[/color]
    [b]Bolded Text[/b]
    [small]Small Text[/small]
    # Color a part of a text or change font:
    Its name from the orange fruit.
    Cornflower blue, a shade of azure
    Bolded Text
    Small Text

  6. [last][/last]
    # Last modified date:
    Last modified: 2016-02-14 17:27:17

    # By the way: this page initially completed on 2013-09-02.

  7. [html]
    <script type="text/javascript">
    </script><br/>Newline here!
    # HTML retain:

    Newline here!

    # This expression will retain all HTML tags and javascript.
    # But one except: <br />, <br /> will be losted by second edit because of PHP function nl2br().
    # To retain newline tag, use <br/> instead.

  8. [h]h4]This is heading 4[/h]y[h]sup]4[/h]
    C[h]sub]hex[/h], ...
    # For some plain symmetrical HTML tags:

    This is heading 4

    Chex, ...

  9. [lead_define]
    [title] @= <span style="font-size: 20pt; text-shadow: 0px 0px 3px #FF0000;">
    [/title] @= </span>
    [hello][/hello] @= Just say hello.
    [/lead_define][title]My Title[/title]
    # Define hot minicode in a post.
    # You can define several minicode, but all need to be in one [lead_define].

    My Title
    Just say hello.

  10. [abst][/abst]
    # Indicate the end of abstract:
    # miniroll can not generate an abstract automatically.
    # You need use this tag that make a front part of a journal become an abstract.
Typesetting Guild:
  1. [html]
    <img style="float: left; margin-right: 10px; margin-bottom: 10px;"
    src="" alt="" />
    [/html]The quick brown fox jumps over the lazy dog. ...
    # Image float left:
    The quick brown fox jumps over the lazy dog.
    The quick brown fox jumps over the lazy dog.

  2. [html]<div style="float: left; margin-right: 10px; margin-bottom: 10px;">
    [html]<a class="m4_style" style="font-size: 12px;" target="_blank"
    href="">Rfcmarkup Tool</a></div>[/html]...
    # Div float left with Link:
    The quick brown fox jumps over the lazy dog.
    The quick brown fox jumps over the lazy dog.
    The quick brown fox jumps over the lazy dog.

  1. If the sentences are too complex, check them by W3C Markup Validator is a good idea.
  2. Block elements or margin may cause line spacing too large, delete a newline according to the situation.

Mechanism of minicode is base on "Search and Replace", the process is reversible and very simply.
It abbreviated commonly-used HTML tags to short keywords, the article can mix HTML.
The implemented HTML may contain a little comment markup <!-- -->, intend for reversion.
Some keywords of minicode depends CSS, the default CSS provided to show the predefined style.
For this page process: minicode -> HTML article -> this page (Encapsulated)


minicode of miniroll is writed by PHP, HTML version is HTML5.
You can view the source code from post.php.
Comments: 0


Email: (Won't be published.)
*Type the word:

Avatar support:
Comment needs to be plain text.
*: Required

Previous | Next page | 0-0