无法在Localhost上启动tui图像编辑器

时间:2019-05-09 04:38:32

标签: javascript toast-ui-image-editor

我正在尝试在本地主机上初始化tui-image-itor。我已经从https://github.com/nhn/tui.image-editor

下载了这个著名的图像编辑器

这是我的代码

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>TUI Image Editor</title>

<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/fabric.js/2.7.0/fabric.js"></script>
<script type="text/javascript" src="https://uicdn.toast.com/tui.code-snippet/v1.5.0/tui-code-snippet.min.js"></script>



<link rel="stylesheet" href="http://localhost/imageEditor/dist/tui-image-editor.css">
<script src="http://localhost/imageEditor/dist/tui-image-editor.js"></script>
<script>

var ImageEditor = require('tui-image-editor');

var instance = new ImageEditor(document.querySelector('#tui-image-editor'), {
     includeUI: {
         loadImage: {
             path: 'jp.jpg',
             name: 'SampleImage'
         },

         theme: blackTheme, // or whiteTheme
         initMenu: 'filter',
         menuBarPosition: 'bottom'
     },
    cssMaxWidth: 700,
    cssMaxHeight: 500,
    selectionStyle: {
        cornerSize: 20,
        rotatingPointOffset: 70
    }
});
</script>
</head>

<body>

<div id="tui-image-editor" style="height: 200px">
    <canvas></canvas>
</div>


</body>
</html>

结果,我的页面空白,没有错误,没有警告

我并没有摆脱这种情况,请您指出我做错的地方吗?

0 个答案:

没有答案