본문으로 건너뛰기

insert-list

설명

목록을 삽입할 때 발생합니다

사용법

"insert-list": ({ type: TListType }) => boolean | void;

type TListType = "bulleted" | "numbered";

매개변수

insert-list 이벤트의 callback은 다음 매개변수를 포함하는 객체를 받을 수 있습니다:

  • type - 삽입된 목록의 유형입니다. 다음 값을 지정할 수 있습니다:
    • "bulleted" - 글머리 기호 목록
    • "numbered" - 번호 목록
정보

내부 이벤트를 처리하려면 Event Bus 메서드를 사용할 수 있습니다

예제

// RichText 초기화
const editor = new richtext.Richtext("#root", {
// 구성 속성
});
// "insert-list" 이벤트 구독
editor.api.on("insert-list", (obj) => {
console.log(obj.type);
console.log("The list was inserted");
});

변경 이력: 이 이벤트는 v2.0에서 추가되었습니다