()
| 128 | } |
| 129 | |
| 130 | const removeCurrentElement = () => { |
| 131 | const { code } = transforms.removeElement(codeState.code, { |
| 132 | elementId: codeState.currentElementId |
| 133 | }) |
| 134 | |
| 135 | const newCodeState = updateCode(code) |
| 136 | const currentElementId = codeState.currentElementData.parentId |
| 137 | setCodeState({ |
| 138 | ...codeState, |
| 139 | ...newCodeState, |
| 140 | currentElementId, |
| 141 | currentElementData: queries.getCurrentElement( |
| 142 | codeState.code, |
| 143 | currentElementId |
| 144 | ) |
| 145 | }) |
| 146 | } |
| 147 | |
| 148 | const insertText = e => { |
| 149 | const text = e.target.value |
nothing calls this directly
no test coverage detected