diff --git a/lib/assets/javascripts/views/answers/edit.js b/lib/assets/javascripts/views/answers/edit.js index 61da461..90fa8f5 100644 --- a/lib/assets/javascripts/views/answers/edit.js +++ b/lib/assets/javascripts/views/answers/edit.js @@ -14,6 +14,7 @@ const questionId = jQuery => jQuery.closest('.form-answer').attr('data-autosave'); const isStale = jQuery => jQuery.closest('.question-form').find('.answer-locking').html().length !== 0; const isReadOnly = () => $('.form-answer fieldset:disabled').length > 0; + const toolbar = 'bold italic | bullist numlist | link | table'; /* * A map of debounced functions, one for each input, textarea or select change at any * form with class form-answer. The key represents a question id and the value holds @@ -163,7 +164,7 @@ }; // Initial load TimeagoFactory.render($('time.timeago')); - Tinymce.init({ selector: `.${editorClass}` }); + Tinymce.init({ selector: `.${editorClass}`, toolbar }); if (!isReadOnly()) { // Attaches form and tinymce event handlers Tinymce.findEditorsByClassName(editorClass).forEach(editorHandlers); diff --git a/lib/assets/javascripts/views/org_admin/phases/new_edit.js b/lib/assets/javascripts/views/org_admin/phases/new_edit.js index e04c4cd..b5ae170 100644 --- a/lib/assets/javascripts/views/org_admin/phases/new_edit.js +++ b/lib/assets/javascripts/views/org_admin/phases/new_edit.js @@ -15,6 +15,7 @@ Tinymce.init({ selector: '.phase' }); ariatiseForm({ selector: '.phase_form' }); const parentSelector = '#sections_accordion'; + const toolbar = 'bold italic | bullist numlist | link | table'; const initQuestion = (context) => { const target = $(context); @@ -22,7 +23,7 @@ // For some reason the toolbar options are retained after the call to Tinymce.init() on // the views/notifications/edit.js file. Tried 'Object.assign' instead of '$.extend' but it // made no difference - Tinymce.init({ selector: `#${context} .question` }); + Tinymce.init({ selector: `#${context} .question`, toolbar }); ariatiseForm({ selector: `#${context} .question_form` }); initQuestionOption(context); // Swap in the question_formats when the user selects an option based question type