feat(editor): add image support to scripts (paste, drop, file picker) - #5
Builder106 wants to merge 2 commits into
Conversation
Bring back the script-image workflow on the v3.0.0 React/Tiptap editor, reimplemented as a first-class Tiptap image node instead of the old base64-in-textarea marker hack. - add @tiptap/extension-image (pinned to 3.22.3 to match @tiptap/core) - EditView: paste, drag-and-drop, and a toolbar file picker insert images as base64 data-URLs; allow image-only scripts via editor.isEmpty guards - tokenizer: emit an `image` token for image nodes - ReadView: render image tokens as <img> in the scrolling teleprompter - style: image sizing in the editor and read view
|
@ArunNGun Bumping this one as well. Let me know if you need any changes or if there are any blockers. |
ArunNGun
left a comment
There was a problem hiding this comment.
this looks good will merge after running an final build, thank you for your contribution
|
Thanks. I pushed The combined PR #5 and PR #6 changes passed the tests, lint, frontend build, dependency audit, and full ARM64 Tauri build. The build produced I recommend merging PR #6 first because both PRs touch the dependency files. After that, I can refresh PR #5 against |
Summary
Brings the script-image workflow to the v3.0.0 React/Tiptap editor. This supersedes #4, which was written against the pre-v3.0.0 vanilla-JS
frontend/renderereditor that no longer exists. Reimplemented as a first-class Tiptap image node rather than the old base64-in-textarea[[image:…]]marker hack.Changes
@tiptap/extension-image, pinned to3.22.3so it resolves the same@tiptap/coreas the rest of the Tiptap stack (a floating^3.22.3pullscore@3.26, which breaks@tiptap/react@3.22.3). The lockfile also picks up the staleversionfield fix (2.2.1→3.0.0) sincenpm installregenerates it.getText().trim()toeditor.isEmpty).imagetoken for image nodes so the read view sees them.imagetokens as<img class="read-image">in the scrolling teleprompter.Testing
npm run build:frontendpasses clean.getJSONpersists the image node) → read (tokenizer →<img>).Runtime verification inside the Tauri shell is recommended before merge.