2013-10-10 96 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