ユーザーが次のように入力した場合:
<iframe width="420" height="315" src="http://www.youtube.com/embed/8FozVVP72Qk" frameborder="0" allowfullscreen></iframe>
あれは。。。になる:
<iframe width="420" height="315" src="http://www.youtube.com/embed/8FozVVP72Qk" frameborder="0" allowfullscreen></iframe>
コードは解釈される代わりに表示されます。
したがって、nicedit のドキュメントが古くて完全ではない限り、これらの値を置き換えるだけだと思いました。
replace() 関数を使用できますが、この形式変換のための関数はありますか?
これは私が値を取得する方法です:
$('body').on('submit','#new_blog',function(e){
e.preventDefault();
var textarea = $(this).find('textarea').val();
var valueWithIframeSupport = textarea.replace('<','<').replace('>','>');
/* This is what i had in mind but itdoesnt really seems an option*/
});
ありがとう