Closed zzxming closed 1 month ago
The changes involve the removal of the imgToBase64
function from two demo files, simplifying the image processing logic during screenshot capture. The onclone
method in the screenshot configuration has been updated to eliminate the logic that awaited image conversion. A new utility function imgToBase64
has been introduced in a separate file to handle image conversion, while a new function findParentFixed
has been added to manage fixed or sticky positioned elements during image rendering. Additionally, Prettier configuration has been removed, affecting formatting rules in the project.
Files | Change Summary |
---|---|
packages/docs/fluent-editor/demos/screenshot-upload-to-server.vue , packages/docs/fluent-editor/demos/screenshot.vue |
Removed the imgToBase64 function and simplified the screenshot configuration by removing the onclone logic related to image conversion. |
packages/fluent-editor/src/screenshot/index.ts |
Added findParentFixed function for checking fixed/sticky positioning and updated onclone to process fixed/sticky elements and convert images to base64. |
packages/fluent-editor/src/utils/image.ts |
Introduced a new utility function imgToBase64 to convert image URLs to base64 format, handling image loading and error management. |
packages/fluent-editor/package.json |
Removed the prettier dependency and the format script from scripts . |
.prettierignore |
Removed several entries, indicating that those files/directories will now be formatted by Prettier. |
.prettierrc |
Completely removed, meaning that previous formatting rules will no longer apply. |
.vscode/settings.json |
Added a setting to disable Prettier in Visual Studio Code. |
packages/fluent-editor/src/assets/fullscreen.scss |
Updated existing fullscreen CSS rules and added new styles for a .scroll class with nested classes for scrolling behavior in fullscreen mode. |
packages/fluent-editor/src/toolbar/index.ts |
Updated the focus method call in BetterToolbar to conditionally prevent scrolling based on the format. |
packages/fluent-editor/src/utils/scroll-lock.ts |
Introduced functions to measure scrollbar width and lock scroll behavior on specified elements. |
imgToBase64
function, which is responsible for converting image URLs to base64 format. The main PR removes this function, while this PR introduces a new implementation of it in the context of a screenshot feature.bug
In the garden of code, where rabbits play,
We’ve tidied up functions, made clutter sway.
With images bright, now captured with glee,
A hop and a skip, as simple as can be!
Let’s celebrate changes, both swift and spry,
For in every line, our dreams can fly! 🐇✨
@zzxming 需要解决下冲突哈
@zzxming 好像现在截图不准确了,不知道是不是和合入 #81 这个PR有关 https://opentiny.github.io/fluent-editor/docs/screenshot
@zzxming 好像现在截图不准确了,不知道是不是和合入 #81 这个PR有关 https://opentiny.github.io/fluent-editor/docs/screenshot
哪方面有错误,我这里看好像是正常
PR
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Summary by CodeRabbit
New Features
Bug Fixes
Chores