Rich text editor, this is your shortcomings thing?

Today in the project, we made a special page to be broken down into smaller modules that can be edited function. So we use to Baidu rich text editor , the beginning have not found anything wrong.

When I put the result with <span> test </ span> , <font> test data </ font> tag Html code is copied to the editor "source" after click "Save" and found a strange phenomenon, <span>, <font> tag had disappeared, the original label art to control the style is gone, I know what to do, did not encountered this situation ah, the beginning thought it was the editor itself, on the change " XhEditor editor " try, still the same situation, then himself wondered if, to manually add a label style , and found that the span tag is not filtered out, but Font tags to replace span tag of.

The ultimate solution : manually add a label to Span Class = "spanClass", and then added to the label art style copied in on it, hey.

.spanClass{

}

<span class="spanClass">测试</span>

 

Reproduced in: https: //www.cnblogs.com/Kummy/archive/2013/03/12/2955292.html

Guess you like

Origin blog.csdn.net/weixin_34194087/article/details/93428290