code sample for text plugin