0
summernoteやtinyMCEのような、ブートストラップから行と列を追加できるHTMLエディタはありますか?ブートストラップの行と列を使用するエディタhtml
私は@ Korgrueのアドバイスに従っており、私はsummernoteを使用してカスタムボタンを作成できることもわかりました。しかし、私のコードは、テキストエリアに生のテキストを置いている、それはブートストラップにHTMLを変更しません。これは私のコードです:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.css" rel="stylesheet">
<link href="http://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.2/summernote.css" rel="stylesheet">
</head>
<body>
<div id="summernote"></div>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.js"></script>
<script src="http://netdna.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.2/summernote.js"></script>
<script>
$(document).ready(function() {
var HelloButton = function (context) {
var ui = $.summernote.ui;
// create button
var button = ui.button({
contents: '<i class="fa fa-child"/> Hello',
tooltip: 'hello',
click: function() {
// invoke insertText method with 'hello' on editor module.
context.invoke('editor.insertText', '<div class="row">Row</div>');
}
});
return button.render(); // return button as jquery object
}
$('#summernote').summernote({
toolbar: [
['mybutton', ['hello']]
],
buttons: {
hello: HelloButton
}
});
});
</script>
</body>
</html>
私に何か不足していますか?
私はあなたがsummernoteに提案するもの試してみました。自分の投稿で自分のコードを編集しました。ボタンがテキストを生成すると、ブートストラップコードがhtmlに変更されません。その原文。私は何が欠けているか知っていますか? – churros