lorem-filler

`An easy JS and CSS Filler `

Usage no npm install needed!

<script type="module">
  import loremFiller from 'https://cdn.skypack.dev/lorem-filler';
</script>

README

Lorem Filler

What is?


A simple javascript library that adds lorem text in a clean way, using pure JS or CSS tags

Installation


npm i lorem-filler

How it Works


Add a css tag including lorem and the library will fill the content for you with 6 words of lorem text. If you want a custom number of words, add _X just after the lorem class, where X is a number between 1 and 100:

<h4 class="lorem otherClass"></h4>
<p class="lorem _10"></p>
<script type="module" type="text/javascript">
  import lorem from "./lorem.js";
  lorem().content();
</script>

OUTPUT

<!-- h4 Default Ouput 6 -->
<h4>Lorem ipsum dolor sit amet, consectetur.</h4>
<!-- p Custom Ouput  -->
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do.</p>

ATTENTION


<h1 class="lorem _56">CORRECT</h1>
<h1 class="_20 lorem">INCORRECT</h1>
<h1 class="lorem otherClass _20">INCORRECT</h1>

BUGS

  • If only "lorem" class is added. Doesn't work