# Codemirror allows me to edit other elements on my website

**URL:** <https://discuss.codemirror.net/t/codemirror-allows-me-to-edit-other-elements-on-my-website/1784>\
**Category:** Uncategorized\
**Created:** [July 18, 2018, 12:03pm UTC](https://discuss.codemirror.net/t/codemirror-allows-me-to-edit-other-elements-on-my-website/1784 "2018-07-18T12:03:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![danblackadder](https://discuss.codemirror.net/letter_avatar_proxy/v4/letter/d/7bcc69/32.png) [@danblackadder](https://discuss.codemirror.net/u/danblackadder)\
**Post date:** [July 18, 2018, 12:03pm UTC](https://discuss.codemirror.net/t/codemirror-allows-me-to-edit-other-elements-on-my-website/1784/1 "2018-07-18T12:03:05Z")

</div>

Hi,

I’ve searched, and can’t seem to find a solution to this. I feel like I am being really dumb and missing something really obvious.

I have a Vue component using codemirror, and when I edit CSS in the codemirror, it allows me to edit all of the CSS on my entire web page. This also works with the JavaScript mode, which allows me to console log different variables, and will not let me use variables which are already in use on my website.

Is there a way to isolate codemirror to its own element which stops it editing everything else?

Thanks,  
Dan

---

<div class="post-metadata">

**Author:** ![danblackadder](https://discuss.codemirror.net/letter_avatar_proxy/v4/letter/d/7bcc69/32.png) [@danblackadder](https://discuss.codemirror.net/u/danblackadder)\
**Post date:** [July 18, 2018, 3:58pm UTC](https://discuss.codemirror.net/t/codemirror-allows-me-to-edit-other-elements-on-my-website/1784/2 "2018-07-18T15:58:59Z")

</div>

Figured out this was because we were injecting the CSS/JS straight into the head as it was being edited.

Please close and ignore.

Thanks
