Hi I am trying to create a TinyMCE editor, and in this I want user to be able to paste from wherever he wants.
The only restriction i want to put , when a user paste from his source my TinyMCE box should remove all the rich-text properties ( e.g. color, font-style, heading, table ) except superscript and subscript.
I want only superscript and subscript to be retained.
here is my TinyMCE code. Currently I am using paste_as_text:true , so it is removing every rich text style including superscript and subscript.
http://fiddle.tinymce.com/KAfaab/4
<script type="text/javascript">
tinyMCE.init({
selector: 'textArea', // change this value according to your HTML
menubar: false,
width: "840",
toolbar: 'undo redo | superscript subscript | link image',
height: "225",
resize: 'both',
encoding: "xml",
elementpath: true,
paste_word_valid_elements: "superscript,subscript,sub,sup",
plugins: "paste",
paste_retain_style_properties: "superscript,subscript,sub,sup",
paste_as_text:true
});
<form method="post" action="dump.php">
<textarea name="content"></textarea>
</form>