I had a very brief look into it and it seems the edit link is pretty tied into contextual links at this stage.

Would it be feasible to print a custom edit link somewhere else on the page or would that likely be a nightmare task?

Comments

wim leers’s picture

Status: Active » Fixed

It depends. It's easy enough to trigger in-place editing of any given entity through code:

Drupal.edit.collections.entities.findWhere({entityID: 'node/1', entityInstanceID: '0'}).set('state', 'launching')

("in the collection of in-place editable entities, find the node entity with ID 1, the first instance of it on the page, and then launch in-place editing")

But then it's up to you to somehow determine which entity ID and which entity instance ID to use. Note that both of those values directly correspond to data- attributes in the DOM (data-edit-entity-id and data-edit-entity-instance-id, the latter of which is set through JS), so if there's always only one entity per page, you can easily have such a link! If there's multiple… then that's a UI problem for you to solve :)

wim leers’s picture

Assigned: Unassigned » wim leers
rooby’s picture

Thanks, that's great info.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

_cosmos_’s picture

What about "opening" state?
Can i set programmatically for quickedit "opening" state?
I try to do
Drupal.edit.collections.entities.findWhere({entityID: 'node/1', entityInstanceID: '0'}).set('state', 'launching').set('state', 'opening')
but there is error appeared.