Skip to content

Commit

Permalink
Added support for allowEmpty init prop
Browse files Browse the repository at this point in the history
  • Loading branch information
rsimon committed Dec 2, 2021
1 parent 52a68c2 commit 3f4f502
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ <h1>Homer: The Odyssey</h1>
var r = Recogito.init({
content: 'content', // Element id or DOM node to attach to
locale: 'auto',
allowEmpty: true,
widgets: [
{ widget: 'COMMENT' },
{ widget: 'TAG', vocabulary: [ 'Place', 'Person', 'Event', 'Organization', 'Animal' ] }
Expand Down
1 change: 1 addition & 0 deletions src/TextAnnotator.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ export default class TextAnnotator extends Component {
annotation={this.state.selectedAnnotation}
selectedElement={this.state.selectedDOMElement}
readOnly={readOnly}
allowEmpty={this.props.config.allowEmpty}
widgets={this.props.config.widgets}
env={this.props.env}
onAnnotationCreated={this.onCreateOrUpdateAnnotation('onAnnotationCreated')}
Expand Down

0 comments on commit 3f4f502

Please sign in to comment.