본문으로 건너뛰기

toggle-fullscreen-mode

설명

전체 화면 모드를 전환할 때 발생합니다

사용법

"toggle-fullscreen-mode": ({ mode?: boolean }) => boolean | void;

매개변수

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

  • mode - 전체 화면 모드를 활성화합니다
정보

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

예시

// RichText 초기화
const editor = new richtext.Richtext("#root", {
// 구성 속성
});
// "toggle-fullscreen-mode" 이벤트 구독
editor.api.on("toggle-fullscreen-mode", (obj) => {
console.log(obj);
console.log("The full screen mode was changed");
});
// 전체 화면 모드 활성화
editor.api.exec("toggle-fullscreen-mode", { mode: true });

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