Render rich text widget manually in plone custom page

試著忘記壹切 提交于 2019-12-01 12:34:57
keul

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

It should suffice to apply the class mceEditor on the textarea.

If that shouldn't work, include the initialization in your template:

tinyMCE.init({
    elements : "id-of-textarea",
}); 
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!