Using FCKeditor as an anonymous user

by Jose Santos last modified Dec 30, 2008 05:53 PM
How to enable FCKeditor use for anonymous users. This same tip also works for kupu and other 3rd party editors, with minor variations.

Since the choice of WYSIWYG editor is made as a preference on users, you have to trick Plone into giving Anonymous users a WYWIWYG editor preference.

You must set the anonymous wysiwyg property to FCKeditor:

from AccessControl.User import nobody 

def getProperty(self, name, default=''):
if name == 'wysiwyg_editor':
return 'FCKeditor'
return False
(nobody.__class__).getProperty = getProperty

nobody.wysiwyg_editor = 'FCKeditor'

Put this code in the __init__.py of a product you load in your site (you could create a product containing just this as the __init__.py file, too, if you prefer).

Note: This doesn't address the issues of ownership of anonymous content and such. There are other HOWTOs that address this. This addresses the question of just how the WYSIWYG editor can be selected.

This was the solution I found so solve this problem. I really don't know if this is the best solution. Comments appreciated.