i once made one dos-based text editor with feature of just creating text files. i wont give away the code but i can give u the idea.
use getch()(assuming that u are using turbo ) to input each character.(to also input carriage return and backspace).
declare a string where the text data is stored.
after each keypress, process the input and do the appropriate actions.
eg. when a backspace is inputted, delete the last character of the string.
add a newline when a carriage return is inputted.
it is easy but may be long.
all the best