Closed (fixed)
Project:
Edit
Version:
7.x-1.0-rc1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
14 Jan 2014 at 04:01 UTC
Updated:
19 Jan 2018 at 08:30 UTC
Jump to comment: Most recent
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
Comment #1
wim leersIt depends. It's easy enough to trigger in-place editing of any given entity through code:
("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-idanddata-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 :)Comment #2
wim leersComment #3
rooby commentedThanks, that's great info.
Comment #5
_cosmos_ commentedWhat 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.