As a continuation of Creating node should automatically add "<br>".

How about an option near the text box to say what style you want. HTML (current style), TEXT and as a plus POD and ePod.

Will be very nice to can write our posts this:


HTML (the current style just for comparison).
This is just a sample <p> Here's a new paragraph and a <b>bold</b> word. <p> Now some code: <code> #!/usr/bin/perl print "Hello World!\n" ; exit; <//code> Some itens: <ul> <li>item 1</li><br> bla bla bla <p> <li>item 2</li><br> bla bla bla <p> <li>item 3</li><br> bla bla bla <ul> By!
output

This is just a sample

Here's a new paragraph and a bold word.

Now some code:

#!/usr/bin/perl print "Hello World!\n" ; exit;
Some itens: By!
TEXT
This is just a sample Here's a new paragraph and no support for bold. Now some code, since the only tag suported is code: <code> #!/usr/bin/perl print "Hello World!\n" ; exit; <//code> Some itens: * item 1 bla bla bla * item 2 bla bla bla *item 3 bla bla bla By!

output

This is just a sample

Here's a new paragraph and no support for bold.

Now some code, since the only tag suported is code:

#!/usr/bin/perl print "Hello World!\n" ; exit;
Some itens:

* item 1 bla bla bla

* item 2 bla bla bla

*item 3 bla bla bla

By!


POD
This is just a sample Here's a new paragraph and a B<bold> word. Now some code: #!/usr/bin/perl print "Hello World!\n" ; exit; Some itens: =over 4 =item item 1 bla bla bla =item item 2 bla bla bla =item item 3 bla bla bla =back By!

output

This is just a sample

Here's a new paragraph and a bold word.

Now some code:

#!/usr/bin/perl print "Hello World!\n" ; exit;
Some itens: By!
ePod
This is just a sample Here's a new paragraph and a B<bold> word. Now some code: #!/usr/bin/perl print "Hello World!\n" ; exit; Some itens: *> item 1 bla bla bla *> item 2 bla bla bla *> item 3 bla bla bla => A sub title Some test => By Enjoy!

output

This is just a sample

Here's a new paragraph and a bold word.

Now some code:

  #!/usr/bin/perl
  
  print "Hello World!\n" ;
  
  exit;

Some itens:

A sub title

Some test

By

Enjoy!


Now some sample code to enable this 3 new styles:

TEXT:

$input =~ s/\r\n?/<p>\n/gs ; # after this is just the normal process for HTML (current process).
POD:
use Pod::HtmlEasy ; my $p = Pod::HtmlEasy->new() ; $input = $p->pod2html($input , only_content => 1 , no_index => 1 ); # note that Pod::HtmlEasy can personalize the content generation, # where is possible to handle VERBATIM data directly to <code> # after this is just the normal process for HTML (current process).
ePod:
use ePod ; $input = epod2pod($input) ; # after this is just like POD process: use Pod::HtmlEasy ; my $p = Pod::HtmlEasy->new() ; $input = $p->pod2html($input , only_content => 1 , no_index => 1 );

In reply to How about different input styles when posting? (HTML , TEXT, POD, ePod...) by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.