前提・実現したいこと
Riot.js のチュートリアル(http://riotjs.com/ja/play/)を参考に勉強中です。
カスタムタグを埋め込んで、次の用に表示させたいと思っています。
と表示させたい。
発生している問題・エラーメッセージ
Json部分にhtmlのタグを埋め込みたいのですが、そのまま
テキストとして表示されてしまうのですが回避方法がわかりません。
試したこと
<sample> <div> {tag} </div> <script> this.techs = [ {tag:'<p>テキストテキスト</p><img src="img.src">'} ] </script> </sample> <html> <body> <sample></sample> <script type="riot/tag" src="sample.tag"></script> <script src="https://cdn.jsdelivr.net/npm/riot@3.8/riot+compiler.min.js"></script> <script>riot.mount('sample')</script> </body> </html>補足情報
本来なら
{ ptag:'テキストテキスト',src:'image.jpg'
}
とするべきなのかもしれませんが、1つにまとめる必要があります。
どうぞよろしくお願いいたします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/01/30 06:43