Draggable

This example shows how to drag and drop something into Article.

  • card-1
  • card-2
  • card-3
Card title
Card subtitle

Some quick example text to build on the card title and make up the bulk of the card's content.

Card link Another link
...

Some quick example text to build on the card title and make up the bulk of the card's content.

Header
Primary card title

Some quick example text to build on the card title and make up the bulk of the card's content.

Code

<!DOCTYPE html>
<html>
<head>
    <title>Article Editor</title>
    <meta charset="utf-8">

    <!-- css -->
    <link rel="stylesheet" href="/your-article-dist-path/article-editor.min.css" />
</head>
<body>
    <!-- element -->
    <div style="display: flex">
        <div style="flex: auto;">
            <textarea id="entry">...</textarea>
        </div>
        <div style="width: 200px;">
            <ul>
                <li><img src="card-1.png" data-arx-drop-id="card-01"></li>
                <li><img src="card-2.png" data-arx-drop-id="card-02"></li>
                <li><img src="card-3.png" data-arx-drop-id="card-03"></li>
            </ul>
        </div>
    </div>

    <div data-arx-drop-item="card-01" style="display: none">...html code of card 01...</div>
    <div data-arx-drop-item="card-02" style="display: none">...html code of card 02...</div>
    <div data-arx-drop-item="card-03" style="display: none">...html code of card 03...</div>

    <!-- js -->
    <script src="/your-article-dist-path/article-editor.min.js"></script>

    <!-- call -->
    <script>
    ArticleEditor('#entry', {
        css: '/your-article-dist-path/'
    });
    </script>
</body>
</html>