Fixed JS throwing errors

Now that the variable is passed to the view with TinyMCE, the JS is still not working.

I've fixed the JS errors but the full screen option is still not working. I really don't get the logic there.
Why set only the height and not the width? Why is it in a .resize() event?

I don't know if I should make a PR considering it's still not working but at least it fixes the bugs in the console.