basecamp / basecamp/trix

Insert image to trix-editor through javascript

Open
#1,055 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
20k
Forks
1.1k
Avg merge
3d 12h
Merged PRs (30d)
13

Description

Does anyone know how to insert attachment in trix editor with javascript ?,
1. I have the image through the url, and that url is working properly
2. and when i use const attachment = new Trix.Attachment({content : url}) and insertAttachment, it only display the url not the image

* Trix version: 2.04
* Browser name and version: Chrome Version 112.0.5615.49 (Official Build) (64-bit)
* Operating system: Windows

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the reported Trix 2.04 behavior in Chrome using the URL and Trix.Attachment example from the issue. Check how the attachment is interpreted and rendered, and consider the work complete when the remote image displays in the editor instead of only its URL.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.