我遇到了cleditor格式化的一些问题,这似乎与浏览器有关。
它做了两件事:
<span>
)Apple-type-span
标记
<span>
属性font-size: 10pt;
代码
<p>
标签,有时不会我想要做的是删除所有<span>
,<p>
和<br />
标记的内容,然后正确格式化内容。
以下是我想要更改的HTML的几个示例:
<p>
<div>
<div>
This species is widely-distributed in lowland, coastal regions of Togo, Benin and Nigeria as far as the Cross River delta, and occurs at some inland localities along the lower Niger River. Populations in Cameroon, Equatorial Guinea and Gabon are now considered to represent other species.
</div>
</div>
</p>
=&GT;
<p>This species is widely-distributed in lowland, coastal regions of Togo, Benin and Nigeria as far as the Cross River delta, and occurs at some inland localities along the lower Niger River. Populations in Cameroon, Equatorial Guinea and Gabon are now considered to represent other species.</p>
<p>
Provided adequate cover and structure is available this <a href="/glossary/s/species" rel="/glossary/s/species?hover=true" class="link_glossary">species</a> is unfussy with regards to décor with ceramic flowerpots, lengths of plastic piping and other artificial materials all useful additions. A more natural-looking arrangement might consist of a soft, sandy <a href="/glossary/s/substrate" rel="/glossary/s/substrate?hover=true" class="link_glossary">substrate</a> with wood roots and branches placed such a way that plenty of shady spots and caves are formed.
<br>
<br>
The addition of dried leaf litter (beech, oak or Ketapang almond leaves are all suitable) would further emphasise the natural feel and with it bring the growth of beneficial microbe colonies as <a href="/glossary/d/decomposition" rel="/glossary/d/decomposition?hover=true" class="link_glossary">decomposition</a> occurs. These can provide a valuable secondary food source for <a href="/glossary/f/fry" rel="/glossary/f/fry?hover=true" class="link_glossary">fry</a>, while the tannins and other chemicals released by the decaying leaves aid in simulation of naturalistic conditions. Leaves can be left in the <a href="/glossary/t/tank" rel="/glossary/t/tank?hover=true" class="link_glossary">tank</a> to break down fully or removed and replaced every few weeks. A net bag filled with <a href="/glossary/a/aquarium" rel="/glossary/a/aquarium?hover=true" class="link_glossary">aquarium</a>-safe <a href="/glossary/p/peat" rel="/glossary/p/peat?hover=true" class="link_glossary">peat</a> can also be added to the <a href="/glossary/f/filter" rel="/glossary/f/filter?hover=true" class="link_glossary">filter</a> or suspended over the edge of the<a href="/glossary/t/tank" rel="/glossary/t/tank?hover=true" class="link_glossary">tank</a>.
<br>
<br>
Fairly dim lighting is recommended and plant <a href="/glossary/s/species" rel="/glossary/s/species?hover=true" class="link_glossary">species</a> from <a href="/glossary/g/genera" rel="/glossary/g/genera?hover=true" class="link_glossary">genera</a> such as <i>Microsorum</i>, <i>Taxiphyllum</i>, <i>Cryptocoryne</i> and<i>Anubias</i> are best since they will grow under such conditions. A few patches of floating vegetation to diffuse the light even further may also prove effective. Filtration, or at least water flow, should not be very strong and very large water changes are best avoided with 10-15% weekly adequate provided the <a href="/glossary/t/tank" rel="/glossary/t/tank?hover=true" class="link_glossary">tank</a> is lightly-stocked.
</p>
=&GT;
<p>
Provided adequate cover and structure is available this <a href="/glossary/s/species" rel="/glossary/s/species?hover=true" class="link_glossary">species</a> is unfussy with regards to décor with ceramic flowerpots, lengths of plastic piping and other artificial materials all useful additions. A more natural-looking arrangement might consist of a soft, sandy <a href="/glossary/s/substrate" rel="/glossary/s/substrate?hover=true" class="link_glossary">substrate</a> with wood roots and branches placed such a way that plenty of shady spots and caves are formed.
</p>
<p>
The addition of dried leaf litter (beech, oak or Ketapang almond leaves are all suitable) would further emphasise the natural feel and with it bring the growth of beneficial microbe colonies as <a href="/glossary/d/decomposition" rel="/glossary/d/decomposition?hover=true" class="link_glossary">decomposition</a> occurs. These can provide a valuable secondary food source for <a href="/glossary/f/fry" rel="/glossary/f/fry?hover=true" class="link_glossary">fry</a>, while the tannins and other chemicals released by the decaying leaves aid in simulation of naturalistic conditions. Leaves can be left in the <a href="/glossary/t/tank" rel="/glossary/t/tank?hover=true" class="link_glossary">tank</a> to break down fully or removed and replaced every few weeks. A net bag filled with <a href="/glossary/a/aquarium" rel="/glossary/a/aquarium?hover=true" class="link_glossary">aquarium</a>-safe <a href="/glossary/p/peat" rel="/glossary/p/peat?hover=true" class="link_glossary">peat</a> can also be added to the <a href="/glossary/f/filter" rel="/glossary/f/filter?hover=true" class="link_glossary">filter</a> or suspended over the edge of the<a href="/glossary/t/tank" rel="/glossary/t/tank?hover=true" class="link_glossary">tank</a>.
</p>
<p>
Fairly dim lighting is recommended and plant <a href="/glossary/s/species" rel="/glossary/s/species?hover=true" class="link_glossary">species</a> from <a href="/glossary/g/genera" rel="/glossary/g/genera?hover=true" class="link_glossary">genera</a> such as <i>Microsorum</i>, <i>Taxiphyllum</i>, <i>Cryptocoryne</i> and<i>Anubias</i> are best since they will grow under such conditions. A few patches of floating vegetation to diffuse the light even further may also prove effective. Filtration, or at least water flow, should not be very strong and very large water changes are best avoided with 10-15% weekly adequate provided the <a href="/glossary/t/tank" rel="/glossary/t/tank?hover=true" class="link_glossary">tank</a> is lightly-stocked.
</p>
<br>
<p>
<font class="Apple-style-span" face="Georgia">
<i>A. cirrhosus</i> is native to the Argentinian portion of the Paraná river drainage but all <i>A.</i> cf. <i>cirrhosus</i> in the hobby are produced commercially.
</font>
</p>
=&GT;
<p><i>A. cirrhosus</i> is native to the Argentinian portion of the Paraná river drainage but all <i>A.</i> cf. <i>cirrhosus</i> in the hobby are produced commercially.</p>
<p>
<b>
<span class="Apple-style-span" style="font-weight: normal; ">
</span>
</b>
</p>
<p>
<b>
<strong>Temperature</strong>:
</b>
[temp]
</p>
<p>
<b>
<strong>pH</strong>:
</b>
[pH]
</p>
<p>
<b>
<strong>Hardness</strong>:
</b>
[hardness]
</p>
<p></p>
=&GT;
<p><strong>Temperature</strong>: [temp]</p>
<p><strong>pH</strong>: [pH]</p>
<p><strong>Hardness</strong>: [hardness]</p>
有什么方法可以快速轻松地完成这项工作吗?我可以使用PHP格式化类或类似的东西为我排序?
这是一个非常难看的代码。我已经在WPSE上发布了关于使用不同RTE的信息,但根据我的要求,我怀疑cleditor是唯一可以工作的人:(
提前致谢,