implement TextEditor constructor's text attribute
truncate content when setting maxSize