| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 | 
							
- const canIUse = wx.canIUse('editor'); 
 
- module.exports = {
 
- 	
 
- 	filter: null,
 
- 	
 
- 	highlight: null,
 
- 	
 
- 	onText: null,
 
- 	blankChar: makeMap(' ,\xA0,\t,\r,\n,\f'),
 
- 	
 
- 	blockTags: makeMap('address,article,aside,body,caption,center,cite,footer,header,html,nav,section' + (
 
- 		
 
- 		canIUse ? '' :
 
- 		
 
- 		',pre')),
 
- 	
 
- 	ignoreTags: makeMap(
 
- 		'area,base,basefont,canvas,command,frame,input,isindex,keygen,link,map,meta,param,script,source,style,svg,textarea,title,track,use,wbr'
 
- 		
 
- 		+ (canIUse ? ',rp' : '')
 
- 		
 
- 		
 
- 		+ ',embed,iframe'
 
- 		
 
- 	),
 
- 	
 
- 	richOnlyTags: makeMap('a,colgroup,fieldset,legend,picture,table'
 
- 		
 
- 		+ (canIUse ? ',bdi,bdo,caption,rt,ruby' : '')
 
- 		
 
- 	),
 
- 	
 
- 	selfClosingTags: makeMap(
 
- 		'area,base,basefont,br,col,circle,ellipse,embed,frame,hr,img,input,isindex,keygen,line,link,meta,param,path,polygon,rect,source,track,use,wbr'
 
- 	),
 
- 	
 
- 	trustAttrs: makeMap(
 
- 		'align,alt,app-id,author,autoplay,border,cellpadding,cellspacing,class,color,colspan,controls,data-src,dir,face,height,href,id,ignore,loop,media,muted,name,path,poster,rowspan,size,span,src,start,style,type,unit-id,width,xmlns'
 
- 	),
 
- 	
 
- 	boolAttrs: makeMap('autoplay,controls,ignore,loop,muted'),
 
- 	
 
- 	trustTags: makeMap(
 
- 		'a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video'
 
- 		
 
- 		+ (canIUse ? ',bdi,bdo,caption,pre,rt,ruby' : '')
 
- 		
 
- 		
 
- 		+ ',embed,iframe'
 
- 		
 
- 	),
 
- 	
 
- 	userAgentStyles: {
 
- 		address: 'font-style:italic',
 
- 		big: 'display:inline;font-size:1.2em',
 
- 		blockquote: 'background-color:#f6f6f6;border-left:3px solid #dbdbdb;color:#6c6c6c;padding:5px 0 5px 10px',
 
- 		caption: 'display:table-caption;text-align:center',
 
- 		center: 'text-align:center',
 
- 		cite: 'font-style:italic',
 
- 		dd: 'margin-left:40px',
 
- 		img: 'max-width:100%',
 
- 		mark: 'background-color:yellow',
 
- 		picture: 'max-width:100%',
 
- 		pre: 'font-family:monospace;white-space:pre;overflow:scroll',
 
- 		s: 'text-decoration:line-through',
 
- 		small: 'display:inline;font-size:0.8em',
 
- 		u: 'text-decoration:underline'
 
- 	}
 
- }
 
- function makeMap(str) {
 
- 	var map = {},
 
- 		list = str.split(',');
 
- 	for (var i = list.length; i--;)
 
- 		map[list[i]] = true;
 
- 	return map;
 
- }
 
 
  |