0

我正在使用DHTMLx Touch 在线编辑器

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

4

1 回答 1

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

于 2011-12-07T12:28:25.247 回答