From d77d519fbed19a47276867b30a1b5eaf425d421c Mon Sep 17 00:00:00 2001 From: Calum Knott Date: Fri, 17 Nov 2023 07:42:06 +0000 Subject: [PATCH] readme updates --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e94634b..671c960 100644 --- a/README.md +++ b/README.md @@ -50,23 +50,23 @@ https://cdn.jsdelivr.net/npm/@calumk/codecup ## Usage ```js -import codecup from 'codecup'; +import codecup from '@calumk/codecup'; -const flask = new codecup('#my-selector', { language: 'js' }); +const cup = new codecup('#my-selector', { language: 'js' }); ``` You can also pass a DOM element instead of a selector: ```js import codecup from 'codecup'; const editorElem = document.getElementById('editor'); -const flask = new codecup(editorElem, { language: 'js' }); +const cup = new codecup(editorElem, { language: 'js' }); ``` Usage with Shadow DOM: ```js import codecup from 'codecup'; ... const shadowElem = this.shadowRoot.querySelector('#editor'); -const flask = new codecup(shadowElem, { language: 'js', styleParent: this.shadowRoot }); +const cup = new codecup(shadowElem, { language: 'js', styleParent: this.shadowRoot }); ``` ### Listening for changes in editor