- Posts: 90
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
<script type="text/javascript" data-author="Tony Partner"> $(document).on('ready pjax:scriptcomplete',function(){ // Identify this question var thisQuestion = $('#question{QID}'); var thisTextarea = $('textarea:eq(0)', thisQuestion); var textID = $(thisTextarea).attr('id'); // Clean up the textarea value before initiating the editor function decodeEntities(encodedString) { var textArea = document.createElement('textarea'); textArea.innerHTML = encodedString; return textArea.value; } var decodedval = decodeEntities($(thisTextarea).val()); $(thisTextarea).val(decodeEntities($(thisTextarea).val())); // Initiate the editor tinymce.init({ selector:'#'+textID, plugins: 'code' }); }); </script>
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
<script src="https://cdn.tiny.cloud/1/<our API key>/tinymce/6/tinymce.min.js" referrerpolicy="origin"></script><script> tinymce.init({ selector:'#question{QID} textarea.form-control', plugins: 'code' }); </script><script> $(function() { $("label[for=answer{SGQ}comment].control-label").text("Please provide detail of how you meet the option you have selected, as well as how you meet the preceding criteria."); }); </script><script type="text/javascript" data-author="Tony Partner"> $(document).on('ready pjax:scriptcomplete',function(){ // Identify this question var thisQuestion = $('#question{QID}'); var thisTextarea = $('textarea:eq(0)', thisQuestion); var textID = $(thisTextarea).attr('id'); // Clean up the textarea value before initiating the editor function decodeEntities(encodedString) { var textArea = document.createElement('textarea'); textArea.innerHTML = encodedString; return textArea.value; } var decodedval = decodeEntities($(thisTextarea).val()); $(thisTextarea).val(decodeEntities($(thisTextarea).val())); // Initiate the editor tinymce.init({ selector:'#'+textID, plugins: 'code' }); }); </script>
Please Log in to join the conversation.
Please Log in to join the conversation.
<script src="https://cdn.tiny.cloud/1/<my API Key>/tinymce/6/tinymce.min.js" referrerpolicy="origin"></script> <script type="text/javascript" data-author="Tony Partner"> $(document).on('ready pjax:scriptcomplete',function(){ // Identify this question var thisQuestion = $('#question{QID}'); var thisTextarea = $('textarea:eq(0)', thisQuestion); var textID = $(thisTextarea).attr('id'); // Clean up the textarea value before initiating the editor function decodeEntities(encodedString) { var textArea = document.createElement('textarea'); textArea.innerHTML = encodedString; return textArea.value; } var decodedval = decodeEntities($(thisTextarea).val()); $(thisTextarea).val(decodeEntities($(thisTextarea).val())); // Initiate the editor tinymce.init({ selector:'#'+textID, plugins: 'code' }); });</script>
[b]<script type="text/javascript" data-author="Tony Partner">[/b][b] [/b][b] $(document).on('ready pjax:scriptcomplete',function(){[/b][b] [/b][b] // Identify this question[/b][b] var thisQuestion = $('#question{QID}');[/b][b] var thisTextarea = $('textarea:eq(0)', thisQuestion);[/b][b] var textID = $(thisTextarea).attr('id');[/b][b] [/b][b] [/b][b] // Clean up the textarea value before initiating the editor[/b][b] function decodeEntities(encodedString) {[/b][b] var textArea = document.createElement('textarea');[/b][b] textArea.innerHTML = encodedString;[/b][b] return textArea.value;[/b][b] }[/b][b] var decodedval = decodeEntities($(thisTextarea).val());[/b][b] $(thisTextarea).val(decodeEntities($(thisTextarea).val()));[/b][b] [/b][b] // Initiate the editor[/b][b] tinymce.init({ [/b][b] selector:'#'+textID,[/b][b] plugins: 'code' [/b][b] });[/b][b] });[/b][b]</script>[/b]
Please Log in to join the conversation.
Please Log in to join the conversation.