0

我使用DHTMLx Touch online editor如何插入DHTMLX觸摸圖像

我有3個單元

{ id: 'app', view: 'layout', height: 482, width: 322, 
rows: [ { view: 'layout' 
    , type: 'wide' 
    , rows: [ { view: 'view', id: 'temp_designer_view_2'} 
      , { view: 'view', id: 'temp_designer_view_3'} 
      , { view: 'view', id: 'temp_designer_view_4'} ] 
    , id: 'layout_2'} ] } 

我希望將圖像中的ID爲「temp_designer_view_2」第一單元的佈局

回答

2

這將是更好地使用「模板」視圖包括HTML內容轉換成一個版面項目:

{ id: 'app', view: 'layout', height: 482, width: 322, 
    rows: [ { view: 'layout' 
     , type: 'wide' 
     , rows: [ { template: "<div class='imgParent'><img .../></div>", id: 'temp_designer_view_2'} 
       , { template: '', id: 'temp_designer_view_3'} 
       , { template: '', id: 'temp_designer_view_4'} ] 
     , id: 'layout_2'} ] } 

查看dhtmlxTouch包裝中的相關示例:../samples/technical/view/04_template.html 和../samples/technical/view/08_carousel.html