added init support for texteditor widget