Answer the question
In order to leave comments, you need to log in
How to insert a name in the Trumbowyg textarea on the answer button?
The answer button should insert "Kolya,"
https://jsfiddle.net/alexshev07/jx3o5peg/4
Answer the question
In order to leave comments, you need to log in
jQuery('#editor').trumbowyg({});
jQuery('#editor').trumbowyg('html', '<h1>Welcome</h1>');
jQuery('#get-code').click(function() {
var code = jQuery('#editor').trumbowyg('html');
console.log(code)
});
$('.replay').click(function(){
$('#editor').trumbowyg('html', $('#editor').trumbowyg('html') + $(this).attr('data-name') + ', ');
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question