Froala への貼り付けに問題があります。<pre><code>Code here</code></pre>
タグを追加するカスタム コード ボタンがあります。
$('textarea[name="description"]').editable({
customButtons: {
insertCode: {
title: 'Insert code',
icon: {
type: 'font',
value: 'fa fa-code'
},
callback: function() {
if (!this.selectionInEditor()) {
this.$element.focus(); // Focus on editor if it's not.
}
var html = '<pre><code>' + (this.text() || '​') + '</code></pre>';
this.insertHTML(html);
this.saveUndoStep();
}
}
}
});
コードをエディターに貼り付け、スタイリングを削除し、改行とインデントを維持できるようにしたいと考えています。here on SO with と同様CNTL+K
です。これは可能ですか?