diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8ab86c134..1b3f2d801 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,8 +8,13 @@ on: jobs: build: - name: Browser tests + name: "Browser tests (ElementInternals: ${{ matrix.elementInternals }})" runs-on: ubuntu-latest + strategy: + matrix: + elementInternals: [false, true] + env: + EDITOR_ELEMENT_INTERNALS: "${{ matrix.elementInternals }}" steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 diff --git a/README.md b/README.md index 9a1cfe6e7..28a5c7ed4 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ This is the approach that all modern, production ready, WYSIWYG editors now take
Trix supports all evergreen, self-updating desktop and mobile browsers.
-Trix is built with established web standards, notably [Custom Elements](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements), [Mutation Observer](https://dom.spec.whatwg.org/#mutation-observers), and [Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise). +Trix is built with established web standards, notably [Custom Elements](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements), [Element Internals](https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals), [Mutation Observer](https://dom.spec.whatwg.org/#mutation-observers), and [Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise). # Getting Started @@ -49,12 +49,26 @@ document.addEventListener("trix-before-initialize", () => { ## Creating an Editor -Place an empty `` tag on the page. Trix will automatically insert a separate `` before the editor. +Place an empty `` tag on the page. If the `` element is rendered with a `[toolbar]` attribute that references the element by its `[id]`, it will treat that element as its toolbar: + +```html + + + +``` + +Otherwise, Trix will automatically insert a separate `` before the editor. Like an HTML `