qasem:~$

./blog -t 'Wysiwyg editor with photo uploader for your site management panel'

-- Get back to Home

2020-05-16

Hello. Today I have prepared for you a wysiwyg editor that is free and open source and you can use it on your site. This editor also has a photo uploader and you can easily upload photos through the editor.

In addition, I added the img-fluid class, which is used to responsive images in bootstrap 4, to the editor, and this class is automatically added to the image class.

First, place the three files tiny.js, tinymce.js, and upload.php at the root of your site. Then, on the page you want to edit, call both javascript files and write the following code.

 

<textarea name="content" id="text" rows="50"></textarea>

 

Now you can get the editor information using php.

In php you can get the information and save it in the database and then display it on the desired page. But in django there is a small difference. The html file you want to consider. Suppose I received the information with the item variable and I want to display the content. In the template file I have to follow the example below to display the editor information correctly.

 

{{ item.content|safe }}

 

You can download the files related to the editor from below. I hope the information I gave was useful and I wish you success.

 

http://qtle.ir/dl/tinymce.zip

 

 

 

-- Get back to Home