Allow using preedit as an alternative editing mechanism.

Work in progress.