editor-js / simple-image

Simple Image Tool for Editor.js 2.0
MIT License
51 stars 63 forks source link

could not detect image URL #25

Open tronytran opened 3 years ago

tronytran commented 3 years ago

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:

https://lh3.googleusercontent.com/86arOE_jc_FYR6_mPbeXrzWB4LwvgCRWPGXbbftgG4_zAjY05ajbmq3xiG0Xc_uYCoTccikGvLdo5WIlofH5pmySn1VRejqngh2pwDLquiLJYayCOJKUrZKFnOwmSxKzQqqOM1y5o42TPk6LYR1vbPjrEPx3dQIUEwS4IPRjzt3JdPZT32TkqCECm-PoQtsBAPnyN6g46PbiyD9fblgzuBcT2xuO1AaZgOkR53bom8ATCBkDgcYT_mnsxWuxLGp6cNFUR4lWBFKyYkYJWJY--KmIVCWDDoJ3SxwjimGjwRG-X2Qu3AP4wa6tRazHuBo3a8IOofm6f5arSRdpVy4AaXoacTPz8TSkcofA0YaIttHpek1Gi5v1yMSbi5mHV6Mfv4lyczXPp8c5iNR7IFPvgMz1BiCETTxNwSvDjb2JCN94_256Fzejrs-Dk-kMYeCCYQh2Zd_lt9xiEQDgZ5gufdpxxM9xDiP447vrOqKbBMcAS_6hu43EwRi97ILAhBpS3QLP-4WhKf4GHauWqML_EcBvhszB-6T1iGeCWvpAT9jZVDVgekalBvLZiZNoy5Ow9QlnHA=w1827-h711-no-tmp.jpg

Does anyone know why?

gohabereg commented 3 years ago

Hi @tronytran Editor doesn't check string that it matches patterns if length is >450 characters, your one is 638ch long

tronytran commented 3 years ago

@gohabereg thank you for you reply. Is it possible to fix somehow? I'm not very familiar with the library so I'm not sure if we could issue an official fix/patch/support for the Editor core or for this particular simple-image tool. As in my case I will be using photos that hosted by google photos a lot and this is the kind of URL pattern that they are using. I'm not sure if this is something the author will consider to support.