2

I am using TinyMCE only to paste from word. What I am doing actually is that I am using the paste from word button and then I am pasting inside.

I would like to enable the paste from word function automaticaly on each paste so the user do not need to click the paste from word button and then paste in the second window.

I am using the paste from word because of all the styles added when pasting from word which I don't need.

Here is an example of html text I am getting when I am using the simple paste option:

<!--        @page { margin: 0.79in }        P { margin-bottom: 0.08in; direction: ltr; color: #000000; line-height: 0.24in; text-align: justify; widows: 2; orphans: 2 }        P.western { font-size: 12pt; so-language: en-US }       P.cjk { font-family: "Times New Roman"; font-size: 12pt; so-language: de-DE }       A:link { color: #0000ff; so-language: zxx } --> Global Health Governance

And I need only Global Health Governance.

Thank you very much.

Milos Cuculovic
  • 19,631
  • 51
  • 159
  • 265

1 Answers1

1

In this case you will need to implement this functionality using the tinymce configuration setting paste_preprocess. Eighter surf through the tinymce source code (probably the paste plugin under js_scripts/tiny_mce/plugins/paste/editor_plugins_src.js and put the relevant code there or you implement it as i mentioned in another stackoverflow question: TinyMCE Paste As Plain Text

Community
  • 1
  • 1
Thariama
  • 50,002
  • 13
  • 138
  • 166