強(qiáng)迫癥的福音: CJK(中日韓統(tǒng)一表意文字) 與 英文字母之間自動(dòng)加入空格
強(qiáng)迫癥的福音: CJK(中日韓統(tǒng)一表意文字) 與 英文字母之間自動(dòng)加入空格。
- 項(xiàng)目地址:Github
Install
$ npm install aspace
Usage
Parameter:
aSpace('測試test測試'); // string
aSpace(document.body); // element
aSpace(document.getElementsByClassName('example')); // element array
Ignore some node: add className ‘no-space’
<p class="no-space">設(shè)置no-space: test測試test測試</p>
Used in input field:
<input type="text" onchange="this.value = aSpace(this.value);">
Development
$ npm install
$ npm install -g gulp
$ gulp