-
Notifications
You must be signed in to change notification settings - Fork 0
Text Padding
Maxime LUCE edited this page Feb 25, 2014
·
1 revision
Ensure text length by adding given replacement character.
<p data-bind="pad: { text: myNumber, length: 10, char: '#' }"></p>will result in
<p>#######123</p><p data-bind="pad: { text: myText, length: 10, char: '.', right: true }"></p>will result in
<p>text......</p>- type: string
- required
Text to be limited
- type: number
- required
Maximum character length
- type: string
- optional
- default: 0
Character to append if text length is to few
- type: string
- optional
A custom prefix to apply
- type: boolean
- optional
- default: false
Append replacement character to right