从 Rally 描述字段中删除 html 标记 [英] Remove html markup from Rally description field

查看:37
本文介绍了从 Rally 描述字段中删除 html 标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种快速的方法可以从字符串中删除 html 标记?问题是我正在将描述从故事复制到剪贴板,我们只想要纯文本,但当然描述的值将被标记.所以我想转...

Is there a quick way to remove html markup from a string ? The problem is I am copying the description from stories to the clipboard, we just want plain text but of course the value of description will be marked up. So I want to turn ...

<SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">text text text</SPAN>

进入

text text text

推荐答案

如果您使用的是 ExtJS(或 Rally App SDK 2.x):

If you are using ExtJS (or Rally App SDK 2.x):

Ext.util.Format.stripTags(...);

http://docs.sencha.com/ext-js/4-0/#!/api/Ext.util.Format-method-stripTagshttps://rally1.rallydev.com/apps/2.0p/doc/#!/api/Ext.util.Format-method-stripTags

这篇关于从 Rally 描述字段中删除 html 标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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