我正在使用DHTMLx Touch online editor

我有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'的第一个单元格中放置图片

最佳答案

最好使用“模板”视图将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

09-10 11:25
查看更多