Class FallbackEvent
java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<VaadinCKEditor>
com.wontlost.ckeditor.event.FallbackEvent
- All Implemented Interfaces:
Serializable
降级事件。
当编辑器因错误触发降级模式时发送。
使用示例:
editor.addFallbackListener(event -> {
if (event.getMode() == FallbackMode.TEXTAREA) {
// 编辑器已降级为纯文本区域
Notification.show("编辑器加载失败,已切换到基础模式",
Notification.Type.WARNING_MESSAGE);
}
// 记录降级原因
logger.warn("Editor fallback triggered: {}", event.getReason());
});
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionFallbackEvent(VaadinCKEditor source, boolean fromClient, FallbackEvent.FallbackMode mode, String reason, String originalError) 创建降级事件 -
Method Summary
Methods inherited from class com.vaadin.flow.component.ComponentEvent
getSource, isFromClient, unregisterListenerMethods inherited from class EventObject
toString
-
Constructor Details
-
FallbackEvent
public FallbackEvent(VaadinCKEditor source, boolean fromClient, FallbackEvent.FallbackMode mode, String reason, String originalError) 创建降级事件- Parameters:
source- 触发事件的编辑器组件fromClient- 事件是否来自客户端mode- 降级模式reason- 降级原因描述originalError- 原始错误信息
-
-
Method Details
-
getMode
-
getReason
-
getOriginalError
-