B4J Library [B4X][Web] MiniHtml

Version: 0.08

Yet the potential or use cases of this library may be unknown as you can literally write plain HTML and save it as a file.

Example 1:
B4X:
H1.Text("Hello, World!")

Output:
Hello, World!
HTML:
<h1>Hello, World!</h1>

Example 2:
B4X:
Paragraph.up(main1) _
.Text("This is a ") _
.add(Span.Text("red text").addClass("text-danger")) _
.Text(" in a ") _
.add(Bold.text("paragraph"))

Output:
This is a red text in a paragraph
HTML:
<p>This is a
    <span class="text-danger">red text</span> in a
    <b>paragraph</b>
</p>

Example using HTMX:
GitHub: https://github.com/pyhoon/MiniHtml-B4X
 

Attachments

  • MiniHtml.b4xlib
    20.2 KB · Views: 29
Last edited:

aeric

Expert
Licensed User
Longtime User
Version: 0.08
Minor updates.

What's New:
  1. Add Plain module
  2. Update Document module
    • Add Append2 sub
    • Update AppendDocType sub
  3. Update Tag module
    • Add multiline sub
    • Add small tag in Initialize sub
    • Update build2 sub
    • Update meta_preset sub
    • Update PrintInnerTags sub
 
Top