# Enabling usage of Xblocks in Libraries (beta)

**URL:** <https://discuss.openedx.org/t/enabling-usage-of-xblocks-in-libraries-beta/19211>\
**Category:** Site Operators\
**Created:** [August 7, 2026, 5:05pm UTC](https://discuss.openedx.org/t/enabling-usage-of-xblocks-in-libraries-beta/19211 "2026-08-07T17:05:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Beth\_Cimini](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/beth_cimini/32/9716_2.png) [@Beth\_Cimini](https://discuss.openedx.org/u/Beth_Cimini)\
**Post date:** [August 7, 2026, 5:05pm UTC](https://discuss.openedx.org/t/enabling-usage-of-xblocks-in-libraries-beta/19211/1 "2026-08-07T17:05:45Z")

</div>

I’m relatively new to OpenEdX, I’ve installed an Xblock (specifically, the h5p one) into our tutor setup (`21.0.8`), and it seems to be working in that I can enable it in courses and the Xblock works fine there, but I cannot figure out how to enable it in the library. GitHub [implies this should be possible](https://github.com/openedx/frontend-app-authoring/issues/1093) , but I am struggling to find a docs page, forum post, or anything else that helps me figure out how to enable this functionality. Can anyone point me at the docs I’ve missed? Thanks!

---

<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:** [August 7, 2026, 5:53pm UTC](https://discuss.openedx.org/t/enabling-usage-of-xblocks-in-libraries-beta/19211/2 "2026-08-07T17:53:16Z")

</div>

👋 hi @Beth_Cimini and welcome to the community!! Thanks for reporting on your Tutor version 🙂

Are you using this XBlock? [GitHub - edly-io/h5pxblock: Xblock which provides ability to play H5P content in open edX · GitHub](https://github.com/edly-io/h5pxblock) or a different one? Regardless, do you know what version you might have installed?

@braden or @kmccormick - any thoughts on this one?

---

<div class="post-metadata">

**Author:** ![Beth\_Cimini](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/beth_cimini/32/9716_2.png) [@Beth\_Cimini](https://discuss.openedx.org/u/Beth_Cimini)\
**Post date:** [August 7, 2026, 6:30pm UTC](https://discuss.openedx.org/t/enabling-usage-of-xblocks-in-libraries-beta/19211/3 "2026-08-07T18:30:36Z")

</div>

Hi Sarina,

Yes, I’m using that block; I didn’t attempt to set up a specific version, just added it with `OPENEDX_EXTRA_PIP_REQUIREMENTS`, so I’m not certain, but I set up the server about a month ago so it’s presumably the latest release (0.2.18, from January), I can try to dig in more if you think that would help.

My overall setup stack was on a clean AWS - EC2 ubuntu 26.04, add Docker and pixi, then

```auto
pixi init && pixi add python && pixi add --pypi "tutor[full]" && pixi shell

#Below takes a while! (PWD is to get around pernicious "Docker compose can't access the config file" issue on EC2)

export TUTOR_ROOT=$PWD
tutor local launch

tutor config save --append OPENEDX_EXTRA_PIP_REQUIREMENTS=h5p-xblock
tutor images build openedx
tutor plugins enable cairn && tutor plugins enable credentials && tutor plugins enable deck && tutor plugins enable discovery && tutor plugins enable indigo && tutor plugins enable jupyter && tutor plugins enable notes
tutor local launch

```

---

<div class="post-metadata">

**Author:** ![Beth\_Cimini](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/beth_cimini/32/9716_2.png) [@Beth\_Cimini](https://discuss.openedx.org/u/Beth_Cimini)\
**Post date:** [August 11, 2026, 8:37pm UTC](https://discuss.openedx.org/t/enabling-usage-of-xblocks-in-libraries-beta/19211/4 "2026-08-11T20:37:59Z")

</div>

We upgraded to 22.0.0 to see if that would resolve the issue - unfortunately, while we still can add in a course with the Xblock enabled (screenshot 1), we still see no way to add in the library (screenshot 2). Anything you can do to help us figure this out is appreciated!

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

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

---

<div class="post-metadata">

**Author:** ![rodrigo.mendez](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/rodrigo.mendez/32/9584_2.png) [@rodrigo.mendez](https://discuss.openedx.org/u/rodrigo.mendez)\
**Post date:** [August 11, 2026, 9:18pm UTC](https://discuss.openedx.org/t/enabling-usage-of-xblocks-in-libraries-beta/19211/5 "2026-08-11T21:18:38Z")

</div>

Hi @Beth_Cimini In order to enable custom XBlocks on Libraries you need to add the XBlock name (same name you use on the Advanced Settings in courses) to the LIBRARY\_ENABLED\_BLOCKS setting, to do this you need to create a tutor plugin, here is minimal example on how you may do it:

```python
from tutor import hooks

# Extra XBlocks to add to the Libraries V2 block picker
# (LIBRARY_ENABLED_BLOCKS in cms/envs/common.py).
# Replace these with your own custom block identifiers.
EXTRA_LIBRARY_BLOCKS = (
    "my-custom-xblock",
    "another-xblock",
)

hooks.Filters.ENV_PATCHES.add_item(
    (
        "openedx-cms-common-settings",
        f"""
_EXTRA_LIBRARY = {EXTRA_LIBRARY_BLOCKS!r}

# Append custom blocks that aren't already in the default list.
LIBRARY_ENABLED_BLOCKS = globals().get("LIBRARY_ENABLED_BLOCKS", [])
LIBRARY_ENABLED_BLOCKS += [
    b for b in _EXTRA_LIBRARY if b not in LIBRARY_ENABLED_BLOCKS
]
"""
    )
)

```

Drop this in a Tutor plugin file (e.g. my\_extra\_library\_blocks.py) and it will inject the setting patch at CMS startup. Just swap the block identifiers in EXTRA\_LIBRARY\_BLOCKS for your actual xblock names.

**PLEASE NOTE:** In my experience, not all custom XBlocks work fine on the Libraries editor and may need code changes to work correctly there.

---

<div class="post-metadata">

**Author:** ![Beth\_Cimini](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/beth_cimini/32/9716_2.png) [@Beth\_Cimini](https://discuss.openedx.org/u/Beth_Cimini)\
**Post date:** [August 11, 2026, 10:12pm UTC](https://discuss.openedx.org/t/enabling-usage-of-xblocks-in-libraries-beta/19211/6 "2026-08-11T22:12:21Z")

</div>

Thanks @rodrigo.mendez . I was able to add the plugin and add the `h5pxblock` to the library, but indeed if I try to use it to add an h5p file, it doesn’t quiiiiite work. (It uploads but never closes the save dialog to actually ADD the h5p). I’ve made a GH issue at the Xblock Git repo - thanks!
