【发布时间】:2016-04-28 11:33:56
【问题描述】:
我目前面临 2 个问题,我是 Ractive js 的新手
1) 当我使用 type="text/ractive" 并尝试将 ckeditor 用于我的 textarea 时,它没有显示,如果我删除 type="text/ractive" 然后 ckeditor 正在显示,我该如何同时使用两者?
2) 我正在为textarea 使用双向绑定,这似乎工作正常,但是当textarea 替换为ckeditor textarea 插件双向绑定不起作用,因为ckeditor textarea 发生了变化,我认为它会根据某些事件更新值,因为我没有直接更改 textarea,它正在由 ckeditor 更新。
<script id="edit-template-quick" type="text/ractive">
// this is returning me the form
drupal_render(drupal_get_form('xyz')); ?>
</script>
function xyz($form_id, $form_ids, $value) {
$form[$value] = array(
'#type' => 'text_format',
'#wysiwyg' => TRUE,
'#attributes' => array(
'value' => "{{ $value }}",
),
);
return $form;
}
ractive = new Ractive({
el: 'container-quick',
template: '#edit-template-quick',
data: {
slides: json
}
});
【问题讨论】:
标签: javascript jquery drupal-7 ractivejs