如何在HTML内容中隐藏pre标签 [英] How to hide pre tag in HTML content

查看:308
本文介绍了如何在HTML内容中隐藏pre标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好


我遇到了严重的麻烦..我正在尝试在div表中显示来自div的内容,该div在< table>< tbody< tr< td>内.编辑器,如果只有纯文本,则< pre>但是,< pre>的存在是为了使它可读.标签使我的设计变得更糟,因为无法包装文本.有没有办法删除< pre>并显示消息的其余部分.我认为您已经这样做了,但是您的评论已被删除.


Hi guys


I am in a serious trouble.. I am trying to display the contents from a database in a div which is inside a <table><tbody><tr><td>.. The values are entered in BB code editor and if there is only plain text , a <pre> tag is added to make it readable.. But the presence of <pre> tag makes my design worse as am not able to wrap the text... Is there a way to remove <pre> and display the rest of the message.

解决方案

You can just use the string.Replace method to remove the pre tag if you want to. I think you did that, but your comments have been deleted.


这篇关于如何在HTML内容中隐藏pre标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆