Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note

컨텐츠 내 목차 요소와 목차 모델의 ID를 동기화하려면 updateTableOfContentsIds를 호출해야 합니다.
이 메서드는 에디터 내 실제 목차 요소의 ID를 최신 목차 모델과 일치하도록 갱신합니다.

ex) editor.updateTableOfContentsIds();


Info

'editor.titleStyle' config 설정 시 특정 class를 가진 요소를 목차로 추출 가능합니다.

자세한 내용 보기:

목차 클래스 설정

환경설정


Example:

Code Block
languagejs
themeEmacs
// model 불러오기
var model = editor.getTableOfContentsModelJSON();
var model = editor.getTableOfContentsModelJSON(true);

// 컨텐츠 내 목차 요소와 목차 모델의 ID를 동기화
editor.getTableOfContentsModelJSON();
editor.updateTableOfContentsIds();

...