Skip to content

Commit

Permalink
docs(readme): update main config documentation in README
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaudcolas committed Jan 25, 2019
1 parent bbdd7ef commit c3b6e24
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
24 changes: 13 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,21 @@ Here are the available options:

```jsx
// Whitelist of allowed block types. unstyled and atomic are always included.
blocks: Array<string>,
blocks: $ReadOnlyArray<string>,
// Whitelist of allowed inline styles.
styles: Array<string>,
styles: $ReadOnlyArray<string>,
// Whitelist of allowed entities.
entities: Array<{
// Entity type, eg. "LINK"
type: string,
// Allowed attributes. Other attributes will be removed.
attributes: Array<string>,
// Refine which entities are kept by whitelisting acceptable values with regular expression patterns.
whitelist: {
[attribute: string]: string,
},
entities: $ReadOnlyArray<{
// Entity type, eg. "LINK"
type: string,
// Allowed attributes. Other attributes will be removed.
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: {
[attribute: string]: string | boolean,
},
}>,
// Maximum amount of depth for lists (0 = no nesting).
maxNesting: number,
Expand Down
2 changes: 2 additions & 0 deletions src/lib/filters/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ type FilterOptions = {
// Allowed attributes. Other attributes will be removed.
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: {
[attribute: string]: string | boolean,
},
Expand Down

0 comments on commit c3b6e24

Please sign in to comment.