Closed Janson1012 closed 2 weeks ago
The changes in the Tooltip
and Video
classes enhance functionality by refining user input handling and expanding video management capabilities. The Tooltip
class now includes conditional logic in the save()
method based on hover status, while the Video
class introduces a new parent container for video elements and a method for cursor management.
Files | Change Summary |
---|---|
packages/fluent-editor/src/link/modules/tooltip.ts |
Enhanced save() method with hover check and expanded switch statement for video formatting. |
packages/fluent-editor/src/video/index.ts |
Modified create method to encapsulate video in a new parent div and added appendChild method for cursor management. |
sequenceDiagram
participant User
participant Tooltip
participant Quill
User->>Tooltip: Focus on input
Tooltip->>User: Input received
User->>Tooltip: Blur input
Tooltip-->>Tooltip: Check isHover
alt isHover true
Tooltip->>Tooltip: Call save()
else isHover false
Tooltip->>User: Do not save
end
Objective | Addressed | Explanation |
---|---|---|
Video link input should save correctly (#17) | ✅ | |
Enter key should trigger video input (#17) | ❓ | Unclear if the changes fully address this. |
🐰 In the meadow, bright and spry,
The tooltip hops, oh my, oh my!
With new logic, it saves just right,
Handling videos, a joyful sight!
So let us cheer, with a happy thump,
For changes made, we give a jump! 🎉
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
@Janson1012 还有点bug,使用视频链接:https://player.vimeo.com/video/253905163,进行测试。
@Janson1012 还有点bug,使用视频链接:https://player.vimeo.com/video/253905163,进行测试。
这是由于在富文本里创建Video标签光标定位逻辑失败,quill默认的Video标签在外面套了一层iframe,这和fluent-editor的不一样,应该要改动比较大才可能达到最后的效果,是否要大幅度改动Video相关代码
@Janson1012 还有点bug,使用视频链接:https://player.vimeo.com/video/253905163,进行测试。
这是由于在富文本里创建Video标签光标定位逻辑失败,quill默认的Video标签在外面套了一层iframe,这和fluent-editor的不一样,应该要改动比较大才可能达到最后的效果,是否要大幅度改动Video相关代码
@Janson1012 有没有办法小范围修改,直接复用quill原本的video逻辑呢?
@Janson1012 还有bug,视频的src并没有生效,测试视频URL: https://media.w3.org/2010/05/sintel/trailer.mp4
@Janson1012 duplicate #34
Close #17
Summary by CodeRabbit
Summary by CodeRabbit
New Features
Bug Fixes