GithubHelp home page GithubHelp logo

titaned / xblock-html Goto Github PK

View Code? Open in Web Editor NEW

This project forked from open-craft/xblock-html

0.0 0.0 0.0 2.37 MB

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

License: GNU Affero General Public License v3.0

JavaScript 20.18% Python 61.67% CSS 10.78% Makefile 5.24% HTML 2.13%

xblock-html's Introduction

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

xblock-html's People

Contributors

opencraft-requirements-bot avatar iamjazzar avatar agrendalath avatar cup0fcoffee avatar tecoholic avatar taniwha avatar gustavokatel avatar navinkarkera avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.