# 웹한글 MarkPenShape 액션 및 형광펜 기능 관련 문의

**URL:** <https://forum.developer.hancom.com/t/markpenshape/2332>\
**Category:** 웹한글 기안기\
**Created:** [3월 18, 2025, 6:49오전 UTC](https://forum.developer.hancom.com/t/markpenshape/2332 "2025-03-18T06:49:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![user156](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.developer.hancom.com/user156/32/1727_2.png) [@user156](https://forum.developer.hancom.com/u/user156)\
**Post date:** [3월 18, 2025, 6:49오전 UTC](https://forum.developer.hancom.com/t/markpenshape/2332/1 "2025-03-18T06:49:36Z")

</div>

안녕하세요.

한글 OCX 지원 종료에 따라 웹한글로의 전환을 준비하고 있습니다.

이와 관련하여, 기존 한글 OCX에서 사용하던 **MarkPenShape** 액션을 웹한글에서도 동일하게 사용하고자 아래와 같이 적용을 시도하였으나,  
`hwpAction.CreateSet()`의 반환 값이 `null`입니다.

```javascript
const hwpAction = HwpCtrl.CreateAction('MarkPenShape');
const hwpActionSet = hwpAction.CreateSet();
hwpAction.GetDefault(hwpActionSet);
hwpActionSet.SetItem('Color', 0x00ffff);
hwpAction.Execute(hwpActionSet);

```

**웹한글에서 MarkPenShape 액션을 지원하는지 확인 부탁드립니다.**  
만약 지원하지 않는다면, 향후 지원 계획이 있는지 공유해 주시면 감사하겠습니다.  
해당 내용을 고객사와 공유하기 위함입니다.

추가로, **웹한글에서 툴바의 형광펜 기능을 숨길 수 있는 방법** 이 있는지도 문의드립니다.  
당사에서 MarkPenShape 액션을 활용하여 자체적으로 형광펜 기능을 제공하고자 하며,  
이를 위해 웹한글 내 기본 형광펜 기능을 비활성화하는 방법이 있는지 안내해 주시면 감사하겠습니다.

---

<div class="post-metadata">

**Author:** ![smkang](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@smkang](https://forum.developer.hancom.com/u/smkang)\
**Post date:** [3월 18, 2025, 8:54오전 UTC](https://forum.developer.hancom.com/t/markpenshape/2332/2 "2025-03-18T08:54:54Z")

</div>

안녕하세요

1. 아래와 같은 스크립트 적용 후 확인 부탁드립니다.

var vAct = HwpCtrl.CreateAction(“MarkPenShape”);  
var vSet = HwpCtrl.CreateSet(“MarkPenShape”);  
vAct.GetDefault(vSet);

vSet.SetItem(“Color”, 0x99FFFF);  
vAct.Execute(vSet);

1. 툴바 전체를 숨길 수 있지만 형광펜만 숨기는 기능은 없습니다.

---

<div class="post-metadata">

**Author:** ![user156](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.developer.hancom.com/user156/32/1727_2.png) [@user156](https://forum.developer.hancom.com/u/user156)\
**Post date:** [3월 18, 2025, 9:02오전 UTC](https://forum.developer.hancom.com/t/markpenshape/2332/3 "2025-03-18T09:02:12Z")

</div>

안녕하세요.  
말씀해주신 방법으로 해봤는데, 현상이 동일합니다.

- Uncaught TypeError: Cannot read properties of null (reading ‘SetItem’)

테스트 버전은 웹한글v2 13.82.0.135 입니다.

---

<div class="post-metadata">

**Author:** ![smkang](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@smkang](https://forum.developer.hancom.com/u/smkang)\
**Post date:** [3월 18, 2025, 9:13오전 UTC](https://forum.developer.hancom.com/t/markpenshape/2332/4 "2025-03-18T09:13:45Z")

</div>

var vSet = **HwpCtrl**.CreateSet(“MarkPenShape”);

hwpAction → HwpCtrl

변경하여 적용하신게 맞을까요?

---

<div class="post-metadata">

**Author:** ![user156](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.developer.hancom.com/user156/32/1727_2.png) [@user156](https://forum.developer.hancom.com/u/user156)\
**Post date:** [3월 18, 2025, 10:39오전 UTC](https://forum.developer.hancom.com/t/markpenshape/2332/5 "2025-03-18T10:39:24Z")

</div>

말씀해주신 가이드대로 변경하여 형광펜 적용 성공했습니다.  
감사합니다.
