<select id="test">
<option value="foo">Foo</option>
<option value="bar">Bar</option>
</select>
<script>
$('#test').change(function(){
$('#taskMessage').val($('#taskMessage').val()+" "+$('#test option:selected').text());
});
</script>
**<textarea class="summernote" id="taskMessage" name="taskMessage" data-plugin-summernote data-plugin-options='{ "height": 200, "codemirror": { "theme": "ambiance" } }'><?php echo htmlspecialchars($taskMessage); ?></textarea>**
What is the method to add the selected:option
to the id:taskMessage
. if simple textarea
is added with the following code it works fine <textarea id="taskMessage"></textarea>
but with the HTML editor it does not add the selected:option
to the HTML text editor.