CKEditor: Implementing CKEditor HTML editor and connecting with FileManager

CKEditor implements the CKEditor HTML editor. It allows you to create a text editing block with full HTML editing capabilities. The text returned from it is HTML.

A custom file manager has been integrated here, allowing for linking files and images.

If necessary, add another column to a second table in the database (for example, "content," etc.), such as "files_id," and save the records.

A problem may arise, for example, when attempting to delete a file or image from the content. Currently, it is not possible to check in CKEditor, and as a result, it is not possible to reduce the "locked_file" count in the "files" table by one.

There are several possible solutions. The one option currently provided is to use the function referenceValidation(), which checks and ensures that the data is up-to-date both when adding and deleting a file. Everything is commented in the code.

The HTML you typed: