@textbus/core
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -12,4 +12,6 @@ import { Observable } from 'rxjs'; | ||
theme?: string; | ||
/** 设置最大历史栈 */ | ||
/** 设置最大历史栈, 默认值为50个 */ | ||
historyStackSize?: number; | ||
/** 设置记录历史的时间间隔,间隔期间内如有变化则会添加一次历史记录, 默认值为5000ms */ | ||
historySampleTime?: number; | ||
/** 声明组件集合 */ | ||
@@ -16,0 +18,0 @@ components?: Array<Type<AbstractComponent>>; |
@@ -107,3 +107,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
this.stopListen(); | ||
this.snapshotSubscription = this.rootComponent.onChange.pipe(sampleTime(5000)).subscribe(() => { | ||
this.snapshotSubscription = this.rootComponent.onChange.pipe(sampleTime(this.options.historySampleTime || 5000)).subscribe(() => { | ||
this.recordSnapshot(); | ||
@@ -110,0 +110,0 @@ }); |
@@ -12,5 +12,4 @@ import { VElement } from './core/_api'; | ||
text(text: string): string; | ||
attrName(text: string): any; | ||
attrValue(text: string): any; | ||
symbolTransfer(text: string): string; | ||
attrName(text: string): string; | ||
attrValue(text: string): string; | ||
}; | ||
@@ -17,0 +16,0 @@ private singleTagTest; |
@@ -66,9 +66,3 @@ import { Renderer, VTextNode } from './core/_api'; | ||
attrName(text) { | ||
return this.symbolTransfer(text.replace(/=/g, '')); | ||
}, | ||
attrValue(text) { | ||
return this.symbolTransfer(text); | ||
}, | ||
symbolTransfer(text) { | ||
return text.replace(/[><"'&/]/g, str => { | ||
return text.replace(/[><"'&]/g, str => { | ||
return { | ||
@@ -79,8 +73,15 @@ '<': '<', | ||
"'": ''', | ||
'&': '&', | ||
'/': '/' | ||
'&': '&' | ||
}[str]; | ||
}); | ||
}, | ||
attrValue(text) { | ||
return text.replace(/[><"'&/]/g, str => { | ||
return { | ||
'"': '"', | ||
"'": ''' | ||
}[str]; | ||
}); | ||
} | ||
}; | ||
//# sourceMappingURL=output-translator.js.map |
{ | ||
"name": "@textbus/core", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "TextBus is a rich text editor and framework that is highly customizable and extensible to achieve rich wysiwyg effects.", | ||
@@ -5,0 +5,0 @@ "main": "./bundles/public-api.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
623001
9008