I am using TinyMCE with Twitter Bootstrap v3.1 in a Q/A application.
For some reason I am getting multiple 404 errors from TinyMCE in console:
GET http:
TinyMCE should be included before the textarea tag, not after
<doctype html>
<head>
<script src="/assets/lib/TinyMCE/tinymce.min.js"></script>
</head>
<body>
<div class="container" role="main">
<textarea id="tinymce"></textarea>
</div>
</body>
<script>
$(document).ready(function() {
tinymce.init({
selector: "textarea#tinymce",
theme: "modern",
//width: 400,
height: 300,
plugins: [
"advlist autolink link lists charmap print preview hr anchor pagebreak spellchecker",
"searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime nonbreaking",
"save contextmenu directionality emoticons template paste textcolor"
],
content_css: "../assets/css/bootstrap.css",
toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify bullist numlist forecolor | outdent indent | l ink | ",
style_formats: [
{title: 'Bold text', inline: 'b'},
{title: 'Red text', inline: 'span', styles: {color: '#ff0000'}},
{title: 'Red header', block: 'h1', styles: {color: '#ff0000'}},
{title: 'Example 1', inline: 'span', classes: 'example1'},
{title: 'Example 2', inline: 'span', classes: 'example2'},
{title: 'Table styles'},
{title: 'Table row 1', selector: 'tr', classes: 'tablerow1'}
]
});
});
</script>
</html>