DEV Community

[Comment from a deleted post]
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 • 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!

 
daviddalbusco profile image
David Dal Busco

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

 
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?

 
daviddalbusco profile image
David Dal Busco

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.