1.1.0 • Published 4 years ago

wdjs v1.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

Writedown↓

MIT License GitHub tag (latest by date) npm npm bundle size

Writing html will be more fun!

kaf.js

View actual sample

View on GitHub

View on npmjs.com

Example

<body #root>
  <header>
    <a .header-logo>Writedown</a>
  </header>
  <div .message.green>
    This is example of
    <span #wd>writedown</span>!
  </div>
  <button .button #ok>
    OK
  </button>
</body>

<body id="root">
  <header>
    <a class="header-logo">Writedown</a>
  </header>
  <div class="message green">
    This is example of
    <span id="wd">writedown</span>!
  </div>
  <button class="button" id="ok">
    OK
  </button>
</body>

Usage

There are two ways to initialize Writedown.

<script src="https://cdn.jsdelivr.net/gh/mtsgi/writedown@master/writedown.js"></script>

or

<script type="module">
  import * as wd from "../wd.js";
  wd.init('.wd');
  // You can init Writedown for the specific element in this way
  // This also works: wd.init(document.querySelector('.wd'))
</script>