make markdown text area functional by fixing scope issue