Closed jmontoyaa closed 6 months ago
This was replaced with tinymce and it works when open the editor inside a course.
Filemanager doesn´t work yet outside a course.
The personal files (#3792) should be connect to the filemanager.
An image picker for tinymce has been added in courses tools (no documents) with code legacy in this commit https://github.com/chamilo/chamilo-lms/commit/ef3c8b0b15684ead7298bdb937ec910c19599994
For tinimce with vuejs inside course is added this commit https://github.com/chamilo/chamilo-lms/commit/5f6a97ca5ae6ef34a787b1c201b78a3797387fc9 , It should be add in other tools when it is using vuejs,
For tiniymce outside a course with vuejs to use the filemanager created for tool documents (vuejs) changing the browser url by personal files [/resources/personal_files/]
It is added editor filemanager for documents and messages in this PR https://github.com/chamilo/chamilo-lms/pull/4756
The tinyMCE works on many page. The missing point are extension that we had before like mathjack but probably it could be removed for 2.0 and reintegrated later.
Work on this with @daniboygg to generalize the implementation of the filemanager in TinyMCE:
At the moment this saves the image as base64 in the database. The images should be saved on disk in var/[tool-name]/[uuid].[extension].
I've done a little research about uploading files.
Checking the documentation https://www.tiny.cloud/docs/general-configuration-guide/upload-images/ we need:
editor.uploadImages()
before uploading the content. We must await this to finish before submitting the contentDo we have a method like this implemented in the backend?
Regarding the version of TinyMCE used, there is a warning in the documentation:
NOTE: TinyMCE 5 reached End of Support in April 2023. No more bug fixes, security updates, or new features will be introduced to TinyMCE 5. We recommend you upgrade to TinyMCE 6 or consider TinyMCE 5 Long Term Support (LTS) if you need more time.
Should we consider migrating to TinyMCE 6 before making the feature to upload images?
@christianbeeznest will work on upload of images with the backend call.
A backend controller has been implemented for the TinyMCE image upload feature, which accepts images via POST, stores them appropriately in personal_files and resource_file tables, and returns their location in a JSON format. On the frontend, TinyMCE is configured to utilize this backend controller (FileManagerController) through the file_picker_callback option, enabling integration with a custom file manager or direct uploads from the user's device, depending on the useFileManager setting. It ensures all images are uploaded with editor.uploadImages() before submitting the content. The useFileManager option adds flexibility in file handling, allowing users to choose between direct uploads or using a file manager for more efficient organization.
The changes are in this PR https://github.com/chamilo/chamilo-lms/pull/5241 and merged now, also it is added this page for demo /resources/pages/editor-demo
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
Implement the filemanager in ckeditor using resources