DEV Community

Discussion on: An Open Source Medium Like WYSIWYG Editor

Collapse
tohidazizi profile image
Tohid • Edited

Hi,

What did I wrong? I can't see anything on my page?

<html>
<head>
    <script type="module"
        src="https://unpkg.com/@deckdeckgo/inline-editor@latest/dist/deckdeckgo-inline-editor/deckdeckgo-inline-editor.esm.js"></script>

    <script nomodule=""
        src="https://unpkg.com/@deckdeckgo/inline-editor@latest/dist/deckdeckgo-inline-editor/deckdeckgo-inline-editor.js"></script>
</head>
<body>
    <deckgo-inline-editor sticky-mobile="true"></deckgo-inline-editor>
</body>
</html>
Enter fullscreen mode Exit fullscreen mode
Collapse
daviddalbusco profile image
David Dal Busco Author • Edited

Hi @tohidazizi ,

The script has change a little since the publication of the article and I did not reflect it in it. The docs at least is up-to-date 😅.

Here's the updated snippet:

<html>
<head>
    <script type="module" src="https://unpkg.com/@deckdeckgo/inline-editor@latest/dist/deckdeckgo-inline-editor/deckdeckgo-inline-editor.esm.js"></script>
</head>
<body>

<div contenteditable>This text will be editable</div><h1 contenteditable>This title too</h1><deckgo-inline-editor></deckgo-inline-editor>

</body>
</html>
Enter fullscreen mode Exit fullscreen mode
Collapse
tohidazizi profile image
Tohid

Thanks man. This one worked well!

Thread Thread
daviddalbusco profile image
David Dal Busco Author

Sweet! Let me know if you have more questions or notice any issue.

Thread Thread
tohidazizi profile image
Tohid

One last thing: what is the difference between slot="content" and slot="title", can't find it in the doc. What are other options for "slot" here?

Thread Thread
daviddalbusco profile image
David Dal Busco Author

That's a typo 😅. I have taken (copy/paste) the above example from content of our editor for slides in which these slot are useful. You can safely ignore these. I have edited my above example.