18 lines
382 B
JavaScript
18 lines
382 B
JavaScript
module.exports = class {
|
|
onCreate(input) {
|
|
this.state = {
|
|
showCharacter: false,
|
|
paragraphs: input.comment.source.split('\n').filter(l => l.length > 1),
|
|
}
|
|
}
|
|
|
|
onInput(input) {
|
|
if (this.state) {
|
|
this.state.paragraphs = input.comment.source.split('\n').filter(l => l.length > 1)
|
|
}
|
|
}
|
|
|
|
toggle(key) {
|
|
this.state[key] = !this.state[key]
|
|
}
|
|
} |