//富文本去标签
Vue.prototype.$filterHTMLTag = function (str) {
  str = str.replace(/<\/?[^>]*>/g,''); //去除HTML tag
  str = str.replace(/[ | ]*\n/g,'\n'); //去除行尾空白
  str = str.replace(/[ ]|[&nbsp;]/g, '');//去除&nbsp;
  str=str.replace(/ /ig,'');//去掉 
  return str;
}

相关文章: