M
M
Mikhail Pakhmutov2013-11-14 21:07:46
JavaScript
Mikhail Pakhmutov, 2013-11-14 21:07:46

Filter pasted information from the clipboard

I catch the insert like this:


        $('#divtiny').contents().find('#editor').bind('paste', function(){
               тут нужно удалить все теги
            }

I can not get in any way what is inserted from the clipboard. I really want to filter all the tags in the incoming data before bidding.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mikhail Osher, 2013-11-14
@miraage

Perhaps it will help.

http://stackoverflow.com/questions/3640187/how-can-i-modify-pasted-text

K
Kirill Firsov, 2013-11-15
@Isis

var element = this;
  setTimeout(function () {
    var text = $(element).val();
    // do something with text
  }, 100);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question