在plone自定义页面中手动渲染RTF小部件 [英] Render rich text widget manually in plone custom page

查看:92
本文介绍了在plone自定义页面中手动渲染RTF小部件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对自己的灵巧性内容类型进行了自定义编辑(浏览器页面).在模板中,我使用Bootstrap定义了一个表单,并添加了一些Angular JS代码以实现表单行为.这是工作. :)

我需要用富文本小部件替换一个简单的textarea.那么如何在模板中呈现富文本小部件(通常在敏捷中使用的一种)?

解决方案

如果您使用的是样机(不确定是否有人在Plone 4上使用过它),您可以在此处找到提示:

否则(TinyMCE的Plone 4.3版本)仅是CSS类和配置的问题.

 <textarea name="..."
     class="pat-tinymce mce_editable"
     data-mce-config JSONCONFIGURATION_HERE">
 </textarea>

我有一个可在简单表单上启用TinyMCE的加载项;看一下cose,以了解如何获取JSON配置:请参见 rt.zptformfield .

我也有一篇关于我使用的方法的博客文章,但它是意大利语的:-)- 解决方案

If you are using Mockup (not sure if anybody use it on Plone 4) you can find tips there: Obtaining the "default" mockup TinyMCE configuration on Plone 5

Otherwise (the Plone 4.3 version of TinyMCE) it's only a matter of CSS classes and configurations.

 <textarea name="..."
     class="pat-tinymce mce_editable"
     data-mce-config JSONCONFIGURATION_HERE">
 </textarea>

I've an add-ons that enable TinyMCE on simple forms; look at the cose to find how to obtain the JSON configuration: See rt.zptformfield.

I've also a blogpost about the approach I used there but it's in italian :-) - http://blog.redturtle.it/usare-widget-plone-in-semplici-template-html

这篇关于在plone自定义页面中手动渲染RTF小部件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆