text: Add support for pre-edit string