<分区>
我正在使用 php 输出一些富文本。我怎样才能完全去除内联样式?
文本将直接从 MS Word 或 OpenOffice 中粘贴到使用 TinyMCE 的软件中,TinyMCE 是一种富文本编辑器,可让您向文本添加基本的 HTML 格式。 但是我想删除
标签上的内联样式(见下文),但保留
标签本身。
<p style="margin-bottom: 0cm;">A patrol of Zograth apes came round the corner, causing Rosette to pull Rufus into a small alcove, where she pressed her body against his. “Sorry.” She said, breathing warm air onto the shy man's neck. Rufus trembled.</p>
<p style="margin-bottom: 0cm;"> </p>
<p style="margin-bottom: 0cm;">Rosette checked the coast was clear and pulled Rufus out of their hidey hole. They watched as the Zograth walked down a corridor, almost out of sight and then collapsed next to a phallic fountain. As their bodies hit the ground, their guns clattered across the floor. Rosette stopped one with her heel and picked it up immediately, tossing the other one to Rufus. “Most of these apes seem to be dying, but you might need this, just to give them a helping hand.”</p>