This is a base of line-based text editor