dthy
@dthy (dorrrothy)

Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

markedファンクションが使えない

解決したいこと

markedファンクションを使用してウェブ上に表示させたい。
下記のコードで実行しても何も表示されません。

該当するソースコード

<html>
<head>
    <meta charset="utf-8"/>
    <title>Marked in the browser</title>
    <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
</head>

<body>
    <div id ="content"></div>

    <script>
        document.getElementById('content').innerHTML = marked('# Marked in the browserRendered by **marked**.');
    </script>

</body>

</html>

自分で試したこと

5行目のjsの読み込みの部分をここからダウンロードした
https://github.com/chjj/marked/releases
libファイルをコピーして

  <script src="lib/marked.js"></script>

と置き換えてみても同じ結果でした

0

1Answer

Comments

  1. @dthy

    Questioner

    回答ありがとうございます。無事表示させることができました。

Your answer might help someone💌