Plone 4.3.3 (4308), CMF 2.2.7, Zope 2.13.22, Python 2.7 (r27:82500, Aug 07 2010, 16:54:59) [GCC], TinyMCE 1.3.6 (I know, environment is out of date but upgrading at this point in time is not possible for me with the amount of sites I have to maintain for the state and my current queue)
Hi all, I have been struggling with trying to allow TinyMCE to accept custom tags in our environment. I found a guide for how to accomplish this from the plone docs, http://glicksoftware.com/blog/disable-html-filtering, but the monkey patching part has been difficult for me. I found another article on how to use collective.monkeypatcher, https://encolpe.wordpress.com/2009/07/13/manage-monkey-patches-and-performance-improvement-in-plone-3/, but it is a little out of date and does not seem to be working, but I could be doing something wrong.
For starters, I could not get the monkeypatcher control panel to show up in my zope or plone control panel even though buildout and debug claim the addon has been installed. I modified configure.zcml in our custom policy product, added a patches.py and patches.zcml. This is what they look like:
patches.py
getValidElements = lambda self: {'*': ['*']}
patches.zcml
<include package="collective.monkeypatcher" />
<monkey:patch
description="This is to make TinyMCE allow custom tags"
class="Products.TinyMCE.utility.TinyMCE"
original="getValidElements"
replacement=".patches.getValidElements"
/>
</configure>
added to configure.zcml:
<include file="patches.zcml" />
location of custom policy product: Plone433/zeocluster/src/united.policy/united/policy/configure.zcml
Is there something I am not understanding about the monkeypatching process? Should there be somewhere else I "inject" this patch?
Thank you so much for taking the time to read this.