Skip to main content

HTML XBlock will help creating and using a secure and easy-to-use HTML blocks

Project description

HTML XBlock

build codecov

A new HTML XBlock that is designed with security and embedding in mind.

Introduction

This XBlock provides a newer alternative to the existing HTML XModule in edX platform as it presents a number of problems when trying to embed it in another site (in particular, it often hosts content that depends on JS globals like jQuery being present, and it allows users to include arbitrary JavaScript).

Installation

You may install XBlock-html using its setup.py, or if you prefer to use pip, run:

pip install https://github.com/open-craft/xblock-html

You may specify the -e flag if you intend to develop on the repo.

Note that as of version 1.0.0, Python 2.7 is no longer supported. The current minimum Python version is 3.8.

To enable this block, add "html5" and "excluded_html5" to the course's advanced module list. The options Text and Exclusion will appear in the advanced components.

Configuration

The tables added to the content in the WYSIWYG editor can be styled according the theming requirements of the deployment by adding custom CSS classes to them. Add the following to your XBLOCK_SETTINGS part of the CMS/Studio confguration:

XBLOCK_SETTINGS = {
    "html5": {
        "table_custom_classes": ["your-list", "of-css", "classes"]
    }
}

These classes will be available in the "General" tab of "Table Properties" dialog, under "Classes".

Development

If you're willing to develop on this repo, you need to be familiar with different technologies and the repos' dependencies. However, to make things easier to setup and to manage, there're bunch of make commands that you can use to do things faster.

Setting the requirements up

Hitting the following command will install in your python environment all the requirements you need for this project:

$ make requirements

Running tests

Tests are essential for this project to keep all its features working as expected. To check your changes you can use:

$ make test

Or if you want to check the code quality only, hit:

$ make quality

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

html-xblock-1.3.5.tar.gz (42.0 kB view details)

Uploaded Source

Built Distribution

html_xblock-1.3.5-py3-none-any.whl (43.4 kB view details)

Uploaded Python 3

File details

Details for the file html-xblock-1.3.5.tar.gz.

File metadata

  • Download URL: html-xblock-1.3.5.tar.gz
  • Upload date:
  • Size: 42.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for html-xblock-1.3.5.tar.gz
Algorithm Hash digest
SHA256 775ca1534e05377e785ffbe5148d52e05f2c700f19b4b1bbf045a8d156b2b849
MD5 d69773f1a373bd636ea2c12b63c5324e
BLAKE2b-256 bd43441d201ea8eabaf36305dc5f4a1c817eab70d12a7b2b9a2a0490859b5205

See more details on using hashes here.

Provenance

File details

Details for the file html_xblock-1.3.5-py3-none-any.whl.

File metadata

  • Download URL: html_xblock-1.3.5-py3-none-any.whl
  • Upload date:
  • Size: 43.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for html_xblock-1.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 709e79717e67b78eaefe8ce6561e8e8e70a412130c173952df8407dcef2693bf
MD5 126a3f460575cc80ad8616e16d1b1da6
BLAKE2b-256 218253c724583e8727aad26195b6be602c71e652d8314fb5e881871989b77197

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page