Skip to content

Commit

Permalink
We want to edit the raw text
Browse files Browse the repository at this point in the history
  • Loading branch information
davisagli committed Dec 20, 2017
1 parent ff46579 commit e4750ee
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ New features:

Bug fixes:

- *add item here*
- Use the edit accessor to get text for TinyMCEWidget.
[davisagli]


1.14.3 (2017-11-24)
Expand Down
2 changes: 1 addition & 1 deletion Products/Archetypes/Widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -1399,7 +1399,7 @@ def _base_args(self, context, field, request):
args = super(TinyMCEWidget, self)._base_args(context, field, request)
args['name'] = field.getName()
args['value'] = (request.get(field.getName(),
field.getAccessor(context)())
field.getEditAccessor(context)())
).decode('utf-8')

args.setdefault('pattern_options', {})
Expand Down
2 changes: 1 addition & 1 deletion Products/Archetypes/tests/test_pawidgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ def setUp(self):
self.portal = self.layer['portal']
self.request = TestRequest(environ={'HTTP_ACCEPT_LANGUAGE': 'en'})
self.field = Mock()
self.field.getAccessor.return_value = lambda: 'fieldvalue'
self.field.getEditAccessor.return_value = lambda: 'fieldvalue'
self.field.getName.return_value = 'fieldname'
self.field.getContentType.return_value = 'text/html'

Expand Down

0 comments on commit e4750ee

Please sign in to comment.