- 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.
<script src="https://cdn.tiny.cloud/1/no-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>
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.
Yes, you can place this in the theme files and apply it to specific questions with a CSS class name.As a follow-up, could we add this into a Theme file to save our having to paste the code into each question's HTML source?
<script src="https://cdn.tiny.cloud/1/no-api-key/tinymce/6/tinymce.min.js" referrerpolicy="origin"></script>
$(document).on('ready pjax:scriptcomplete',function(){ tinymce.init({ selector:'.question-container.with-editor textarea.form-control', plugins: 'code' }); });
Please Log in to join the conversation.
Yes, a survey tool is not the same as a CMS...
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
TBH, I don't think it would be bad to have this ability. It's better to have something than not have it.
Please Log in to join the conversation.