Skip to content
Permalink
Browse files

uploadcare 적용

  • Loading branch information...
egoing committed Jun 16, 2017
1 parent 5379531 commit 9da34ddac0845122b1ec06c4de09cb6802b789cb
Showing with 12 additions and 1 deletion.
  1. +12 −1 write.php
@@ -37,10 +37,21 @@
작성자 : <input type="text" name="author">
</p>
<p>
본문 : <textarea name="description"></textarea>
본문 : <textarea name="description" id="description"></textarea>
</p>
<input type="hidden" role="uploadcare-uploader" />
<input type="submit" name="name">
</form>
</article>
<script>
UPLOADCARE_PUBLIC_KEY = "56e94eff3f72731a45d5";
</script>
<script charset="utf-8" src="//ucarecdn.com/libs/widget/2.10.3/uploadcare.full.min.js"></script>
<script>
var singleWidget = uploadcare.SingleWidget('[role=uploadcare-uploader]');
singleWidget.onUploadComplete(function(info){
document.getElementById('description').value = document.getElementById('description').value + '<img src="'+info.cdnUrl+'">';
})
</script>
</body>
</html>

0 comments on commit 9da34dd

Please sign in to comment.
You can’t perform that action at this time.