ibs-format 1.4.7 → 1.4.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
# Description
|
|
2
2
|
|
|
3
|
-
Detect the user-defined identifiers in the text and convert them into HTML tags like bold, italic, strike, and many more having XSS (Cross-site scripting) security with escaping functionality, also detect the links like URLs, email, and IP addresses and wrap them into Anchor tag `<a
|
|
3
|
+
Text formatting in Javascript. Detect the user-defined identifiers in the text and convert them into HTML tags like bold, italic, strike, and many more having XSS (Cross-site scripting) security with escaping functionality, also detect the links like URLs, email, and IP addresses and wrap them into Anchor tag `<a>` with also other user define formatting.
|
|
4
4
|
|
|
5
5
|
## Table of Contents
|
|
6
|
-
- [Online Demo](#demo)
|
|
6
|
+
- [Online Demo](#online-demo)
|
|
7
7
|
- [Supported browsers](#browsers)
|
|
8
8
|
- [Installation](#installation)
|
|
9
9
|
- [Usage](#usage)
|
|
10
10
|
- [Text Formatting](#text-formatting)
|
|
11
|
-
- [Links Detecting](#
|
|
12
|
-
- [Cross Site Scripting (XSS)](#cross-site-scripting)
|
|
13
|
-
- [Format the text at run time using custom Pipe](#pipe)
|
|
14
|
-
- [Use the external 'ngx-linkifyjs' library for detecting the links](#linkifyjs)
|
|
11
|
+
- [Links Detecting](#links-detecting)
|
|
12
|
+
- [Cross Site Scripting (XSS)](#cross-site-scripting-(xss))
|
|
13
|
+
- [Format the text at run time using custom Pipe](#format-the-text-at-run-time-using-custom-pipe)
|
|
14
|
+
- [Use the external 'ngx-linkifyjs' library for detecting the links](#use-the-external-'ngx-linkifyjs'-library-for-detecting-the-links)
|
|
15
15
|
- [Precautions](#precautions)
|
|
16
16
|
|
|
17
|
-
<a name="demo"/>
|
|
17
|
+
<a name="online-demo"/>
|
|
18
18
|
|
|
19
19
|
# Online Demo
|
|
20
20
|
|
|
@@ -83,7 +83,7 @@ var tagArray = [['b','*'],['i','_'],['strike','~'],["mark","!"]];
|
|
|
83
83
|
|
|
84
84
|
Once upon a time, there was a <b>thristy</b> <strike><i>crow</i></strike>.
|
|
85
85
|
|
|
86
|
-
<a name="
|
|
86
|
+
<a name="links-detecting"/>
|
|
87
87
|
|
|
88
88
|
# Links Detecting
|
|
89
89
|
|
|
@@ -122,7 +122,7 @@ and my email is <a href='mailto:info@myemail.com' target='_blank'>info@myemail.c
|
|
|
122
122
|
```js
|
|
123
123
|
myText = ibsFormat(myText, null, obj);
|
|
124
124
|
```
|
|
125
|
-
<a name="cross-site-scripting"/>
|
|
125
|
+
<a name="cross-site-scripting-(xss)"/>
|
|
126
126
|
|
|
127
127
|
# Cross Site Scripting (XSS).
|
|
128
128
|
|
|
@@ -138,7 +138,7 @@ Place a JSON object in the forth argument and set it's value to false, if the fo
|
|
|
138
138
|
myText = ibsFormat(myText, tagArray, obj, { allowXssEscaping : false });
|
|
139
139
|
```
|
|
140
140
|
|
|
141
|
-
<a name="pipe"/>
|
|
141
|
+
<a name="format-the-text-at-run-time-using-custom-pipe"/>
|
|
142
142
|
|
|
143
143
|
# Format the text at run time using custom Pipe.
|
|
144
144
|
|
|
@@ -176,7 +176,7 @@ import { ibsformatPipe } from './custom-pipe.pipe';
|
|
|
176
176
|
|
|
177
177
|
`<p [innerHTML]="myText | ibsformat"></p>`
|
|
178
178
|
|
|
179
|
-
<a name="linkifyjs"/>
|
|
179
|
+
<a name="use-the-external-'ngx-linkifyjs'-library-for-detecting-the-links"/>
|
|
180
180
|
|
|
181
181
|
# Use the external 'ngx-linkifyjs' library for detecting the links
|
|
182
182
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ibs-format",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.10",
|
|
4
4
|
"description": "Detect the user-defined identifiers in the text and convert them into HTML tags like bold, italic, strike, and many more having XSS (Cross-site scripting) security with escaping functionality, also detect the links like URLs, email, and IP addresses and wrap them into Anchor tag `<a>`.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|