canvas-lms/packages/canvas-rce
Gonzalo Penaranda 72d3a816b8 Remove 'instructure-embeds' unused plugin
fixes MAT-648
flag=none

Test Plan:
 - Rebuild canvas-rce and restart webpack
 just in case

Change-Id: I21d5e9798d144a323e4f7be05c4877d850a6c6d9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/286602
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: David Lyons <lyons@instructure.com>
2022-03-10 18:16:28 +00:00
..
bin
demo Move RCS interface out of sidebar 2022-01-03 19:54:52 +00:00
doc Add initial RCE I18n docs 2021-10-08 17:04:14 +00:00
github-pages Stop using google fonts on user-facing pages 2022-02-07 20:55:16 +00:00
jest Recreate the standalone demo app for working on the RCE 2021-04-29 14:02:58 +00:00
locales Revert "[i18n] Update RCE translations." 2022-01-28 20:52:15 +00:00
scripts Fix commitTranslations to not miss wrapper file 2022-02-09 19:08:44 +00:00
src Remove 'instructure-embeds' unused plugin 2022-03-10 18:16:28 +00:00
test Add support for webp images 2022-03-08 23:56:11 +00:00
testcafe Don't give RCE the `application` role 2020-12-08 19:55:43 +00:00
.dockerignore
.eslintrc Update eslint to v7 2021-05-20 18:28:51 +00:00
.gitignore Provide default test coverage data output dir 2021-06-24 17:19:47 +00:00
.npmignore
.prettierignore
.testcaferc.json spec: testcafe updates for canvas-rce 2020-12-07 21:24:40 +00:00
DEVELOPMENT.md Move RCS interface out of sidebar 2022-01-03 19:54:52 +00:00
Dockerfile upgrade to node14 2021-01-27 15:33:52 +00:00
LICENSE
README.md Prep canvas-rce for npm publish 2021-05-14 17:15:17 +00:00
babel-register.js canvas-rce: tell babel to process packages/ 2021-04-06 19:50:05 +00:00
babel.config.js Stop babel warnings when builds canvas-rce 2021-06-25 15:11:09 +00:00
build.sh
docker-compose.yml bump all docker-compose files to 2.3 2020-07-28 20:44:44 +00:00
jest.config.js Necessary tweaks I discovered adding the CanvasRce component to a page 2021-06-22 21:11:02 +00:00
mocha-reporter-config.js Provide default test coverage data output dir 2021-06-24 17:19:47 +00:00
package.json Bump tinymce-a11y-checker to 3.3.4 2022-02-15 19:18:40 +00:00
webpack.demo.config.js Recreate the standalone demo app for working on the RCE 2021-04-29 14:02:58 +00:00
webpack.dev.config.js Recreate the standalone demo app for working on the RCE 2021-04-29 14:02:58 +00:00
webpack.shared.config.js Move math to a canvas-rce plugin 2021-12-17 17:39:36 +00:00
webpack.testcafe.config.js rce: add testcafe 2019-05-07 19:38:27 +00:00

README.md

Canvas Rich Content Editor

The Canvas LMS Rich Content Editor extracted in it's own npm package for use across multiple services. In the canvas ecosystem, this npm module is used in pair with a running canvas-rce-api microservice.

Some features require a running instance of the canvas-rce-api, but you do not need that instance in order to do development on canvas-rce. (see docs/development.md)

The first customer of the canvas-rce is the canvas-lms LMS so documentation and references throughout documentation might reflect and assume the use of canvas-lms.

Install and setup

As a published npm module, you can add canvas-rce to your node project by doing the following:

npm install canvas-rce --save

For guidance on how canvas-rce is used within canvas, please reference the canvas-lms use of canvas-rce to get an idea on how to incorporate it into your project. Pay special attention to the RichContentEditor.js and serviceRCELoader.js.

Outside of canvas, the CanvasRce React component is your entry point. Work is ongoing to make the props to CanvasRce more rational. Please be patient.

Tests

While canvas consumes the es modules build of the rce, Jest tests are run against the commonjs build, so make sure you've built the commonjs assets before running tests:

yarn build:canvas
yarn test:jest

There are still legacy mocha tests run with yarn test:mocha. yarn test runs them all.

test debugging hints

yarn test:jest:debug path/to/__test__/file.test.js

will break and wait for you to attach a debugger (e.g. chrome://inspect/#devices).

Similarly, for mocha tests

yarn test:mocha:debug path/to/test/file.test.js

Both those commands may include a --watch argument to keep the process alive while you iterate.

Polyfills

This project makes use of modern JavaScript APIs like Promise, Object.assign, Array.prototype.includes, etc. which are present in modern browsers but may not be present in old browsers like IE 11. In order to not send unnecessarily large and duplicated code bundles to the browser, consumers are expected to have already globally polyfilled those APIs. Canvas only supports modern browsers and the rce has not been tested in older browsers like IE. If you need suggestions for how to include polyfills in your own app, you can just put this in your html above the script that includes canvas-rce:

<script src="https://cdn.polyfill.io/v2/polyfill.min.js?rum=0"></script>

(See: https://polyfill.io/v2/docs/ for more info)

Development

See DEVELOPMENT.md