You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					19 lines
				
				443 B
			
		
		
			
		
	
	
					19 lines
				
				443 B
			| 
								 
											4 years ago
										 
									 | 
							
								import Parchment from 'parchment';
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								let config = {
							 | 
						||
| 
								 | 
							
								  scope: Parchment.Scope.INLINE,
							 | 
						||
| 
								 | 
							
								  whitelist: ['serif', 'monospace']
							 | 
						||
| 
								 | 
							
								};
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								let FontClass = new Parchment.Attributor.Class('font', 'ql-font', config);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								class FontStyleAttributor extends Parchment.Attributor.Style {
							 | 
						||
| 
								 | 
							
								  value(node) {
							 | 
						||
| 
								 | 
							
								    return super.value(node).replace(/["']/g, '');
							 | 
						||
| 
								 | 
							
								  }
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								let FontStyle = new FontStyleAttributor('font', 'font-family', config);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								export { FontStyle, FontClass };
							 |