Add onFinish

Adds the onFinish optional function, which is executed when the text effect finishes.