将datacamp light嵌入wordpress博客文章

时间:2019-07-12 19:51:49

标签: javascript html wordpress reactjs

我正在尝试在WordPress 5.0.4博客文章中嵌入datacamp light练习,但似乎不起作用。

我已经在wordpress文本标签中尝试使用此代码:

<script type="text/javascript" src="//cdn.datacamp.com/dcl-react.js.gz"></script>


<div data-datacamp-exercise data-lang="r" data-height="100" id="r-exercise">
  <code data-type="pre-exercise-code"># no pec</code>
  <code data-type="sample-code">
    # Calculate 3 + 4
    3 + 4

    # Calculate 6 + 12
  </code>
  <code data-type="solution">
    # Calculate 3 + 4
    3 + 4

    # Calculate 6 + 12
    6 + 12
  </code>
  <code data-type="sct">
    test_output_contains(&quot;18&quot;, incorrect_msg = &quot;Make sure to add `6 + 12` on a new line. Do not start the line with a `#`, otherwise your R code is not executed!&quot;)
    success_msg(&quot;Awesome! See how the console shows the result of the R code you submitted? Now that you&#39;re familiar with the interface, let&#39;s get down to R business!&quot;)
  </code>
</div>

结果是会话似乎已断开或未连接,并且未显示代码。请在此页面底部查看我的尝试:http://www.insular.it/2019/01/incrociare-due-tabelle-dplyrinner_join-vs-merge/

谢谢

0 个答案:

没有答案