2

I am looking for a way to copy HTML content to the clipboard, and then paste it using some sort of formatting for specific situations.

For now, I just do a .text() in jQuery so I get the content in plain text in my clipboard. The idea is to copy the content of an article in a wiki-type application, and then paste it in a helpdesk software (like BMC Remedy).

What I would like to do is to retain formatting for element like bullets lists and ordered lists by forcing a new line.

Example: HTML is

<ul>
<li>bullet #1</li>
<li>bullet #2</li>
<li>bullet #3</li>
</ul>

Pasted content would be: bullet #1 bullet #2 bullet #3

Any idea?

Thank you very much for help

4

1 回答 1

0

复制html elements而不是仅仅text将保留您的格式。但粘贴字段应该是富文本框

于 2013-06-27T19:00:50.703 回答