[feature/editor-code-tabs] Check for browser support in function

Check for browser support and valid textarea in function instead of
before applying function.

PHPBB3-11557