I want to copy / paste html from websites and save them in mysql database. To do this, I checked CKEditor, which allows me to embed html, even text documents, and it generates html code for it. Since all I want to do is βgenerateβ the inserted data as html, instead of using a full wysiwyg editor such as CKEditor, I want to write some code (possibly with jquery) to convert the inserted data into html tags and formatting.
To achieve this functionality, what do these online editors do? How do they convert clipboard data to html code? Why do I only get text when I paste html formatted text or divs or buttons into this text area here, as well as images and the correct div sizes on wysiwyg editors?
Do editors access and manipulate clipboard data? Does the clipboard save formatting data in an organized manner, allowing CKEditor or other people to manipulate it?
Can this be done using jQuery? Or do we need server code?
If you can shed light on this topic, I would appreciate it. I just want to know the method so that I can write the appropriate code for it.
For reference: http://ckeditor.com/demo
Logan
source share