Comments (2)
The code example is var quill = new Quill('#editor');
which does get stored globally as that is a characteristic of var
in an unscoped context. The particular Codepen uses let
which is not supposed to but does anyways possibly because the way Babel is converting this to var
but regardless the demo does work as documented. I'll change the let
to var
ensure this for future Babel/Codepen versions.
from docs-old.
Ah I see the problem now. When the Codepen project is open on their website, the code is inserted in a normal script tag. When embedding in your docs page, they put it in a <script type="module">
, which prevents top-level variables from mixing into the global scope.
When using module type script tags, you have to explicitly attach variables to the window object when you want them to be global. (I just tried it with the change from let
to var
and it still doesn't work, so it needs to also have a window.quill = quill
for the instructions in the tutorial to work).
from docs-old.
Related Issues (9)
- Improve final `Counter` module pen HOT 1
- CodePens on http://quilljs.com/guides/cloning-medium-with-parchment/ don't work HOT 1
- Final CodePen on http://quilljs.com/guides/cloning-medium-with-parchment/ is missing the embeds HOT 2
- Anchor offset
- Sourcecode not working correct HOT 3
- Playground has the code-block button but missing the syntax module HOT 1
- Include a link to the 1.0 website on master HOT 1
- The codepen example can't get the source. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docs-old.