Сообщение от imedia
|
<script src="//cdn.tinymce.com/4/tinymce.min.js"></script>
|
https://www.tinymce.com/docs/get-sta...partofawebform
Цитата:
|
Note: if you're testing this locally, you will need to prepend https:// to urls in the script tag. For example, <script src='https://cdn.tinymce.com/4/tinymce.min.js'></script>.
|
а нелокально всё работает
<button class="add_text_block">add_text_block</button>
<div id="letter_body"></div>
<script src="//cdn.tinymce.com/4/tinymce.min.js"></script>
<script>
document.querySelector('.add_text_block').addEventListener('click', function () {
var text_block ='<textarea id="first_text" name="first_text" >Easy (and free!) You should check out our premium features.</textarea>';
var doc = document.getElementById('letter_body')
var div = document.createElement('div');
div.innerHTML = text_block;
doc.appendChild(div);
tinyMCE.init({
selector: "#first_text"
});
},false);
</script>