# Deactivate directEditing when shape add

**URL:** <https://forum.bpmn.io/t/deactivate-directediting-when-shape-add/2731>\
**Category:** Developers\
**Created:** [October 18, 2018, 8:05pm UTC](https://forum.bpmn.io/t/deactivate-directediting-when-shape-add/2731 "2018-10-18T20:05:49Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![gabriellpa](https://forum.bpmn.io/letter_avatar_proxy/v4/letter/g/7993a0/32.png) [@gabriellpa](https://forum.bpmn.io/u/gabriellpa)\
**Post date:** [October 18, 2018, 8:05pm UTC](https://forum.bpmn.io/t/deactivate-directediting-when-shape-add/2731/1 "2018-10-18T20:05:49Z")

</div>

Hello i’m trying to deactivate direct Editing when a shape is added, in my case is a task. I already use the event shape.added but i failed in disable the edit.

---

<div class="post-metadata">

**Author:** ![philippfromme](https://forum.bpmn.io/user_avatar/forum.bpmn.io/philippfromme/32/2803_2.png) [@philippfromme](https://forum.bpmn.io/u/philippfromme)\
**Post date:** [October 22, 2018, 7:37am UTC](https://forum.bpmn.io/t/deactivate-directediting-when-shape-add/2731/2 "2018-10-22T07:37:52Z")

</div>

This behavior is implemented in [LabelEditingProvider](https://github.com/bpmn-io/bpmn-js/blob/master/lib/features/label-editing/LabelEditingProvider.js#L62). You can either override this component or intercept the event:

```javascript

// make sure this is called after LabelEditingProvider
eventBus.on('create.end', 250, () => {
  directEditing.cancel();
}

```

---

<div class="post-metadata">

**Author:** ![gabriellpa](https://forum.bpmn.io/letter_avatar_proxy/v4/letter/g/7993a0/32.png) [@gabriellpa](https://forum.bpmn.io/u/gabriellpa)\
**Post date:** [October 25, 2018, 7:15pm UTC](https://forum.bpmn.io/t/deactivate-directediting-when-shape-add/2731/3 "2018-10-25T19:15:38Z")

</div>

> [@philippfromme](#):
>
> eventBus.on(‘create.end’,

Hi, I’m sorry for replying only now, I tried that but did not work for me.  
the event create.end active when i add a new shape using the ‘box’ (look the print) ![TASKADD](https://forum.bpmn.io/uploads/default/original/1X/b290dfc5b5470ea598a90c9f2326cb4ef744e015.PNG)  
and still with this my js broke.

but when i add a new shape(task) using other shape like this: ![EVENT](https://forum.bpmn.io/uploads/default/original/1X/ea559d3a3d7cbc7da4e5466cf427dd303f9b1598.PNG)  
the event create.end dont active.

Thank you for the attention.

EDIT: I wrote this in the console bpmnModeler.get(‘directEditing’).cancel(); and worked but i sitll dont know which event i should use and when.

---

<div class="post-metadata">

**Author:** ![philippfromme](https://forum.bpmn.io/user_avatar/forum.bpmn.io/philippfromme/32/2803_2.png) [@philippfromme](https://forum.bpmn.io/u/philippfromme)\
**Post date:** [October 29, 2018, 10:26am UTC](https://forum.bpmn.io/t/deactivate-directediting-when-shape-add/2731/4 "2018-10-29T10:26:07Z")

</div>

```javascript
eventBus.on([
  'create.end',
  'autoPlace.end'
], 250, function() {
  directEditing.cancel();
});

```

This should work. When creating elements through clicking the context pad `autoPlace.end` is the event to listen for.

---

<div class="post-metadata">

**Author:** ![gabriellpa](https://forum.bpmn.io/letter_avatar_proxy/v4/letter/g/7993a0/32.png) [@gabriellpa](https://forum.bpmn.io/u/gabriellpa)\
**Post date:** [October 29, 2018, 3:03pm UTC](https://forum.bpmn.io/t/deactivate-directediting-when-shape-add/2731/5 "2018-10-29T15:03:01Z")

</div>

Yes exactly what i need, thank you.  
btw do you know if there’s any documentation of [bpmn.io](http://bpmn.io) or only examples?

---

<div class="post-metadata">

**Author:** ![philippfromme](https://forum.bpmn.io/user_avatar/forum.bpmn.io/philippfromme/32/2803_2.png) [@philippfromme](https://forum.bpmn.io/u/philippfromme)\
**Post date:** [October 30, 2018, 9:56am UTC](https://forum.bpmn.io/t/deactivate-directediting-when-shape-add/2731/6 "2018-10-30T09:56:48Z")

</div>

We have a basic overview of how the toolkit works: [https://bpmn.io/toolkit/bpmn-js/walkthrough/](https://bpmn.io/toolkit/bpmn-js/walkthrough/) Other than that unfortunately there’s no documentation, yet.

---

<div class="post-metadata">

**Author:** ![nikku](https://forum.bpmn.io/user_avatar/forum.bpmn.io/nikku/32/5130_2.png) [@nikku](https://forum.bpmn.io/u/nikku)\
**Post date:** [July 22, 2025, 3:18pm UTC](https://forum.bpmn.io/t/deactivate-directediting-when-shape-add/2731/7 "2025-07-22T15:18:19Z")

</div>

Closed on July 22, 2025, 3:18pm UTC


