Hello,
How can I upload images from the visual editor in an input of type “richText”? I was able to add one, by manually adding an img html tag, using the “Edit as code” button; then, when I came back to the rich text editor, the image was there. My goal is NOT to use that approach and use the rich text editor only. I need the attached images to be uploaded to the CDN.
Here is my component:
Builder.registerComponent(MyComponent, {
name: "MyComponent",
inputs: [
{
name: "description",
type: "richText",
defaultValue: "",
}
]
});
Here is how I was able to upload the image, by manually typing the img html tag:
-
I clicked on the “Edit as code” button
-
Added the following code
<img src="https://d38b044pevnwc9.cloudfront.net/cutout-nuxt/enhancer/2.jpg" />
-
Clicked the “Edit as code” button again to return back to the rich text editor
-
The image was embedded in the rich text editor
Screen recoding: https://file.io/31c8h5WevuBB