editor-js / simple-image Goto Github PK
View Code? Open in Web Editor NEWSimple Image Tool for Editor.js 2.0
License: MIT License
Simple Image Tool for Editor.js 2.0
License: MIT License
It seems that the text in use in this plugin are hardcoded, like the placeholder : "Enter a caption".
Some other plugins support i18n like editor-js/list
the full width button doesn't work unless there is an image after it. Then it applies to the image after.
1 - Create the code to hide the captions div:
.cdx-simple-image__caption:has(.hidden) { display: none; }
2 - Set inlineToolbar to true in the SimpleImage tool:
image: { class: SimpleImage, inlineToolbar: true, },
3 - Just use the editorjs-style.js tool to apply the 'hidden' class when clicking on the caption.
https://github.com/hata6502/editorjs-style
4 - See it in action:
Consider fixing for next update:
«blocks.stretchBlock()» is deprecated and will be removed in the next major release. Please use the «BlockAPI» instead.
Hello, thank you all for this plugin, I'm trying to use the following URL for testing but simple-image could not detect it on paste:
Does anyone know why?
Would love to see alt tag support added. Is this something that could be added the roadmap?
Maybe I'm wrong, but when I use simpleImage and set 4-6 images to my editor, my backend requests spent too many time to fetch data
There is Express(Node JS) for backend and MongoDB as database
See: editor-js/image#10
Is it possible to enhance simple-image by adding a extra field allowing input of a link for the image ?
npm i --save-dev @editor/simple-image
should be npm i --save-dev @editorjs/simple-image
I think all references to @editor
should be @editorjs
.
Whilst it's sometimes nice to have it base64 available, it massively increases the amount of memory the component uses in the browser because it is already displaying the decoded image as well as storing a large duplicate of the image as the URL.
The preference should be to use Blob URL's that can be converted to base64 if needed via a utility function, or lazy access.
I have modified the existing Link tool to get rid of backend dependency. It was a requirement for the project I am working on right now. May I share my work?
I realised it's missing an essential function toolbox
.
Im trying to upload a webp image but it doesnt work. The documentation says anything about allowed image format but in practice only work for png and jpg.
It could be a good addition to allow webp image format in this plugin,
Is it possible to hide the caption area when it is blank and in readonly mode ?
Thanks
Here are some examples of image urls that did nothing:
https://images.pexels.com/photos/9321606/pexels-photo-9321606.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940
https://motoring.pxcrush.net/motoring/general/editorial/210408_new_gt-r_nismo_3748.jpg?width=1024
In contrast, here is one that works:
https://images.hgmsites.net/hug/nissan-gt-r_100758125_h.jpg
I don't need or use a file upload service, so it would be good to be able to add an image from the filesystem and have it inserted into the blocks exactly like the drag and drop handler.
I would imagine that you could have it as an inline tool, so that when you choose to add an image it opens a file picker.
After discuss about image tool that does not appear in editor. Now, the new issue was the image url is using base64 url so it take so many memory and also makes my program get slower. It took quite long to see the image or even open the program. Any idea?
Included
<script src="https://cdn.jsdelivr.net/npm/@editorjs/simple-image@latest"></script>And
tools: {
image: {
class: SimpleImage,
inlineToolbar: ['link'],
},
but I can't insert images, tool is not displaying.
Although a image is 0 byte, Url is valid.
I thought It would be create normal image block, but error was occured.
Then div.cdx-loader remained.
I think it would be insert normal block, or it doesn't create div.cdx-loader
We don't want to allow someone to add images to non secure urls.
This should be the default IMO, and if someone wants to allow it, they can enable allowHttp
or something along those lines.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.