code: def in_edit_mode(self, request, placeholder):
          
          toolbar = getattr(request, 'toolbar', None)
          edit_mode = getattr(toolbar, 'edit_mode', False) and getattr(placeholder, 'is_editable', True)
          if edit_mode:
              edit_mode = placeholder.has_change_permission(request.user)
          return edit_mode
docs: Returns True, if the plugin is in "edit mode".