getText, setText multi-editor compatibility

This modification allows getText and setText function to work when we are using more than 1 editor in the same page.