LoginSignup
0
0

More than 5 years have passed since last update.

riot.js single tagの拡張。

Last updated at Posted at 2018-04-12

配下に従属するタグが必要ない場合、tag無し表記で拡張できる。

<script src="//gnjo.github.io/riot.js"></script>
<div data-is='text'>eeee xxx </div>
<hr>
<text>eeeee</text>
riot.tag(`text`,false
,`contenteditable='plaintext-only' onclick={click} oninput={input}`
,function(opts){
 let o=this;
 o.click=function(ev){
  console.log('click')
 }
 o.input=function(ev){
  console.log('input',ev.target.textContent)
 }
});
riot.mount('text')
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0