targets 에 해당하는 위치의 텍스트를 text 로 모두 교체합니다.
Parameters:
| Name | Type | Description |
|---|---|---|
| actionName | String | 액션 이름 |
| text | String | 교체할 텍스트 |
| targets | Object[] | [{ id: {String}, startIndex: {Number}, endIndex: {Number} }, .....]
|
Example:
editor.execCommand('replaceTextByIndex', 'text', [
{ id: 'paragraphId1', startIndex: 0, endIndex: 3 },
{ id: 'paragraphId2', startIndex: 5, endIndex: 15 }
]);