Only make the event trap editable if the document is in edit mode

Various browser menus (cut, delete) should only enable if the document
is currently in edit mode.
Merge pull request #304 from peitschie/readonly-eventtrap

Only make the event trap editable if the document is in edit mode