2013-10-10 99 views
0

由于标题状态,我遵循他们的文档,它不是最好的新人或不熟悉jQuery的人。CreateJS工作,但不显示工具栏

我的头:

<div class="well col-md-3" about="/content/create"> 
    <div property="content" contenteditable="true"> 
    Lorem ipsum. 
    </div> 
</div> 

这LIB似乎是我想要实现但真的什么都没有那么多的资源/教程真的不错:

<head> 
    {{ HTML::script('/themes/admin/js/jquery.js') }} 
    {{ HTML::script('/themes/admin/js/jquery-ui.js') }} 
    {{ HTML::script('/themes/admin/js/underscore-min.js') }} 
    {{ HTML::script('/themes/admin/js/vie.js') }} 

    {{ HTML::script('/packages/createjs/create.js') }} 
     <script type="text/javascript"> 
     jQuery(document).ready(function() { 

      jQuery('body').midgardCreate({ 
      url: function() { return '/admin/content/create'; } 
      }); 

      jQuery('body').midgardToolbar({ 
      display: 'full' 
      }); 

      jQuery('[about]').midgardEditable({ 
      vie: new VIE() 
      }); 

     }); 
     </script> 
</head> 

我的身下可编辑的div在上面。

+0

我不知道这一点很重要,因为我从来没有使用过CreateJS,但'about'和'property'不是由W3列出的HTML属性。 [见此](http://www.w3.org/TR/html401/struct/global.html#h-7.5.4) –

回答

1

在这里你可以找到一个完全工作的例子

http://jsfiddle.net/S9Hgg/5/

为了了解所需要的精确库。

它是基于在被使用喂编辑createjs找到了演示, http://createjs.org/demo/hallo/

这是启动它的代码,

jQuery('body').midgardCreate({ 
    url: function() { 
     return 'javascript:false;'; 
    }, 
    stanbolUrl: 'http://dev.iks-project.eu:8081', 
    collectionWidgets: { 
     'default': null, 
     'feature': 'midgardCollectionAdd' 
    } 
    }); 

你会发现它,因为你的代码注释掉也起作用。 它适用于jquery1.7.2和jquery-ui1.8.18,但我认为这与hallo的版本有关。您可以尝试最新版本并查看。

所以依赖关系,

  • jquery1.7.2
  • jQuery的ui1.8.18
  • modernizr.custom.80485.js
  • 下划线min.js
  • 骨干分钟.js
  • vie-min.js
  • jquery.rdfquery.min.js
  • 注释-min.js
  • create.js
  • 瘦长核-1.2.3.js
  • hallo.js
  • 字体awesome.css
  • 创建-ui.css
  • midgardnotif.css
  • bootstrap.css
  • 创建-2012.css