Open daniboygg opened 6 months ago
@ywarnier I would need some help to track all the places where the WYSIWYG is used
You can find them searching for those two strings in the public/
: ->addTextArea(
or ->addElement('textarea'
.
This will provide you (I think) with all the places where a WYSIWYG is used.
The call itself simply adds a <textarea>
tag in the $form element associated with it, and then a JS somewhere picks it up and transforms it into CKEditor dynamically. I'm not sure how to adequately modify this, though. The ideal way would be (I suppose) to modify the part responsible for the JS-based substitution.
I think this is in src/CoreBundle/Component/Editor/CkEditor/CkEditor.php, but maybe this has already been replaced by TinyMCE. Maybe @AngelFQC or @christianbeeznest can confirm, here... ?
You can find them by searching ->addHtmlEditor(
For legacy forms, the editor is added by the FormValidator::addHtmlEditor method https://github.com/chamilo/chamilo-lms/blob/a531dfc35e1e094f925a2a13fa5be12d2100afa2/public/main/inc/lib/formvalidator/FormValidator.class.php#L1108-L1146
The field is managed in HtmlEditor.php class https://github.com/chamilo/chamilo-lms/blob/master/public/main/inc/lib/formvalidator/Element/HtmlEditor.php
The JS to replace the textarea with the TinyMCE can be found here https://github.com/chamilo/chamilo-lms/blob/a531dfc35e1e094f925a2a13fa5be12d2100afa2/src/CoreBundle/Component/Editor/CkEditor/CkEditor.php#L56-L78
And the instance for TinyMCE is here https://github.com/chamilo/chamilo-lms/blob/a531dfc35e1e094f925a2a13fa5be12d2100afa2/assets/vue/App.vue#L112-L117
Here is the list of all different configurations of CKeditor's toolbar in Chamilo 1.11.x: https://github.com/chamilo/chamilo-lms/tree/1.11.x/src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar (via)
I open this issue to keep track of all places where the editor is used in Chamilo
We have an item for every path where Chamilo show a WYSIWYG editor. When the path uses the new component BaseTinyEditor (take a look at pull request https://github.com/chamilo/chamilo-lms/pull/5252) and is configured like it was shown in Chamilo 1 mark the item as done
Right now all places where the Vue code is used, all the plugins for tiny editor are enabled. We need to keep track of the old Chamilo 1 places and configure them, as much as possible, equal.