如何在“HTML”中添加所见即所得编辑器pyrocms 小部件
我想说是否可以在“HTML”pyrocms 小部件中添加所见即所得编辑器(CKeditor)。我正在尝试这种方式,但它不起作用:
1)在“system/cms/modules/widgets/controllers/admin.php”中,我已将 __constructor 方法更改
$this->template
->set_partial('shortcuts', 'admin/partials/shortcuts')
->append_metadata(js('widgets.js', 'widgets'))
->append_metadata(css('widgets.css', 'widgets'));
为这个
$this->template
->set_partial('shortcuts', 'admin/partials/shortcuts')
->append_metadata(js('widgets.js', 'widgets'))
->append_metadata(css('widgets.css', 'widgets'))
->append_metadata($this->load->view('fragments/wysiwyg', $this->data, TRUE));
2)在“system/cms”中/widgets/html/views/form.php”,我已经改成
<?php echo form_textarea(array('name'=>'html', 'value' => $options['html'])); ?>
这个
<?php echo form_textarea(array('id'=>'html', 'name'=>'html', 'value' => $options['html'], 'class' => 'wysiwyg-simple')); ?>
你有什么建议吗?
I would say if it's possible to add wysiwyg editor (CKeditor) in "HTML" pyrocms widget. I'm trying in this way, but it doesn't work:
1) In "system/cms/modules/widgets/controllers/admin.php", I've changed __constructor method:
$this->template
->set_partial('shortcuts', 'admin/partials/shortcuts')
->append_metadata(js('widgets.js', 'widgets'))
->append_metadata(css('widgets.css', 'widgets'));
to this
$this->template
->set_partial('shortcuts', 'admin/partials/shortcuts')
->append_metadata(js('widgets.js', 'widgets'))
->append_metadata(css('widgets.css', 'widgets'))
->append_metadata($this->load->view('fragments/wysiwyg', $this->data, TRUE));
2) In "system/cms/widgets/html/views/form.php", I've changed
<?php echo form_textarea(array('name'=>'html', 'value' => $options['html'])); ?>
to this
<?php echo form_textarea(array('id'=>'html', 'name'=>'html', 'value' => $options['html'], 'class' => 'wysiwyg-simple')); ?>
Do you have any suggestion?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到了一个解决方案:您可以在这里阅读 http://pyrocms.com/forums/topics/view /2552
I found a solution: you can read it here http://pyrocms.com/forums/topics/view/2552