html-xblock


Namehtml-xblock JSON
Version 1.3.7 PyPI version JSON
download
home_pagehttps://github.com/open-craft/xblock-html
SummaryHTML XBlock will help creating and using a secure and easy-to-use HTML blocks
upload_time2024-03-18 13:27:50
maintainer
docs_urlNone
authorOpenCraft
requires_python>=3.8
licenseAGPL v3
keywords python edx
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # HTML XBlock

[![build](https://circleci.com/gh/open-craft/xblock-html/tree/master.svg?style=shield)](https://circleci.com/gh/open-craft/xblock-html/tree/master) [![codecov](https://codecov.io/gh/open-craft/xblock-html/branch/master/graph/badge.svg)](https://codecov.io/gh/open-craft/xblock-html)


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:

```shell
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 `table`s 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:

```shell
$ 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:

```shell
$ make test
```
Or if you want to check the code quality only, hit:
```shell
$ make quality
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/open-craft/xblock-html",
    "name": "html-xblock",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "Python edx",
    "author": "OpenCraft",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/47/83/1fbaa723b2ea2aa0b3a259f7fe1027b113defa07e69028de1cdbb819b81e/html-xblock-1.3.7.tar.gz",
    "platform": null,
    "description": "# HTML XBlock\n\n[![build](https://circleci.com/gh/open-craft/xblock-html/tree/master.svg?style=shield)](https://circleci.com/gh/open-craft/xblock-html/tree/master) [![codecov](https://codecov.io/gh/open-craft/xblock-html/branch/master/graph/badge.svg)](https://codecov.io/gh/open-craft/xblock-html)\n\n\nA new HTML XBlock that is designed with security and embedding in mind. \n\n## Introduction\nThis XBlock provides a newer alternative to the existing HTML XModule in edX platform as it presents a number of \nproblems when trying to embed it in another site (in particular, it often hosts content that depends on JS globals like \njQuery being present, and it allows users to include arbitrary JavaScript).\n\n## Installation\nYou may install XBlock-html using its setup.py, or if you prefer to use pip, run:\n\n```shell\npip install https://github.com/open-craft/xblock-html\n```\nYou may specify the `-e` flag if you intend to develop on the repo.\n\nNote that as of version 1.0.0, Python 2.7 is no longer supported. The current minimum Python version is 3.8.\n\nTo 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.\n\n## Configuration\n\nThe `table`s 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.\nAdd the following to your XBLOCK_SETTINGS part of the CMS/Studio confguration:\n\n```\nXBLOCK_SETTINGS = {\n    \"html5\": {\n        \"table_custom_classes\": [\"your-list\", \"of-css\", \"classes\"]\n    }\n}\n```\nThese classes will be available in the \"General\" tab of \"Table Properties\" dialog, under \"Classes\".\n\n## Development\nIf you're willing to develop on this repo, you need to be familiar with different technologies and the repos' \ndependencies. However, to make things easier to setup and to manage, there're bunch of make commands that you can use\n to do things faster.\n \n### Setting the requirements up\nHitting the following command will install in your python environment all the requirements you need for this project:\n\n```shell\n$ make requirements\n```\n\n### Running tests\nTests are essential for this project to keep all its features working as expected. To check your changes you can use:\n\n```shell\n$ make test\n```\nOr if you want to check the code quality only, hit:\n```shell\n$ make quality\n```\n",
    "bugtrack_url": null,
    "license": "AGPL v3",
    "summary": "HTML XBlock will help creating and using a secure and easy-to-use HTML blocks",
    "version": "1.3.7",
    "project_urls": {
        "Homepage": "https://github.com/open-craft/xblock-html"
    },
    "split_keywords": [
        "python",
        "edx"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2659f003e659bdb0aa5c21a22738f4cac1942e332f5cb301254ff95203aadf8d",
                "md5": "360bf590680f5ab7a322743d857336f0",
                "sha256": "1e69f724e9bea78c086ea09aef0696f851ca6a1169d69c12d0cd9f1ebb720aec"
            },
            "downloads": -1,
            "filename": "html_xblock-1.3.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "360bf590680f5ab7a322743d857336f0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 43463,
            "upload_time": "2024-03-18T13:27:48",
            "upload_time_iso_8601": "2024-03-18T13:27:48.648277Z",
            "url": "https://files.pythonhosted.org/packages/26/59/f003e659bdb0aa5c21a22738f4cac1942e332f5cb301254ff95203aadf8d/html_xblock-1.3.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "47831fbaa723b2ea2aa0b3a259f7fe1027b113defa07e69028de1cdbb819b81e",
                "md5": "ce6014254d4535001a0b0f1a83230f6f",
                "sha256": "401ab9791fb015d381cf8d839b53053295d64d69d085c0187822ba764e7d1276"
            },
            "downloads": -1,
            "filename": "html-xblock-1.3.7.tar.gz",
            "has_sig": false,
            "md5_digest": "ce6014254d4535001a0b0f1a83230f6f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 42049,
            "upload_time": "2024-03-18T13:27:50",
            "upload_time_iso_8601": "2024-03-18T13:27:50.035304Z",
            "url": "https://files.pythonhosted.org/packages/47/83/1fbaa723b2ea2aa0b3a259f7fe1027b113defa07e69028de1cdbb819b81e/html-xblock-1.3.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-18 13:27:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "open-craft",
    "github_project": "xblock-html",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "html-xblock"
}
        
Elapsed time: 0.22133s