S
S
Syomka Gavrilenko2017-05-25 11:35:57
WYSIWYG
Syomka Gavrilenko, 2017-05-25 11:35:57

Could you tell me a wysiwyg editor so that you can enter text and insert pictures and save the result to an archive?

Good afternoon!
There was a need for the following script:
The user enters a special page. on this page a visual editor with the ability to insert pictures.
After the user enters the text, formats it, inserts pictures, you need the ability to download the finished text as an html page with pictures in the form of a zip or rar archive.
Can you suggest how this can be done?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Peter, 2017-05-25
@petermzg

For example, you can take this https://www.froala.com
1. All changes in it occur in a block with the contenteditable attribute, i.e. all content is ready-made html
2. Through ajax, send all the content of the block as text to the server.
3. Create a temp directory
3. Parse the resulting html block to extract the URL of the images.
3.a. Upload images from the Internet to this directory.
3.b. Changes the URL in the html block to a relative path to files with uploaded images.
4. Take a template HTML page, which contains css used by wysiwyg editor, and insert your html block into it.
5. Archive this directory
6. Give the client the received zip or rar archive

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question