jodit / jodit-angular

Angular wrapper for Jodit && Hey. Due to the fact that I do not use Angular in my projects, I cannot fix plugin errors in a timely manner. If you want the plugin to develop, send PR or better become a contributor
MIT License
48 stars 35 forks source link

Is there a way to customize the image downloading request to add token into the header #36

Closed hoop22 closed 3 years ago

hoop22 commented 5 years ago

Jodit-Angular Version: 1.0.81

Browser: Chrome OS: Windows

Expected behavior: Image downloading request's hender can be sent with token as the following,

Accept: application/json
Authorization: Bearer 'token string here'
Referer: http://localhost:4200/sh/721408ea-2812-4c78-a737-611cab1f3102/account/tk
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36

Actual behavior: Havn't got a way to achieve this.

I've tried interceptor catching the request, and then add token to the request's header, but it looks like the interceptor cannot catch the image downloading request, still not sure why not.. Probably because jodit's using another http clients?

Is there a way to customize the image downloading request to add token into the header?

MrElectroNick commented 3 years ago

Hi @hoop22 please report this issue to Jodit main repository