How to delete a seemingly undeletable raw HTML component?

I pasted the raw HTML from here 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.)

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…)

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

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

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

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 for more on OLX

1 Like

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)

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.

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

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

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

Screen Shot 2022-03-31 at 15.48.05


1 Like