Styling with TinyMCE copy + paste?

Is there a way to remove specific tags from a tiny MCE using copy + paste from an external source (e.g. Word)? I would like the font and image tag files not to be copied + pasted, but not have problems with the font size, etc.

Thank!

+5
source share
3 answers

You cannot prevent someone from pasting something, so I think that it is best to filter out unwanted tags by calling a function in the form of submit or replacing the tiny MCE text area. Then you can use some regular expression replacement to get rid of unwanted tags.

EDIT: . TinyMCE.

+4

I don’t know how useful this is, but you can take a look at this jQuery plugin, which allows you to filter tags and attribute the text that you insert.

FilteredPaste.js - jQuery plugin for filtering and cleaning pasted inputs

+1
source

All Articles