...
| Note |
|---|
컨텐츠 내 목차 요소와 목차 모델의 ID를 동기화하려면 updateTableOfContentsIds를 호출해야 합니다. ex) editor.updateTableOfContentsIds(); |
| Note |
|---|
'editor.titleStyle' config 설정 시 특정 class를 가진 요소를 목차로 추출 가능합니다. 자세한 내용 보기: 환경설정 |
...
| Code Block | ||||
|---|---|---|---|---|
| ||||
// model 불러오기 가져오는 방법 // 1. 에디터 내부에서 사용되는 ID를 적용한 목차 모델 var model = editor.getTableOfContentsModelJSON(); // 2. 목차 전용 prefix가 붙은 ID를 적용한 목차 모델 var model = editor.getTableOfContentsModelJSON(true); |
| Code Block | ||||
|---|---|---|---|---|
| ||||
// 저장/불러오기 //시 컨텐츠 내 목차 요소와 ID 유지하는 방법 // 1. 목차 모델의전용 prefix가 붙은 ID를 동기화 적용한 목차 모델 가져오기 editor.getTableOfContentsModelJSON(true); // 2. 컨텐츠 내 목차 요소와 목차 모델의 ID 동기화 editor.updateTableOfContentsIds(); |
...