본문으로 건너뛰기

update-link

설명

링크가 업데이트될 때 발생합니다

사용법

"update-link": ({ id: number, url: string }) => boolean | void;

파라미터

update-link 이벤트의 callback은 다음 파라미터를 포함하는 객체를 받을 수 있습니다:

  • id - 링크 ID
  • url - 수정된 url
정보

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

예제

// RichText 초기화
const editor = new richtext.Richtext("#root", {
// 구성 속성
});
// "update-link" 이벤트 구독
editor.api.on("update-link", (obj) => {
console.log(obj);
console.log("The following link was updated:" + obj.url);
});

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