# How to delete a seemingly undeletable raw HTML component?

**URL:** <https://discuss.openedx.org/t/how-to-delete-a-seemingly-undeletable-raw-html-component/6873>\
**Category:** Authoring\
**Created:** [March 17, 2022, 10:58pm UTC](https://discuss.openedx.org/t/how-to-delete-a-seemingly-undeletable-raw-html-component/6873 "2022-03-17T22:58:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rohan](https://avatars.discourse-cdn.com/v4/letter/r/f19dbf/32.png) [@Rohan](https://discuss.openedx.org/u/Rohan)\
**Post date:** [March 17, 2022, 10:58pm UTC](https://discuss.openedx.org/t/how-to-delete-a-seemingly-undeletable-raw-html-component/6873/1 "2022-03-17T22:58:21Z")

</div>

I pasted the raw HTML from [here](https://ace.c9.io/#nav=embedding) into a raw HTML Component.

Now I have a buggily-overlapping, non-movable, non-editable, non-deletable, non-rendering Component stuck in my Unit. (All other Components are still editable and movable.)

 ![image](https://us1.discourse-cdn.com/flex020/uploads/openedx/original/2X/c/c683740e9d937ab9c0567f618ee492ac7afce509.png)

Any ideas on how to delete this other than to copy all my Components into a new Unit, and delete this Unit? (Thus breaking all my /jump\_to\_id/ links…)

---

<div class="post-metadata">

**Author:** ![Rohan](https://avatars.discourse-cdn.com/v4/letter/r/f19dbf/32.png) [@Rohan](https://discuss.openedx.org/u/Rohan)\
**Post date:** [March 17, 2022, 11:21pm UTC](https://discuss.openedx.org/t/how-to-delete-a-seemingly-undeletable-raw-html-component/6873/2 "2022-03-17T23:21:07Z")

</div>

A minimal test case that seems to break things is the following in a raw HTML block:

```auto
<div id="editor">function foo(items) {
    var x = "All this is syntax highlighted";
    return x;
}</div>

```

Note, I’m running Tutor, Lilac, and the indigo theme, incase any of that matters.

---

<div class="post-metadata">

**Author:** ![sarina](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/sarina/32/2308_2.png) [@sarina](https://discuss.openedx.org/u/sarina)\
**Post date:** [March 18, 2022, 2:06pm UTC](https://discuss.openedx.org/t/how-to-delete-a-seemingly-undeletable-raw-html-component/6873/3 "2022-03-18T14:06:48Z")

</div>

Caveat: I do not know if this is the _best_ way to do this, but you could export your course - giving you an archive file of OLX. You could find the unit in the OLX, delete it, and then reimport the archive. I’d do this import into a test course first. See [4. OLX Course Structure — EdX Open Learning XML Guide - Alpha Version documentation](https://edx.readthedocs.io/projects/edx-open-learning-xml/en/latest/directory-structure.html) for more on OLX

---

<div class="post-metadata">

**Author:** ![sarina](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/sarina/32/2308_2.png) [@sarina](https://discuss.openedx.org/u/sarina)\
**Post date:** [March 18, 2022, 2:09pm UTC](https://discuss.openedx.org/t/how-to-delete-a-seemingly-undeletable-raw-html-component/6873/4 "2022-03-18T14:09:04Z")

</div>

I suspect that the raw HTML component is sandboxed such that you can’t put that code in the raw HTML. How are you trying to load the library they mention? (`Get prebuilt version of ace from ace-builds repository`)

---

<div class="post-metadata">

**Author:** ![Rohan](https://avatars.discourse-cdn.com/v4/letter/r/f19dbf/32.png) [@Rohan](https://discuss.openedx.org/u/Rohan)\
**Post date:** [March 18, 2022, 2:28pm UTC](https://discuss.openedx.org/t/how-to-delete-a-seemingly-undeletable-raw-html-component/6873/5 "2022-03-18T14:28:54Z")

</div>

Thanks for the ideas. I just ended up recreating my unit. So at this point it’s more about the fact that there’s some sort of weird bug here.

Re how I was trying to load the library, I just checked out the code they said and put `/ace-builds/` onto the root of my web server’s www directory. But given that the minimized div test case breaks the page without any reference to ace.js, I suspect that’s besides the point.

---

<div class="post-metadata">

**Author:** ![Dean](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/dean/32/4787_2.png) [@Dean](https://discuss.openedx.org/u/Dean)\
**Post date:** [March 23, 2022, 7:20am UTC](https://discuss.openedx.org/t/how-to-delete-a-seemingly-undeletable-raw-html-component/6873/6 "2022-03-23T07:20:55Z")

</div>

Instead of copy you can “Move” from the course Outline.

---

<div class="post-metadata">

**Author:** ![Rohan](https://avatars.discourse-cdn.com/v4/letter/r/f19dbf/32.png) [@Rohan](https://discuss.openedx.org/u/Rohan)\
**Post date:** [March 31, 2022, 1:57pm UTC](https://discuss.openedx.org/t/how-to-delete-a-seemingly-undeletable-raw-html-component/6873/7 "2022-03-31T13:57:13Z")

</div>

I don’t know what you mean. How can you move a component from within a unit from the course outline?

---

<div class="post-metadata">

**Author:** ![Dean](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/dean/32/4787_2.png) [@Dean](https://discuss.openedx.org/u/Dean)\
**Post date:** [March 31, 2022, 2:50pm UTC](https://discuss.openedx.org/t/how-to-delete-a-seemingly-undeletable-raw-html-component/6873/8 "2022-03-31T14:50:33Z")

</div>

Indeed, you can only do it from the Unit itself:

![Screen Shot 2022-03-31 at 15.48.05](https://us1.discourse-cdn.com/flex020/uploads/openedx/original/2X/1/12ae8c8a0a39124bccec8df0b42ec9df21922be4.png)

Thanks.
