Pixlr API集成

时间:2011-04-06 21:10:28

标签: javascript html pixlr

我正在尝试将pixlr API集成到我的网站中,并在他们的网站上提供他们提供的小文档。当我点击图像加载图像编辑器时,它表示您正在寻找的页面不存在。任何想法,为什么我可能会得到这个?这是我的页面:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <title>Designer Test</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <script type="text/javascript" src="js/pixlr.js"></script>
    <script type="text/javascript">
        pixlr.settings.target = 'http://xxxxxxx.com/designer/php/savefile.php';
        pixlr.settings.exit = 'http://xxxxxx.com/designer';
        pixlr.settings.method = 'post';
        pixlr.settings.locktarget = true;
    </script>
</head>
<body>
<h4>Click the image to edit</h4>
<br />
<b>Open image editor overlay</b><br />
<a href="javascript:pixlr.overlay.show({image:'http://xxxxxxx.com/designer/images/roofCrafters.png', title:'Roof Crafters'});"><img src="images/roofCrafters.png" width="250" height="150" title="Edit in pixlr" /></a><br /><br />
<br /><br />
</body>
</html>

1 个答案:

答案 0 :(得分:3)

您应该在网址中添加要使用的服务,例如:

<a href="javascript:pixlr.overlay.show({image:'http://xxxxxxx.com/designer/images/roofCrafters.png', title:'Roof Crafters', service:'editor'});">

您可以使用'editor'或'express'