draftjs-filters
Advanced tools
Comparing version 2.2.2 to 2.2.3
@@ -7,2 +7,8 @@ # Changelog | ||
## [2.2.3](https://github.com/thibaudcolas/draftjs-filters/compare/v2.2.2...v2.2.3) (2019-01-25) | ||
### Bug Fixes | ||
- **api:** allow entities to only provide a type attr in Flow types ([f4c918c](https://github.com/thibaudcolas/draftjs-filters/commit/f4c918c)) | ||
## [2.2.2](https://github.com/thibaudcolas/draftjs-filters/compare/v2.2.1...v2.2.2) (2019-01-25) | ||
@@ -9,0 +15,0 @@ |
@@ -421,3 +421,3 @@ // @flow | ||
type: string, | ||
whitelist: { | ||
whitelist?: { | ||
[attribute: string]: string | boolean, | ||
@@ -454,3 +454,3 @@ }, | ||
type: string, | ||
attributes: $ReadOnlyArray<string>, | ||
attributes?: $ReadOnlyArray<string>, | ||
}>*/, content /*: ContentState*/) { | ||
@@ -595,8 +595,9 @@ var newContent = content; | ||
type: string, | ||
// Allowed attributes. Other attributes will be removed. | ||
attributes: $ReadOnlyArray<string>, | ||
// Allowed attributes. Other attributes will be removed. If this is omitted, all attributes are kept. | ||
attributes?: $ReadOnlyArray<string>, | ||
// Refine which entities are kept by whitelisting acceptable values with regular expression patterns. | ||
// It's also possible to use "true" to signify that a field is required to be present, | ||
// and "false" for fields required to be absent. | ||
whitelist: { | ||
// If this is omitted, all entities are kept. | ||
whitelist?: { | ||
[attribute: string]: string | boolean, | ||
@@ -603,0 +604,0 @@ }, |
@@ -416,3 +416,3 @@ // @flow | ||
type: string, | ||
whitelist: { | ||
whitelist?: { | ||
[attribute: string]: string | boolean, | ||
@@ -449,3 +449,3 @@ }, | ||
type: string, | ||
attributes: $ReadOnlyArray<string>, | ||
attributes?: $ReadOnlyArray<string>, | ||
}>*/, content /*: ContentState*/) { | ||
@@ -590,8 +590,9 @@ var newContent = content; | ||
type: string, | ||
// Allowed attributes. Other attributes will be removed. | ||
attributes: $ReadOnlyArray<string>, | ||
// Allowed attributes. Other attributes will be removed. If this is omitted, all attributes are kept. | ||
attributes?: $ReadOnlyArray<string>, | ||
// Refine which entities are kept by whitelisting acceptable values with regular expression patterns. | ||
// It's also possible to use "true" to signify that a field is required to be present, | ||
// and "false" for fields required to be absent. | ||
whitelist: { | ||
// If this is omitted, all entities are kept. | ||
whitelist?: { | ||
[attribute: string]: string | boolean, | ||
@@ -598,0 +599,0 @@ }, |
{ | ||
"name": "draftjs-filters", | ||
"version": "2.2.2", | ||
"version": "2.2.3", | ||
"description": "Filter Draft.js content to preserve only the formatting you allow", | ||
@@ -5,0 +5,0 @@ "author": "Thibaud Colas", |
@@ -72,8 +72,9 @@ # [Draft.js filters](https://thibaudcolas.github.io/draftjs-filters/) [![npm](https://img.shields.io/npm/v/draftjs-filters.svg)](https://www.npmjs.com/package/draftjs-filters) [![Build Status](https://travis-ci.org/thibaudcolas/draftjs-filters.svg?branch=master)](https://travis-ci.org/thibaudcolas/draftjs-filters) [![Coverage Status](https://coveralls.io/repos/github/thibaudcolas/draftjs-filters/badge.svg)](https://coveralls.io/github/thibaudcolas/draftjs-filters) [<img src="https://cdn.rawgit.com/springload/awesome-wagtail/ac912cc661a7099813f90545adffa6bb3e75216c/logo.svg" width="104" align="right" alt="Wagtail">](https://wagtail.io/) | ||
type: string, | ||
// Allowed attributes. Other attributes will be removed. | ||
attributes: $ReadOnlyArray<string>, | ||
// Allowed attributes. Other attributes will be removed. If this is omitted, all attributes are kept. | ||
attributes?: $ReadOnlyArray<string>, | ||
// Refine which entities are kept by whitelisting acceptable values with regular expression patterns. | ||
// It's also possible to use "true" to signify that a field is required to be present, | ||
// and "false" for fields required to be absent. | ||
whitelist: { | ||
// If this is omitted, all entities are kept. | ||
whitelist?: { | ||
[attribute: string]: string | boolean, | ||
@@ -227,3 +228,3 @@ }, | ||
- `entityTypes` **\$ReadOnlyArray<{type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), whitelist: {}}>** | ||
- `entityTypes` **\$ReadOnlyArray<{type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), whitelist: {}?}>** | ||
- `entityType` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | ||
@@ -240,3 +241,3 @@ - `data` **{}** | ||
- `entityTypes` **$ReadOnlyArray<{type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), attributes: $ReadOnlyArray<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>}>** | ||
- `entityTypes` **$ReadOnlyArray<{type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), attributes: $ReadOnlyArray<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>?}>** | ||
- `content` **ContentState** | ||
@@ -243,0 +244,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
76830
1144
324