CKEditor widget
===============

Log in as manager

    >>> from plone.testing.z2 import Browser
    >>> from plone.app.testing import SITE_OWNER_NAME
    >>> from plone.app.testing import SITE_OWNER_PASSWORD
    >>> app = layer['app']
    >>> portal = layer['portal']
    >>> browser = Browser(app)
    >>> browser.open('http://nohost/plone/login_form')
    >>> browser.getControl('Login Name').value = SITE_OWNER_NAME
    >>> browser.getControl('Password').value = SITE_OWNER_PASSWORD
    >>> browser.getControl('Log in').click()

The widget settings for a local field can overload the global ckeditor
settings.

We will test first the rich widget settings used by a document (front-page)

Get the rows attribute for this widget

    >>> from Products.CMFPlone import utils as ploneutils
    >>> doc = ploneutils._createObjectByType('Document', portal, 'front-page')
    >>> import transaction
    >>> transaction.commit()
    >>> doc = portal['front-page']

Choose to overload some widget properties in control panel
----------------------------------------------------------
    >>> from plone import api
    >>> api.portal.set_registry_record(
    ...  "collective.ckeditor.browser.ckeditorsettings.ICKEditorSchema.overloadable_properties",
    ...  ["height",])
    >>> api.portal.set_registry_record(
    ...  "collective.ckeditor.browser.ckeditorsettings.ICKEditorSchema.height",
    ...  "600px")
    >>> import transaction
    >>> transaction.commit()

Control that the local field widget setting 'height' is no more here

    >>> browser.open('http://nohost/plone/front-page/edit')
    >>> 'name="cke_height"' in browser.contents
    False
