julianpoemp / ngx-jodit

Angular wrapper for jodit and jodit-pro WYSIWYG editor supporting Angular >=12 and ESM.
https://github.julianpoemp.com/ngx-jodit/3.x/
MIT License
18 stars 4 forks source link

ngx-jodit-pro:paste image copy from outlook #11

Closed Yang-Jing-Hui closed 1 year ago

Yang-Jing-Hui commented 1 year ago
  1. Copy the image from Outlook email
  2. Use Ctrl + V to paste the image to the Jodit editor image

Jodit-editor can not show the image.

package.json: "@angular/cdk": "13.3.9", "@angular/common": "13.3.11", "@angular/compiler": "13.3.11", "@angular/core": "13.3.11", "jodit": "3.24.9", "jodit-pro": "^1.3.40", "ngx-jodit-pro": "^1.0.2",

I didn’t have this problem when I pasted the Outlook image on the Jodit-pro official website demo.

julianpoemp commented 1 year ago

@Yang-Jing-Hui what's the console output? Any errors? Perhaps this is an issue related to CORS, because you're probably pasting an image from a public server to Jodit that is served on a local server.

If this isn't the issue please send me more information: Either...

a)... send me a link to a stackblitz project to make it easy for me to reproduce this issue

b)... or send me all code related to your Jodit implementation (HTML snippet, TS snippet and the styles and scripts properties from angular.json/projects.json). Please make sure to not send personal information including your license key.

Yang-Jing-Hui commented 1 year ago

@julianpoemp Thank you for replying me so quickly. console without any error message. stackblitz

The image of Outlook received email is a screenshot.

image

julianpoemp commented 1 year ago

@Yang-Jing-Hui import paste-from-word.js in your scripts property of your angular.json/project.json:

"node_modules/jodit-pro/build/plugins/paste-from-word/paste-from-word.js"

For further plugins please make sure to always follow the instructions: https://github.com/julianpoemp/ngx-jodit/blob/main/libs/ngx-jodit-pro/README.md#use-pro-plugins

Please consider giving this repository a star 😄

julianpoemp commented 1 year ago

I think it's solved. Closing it.

Yang-Jing-Hui commented 1 year ago

I add paste-from-word.js in my scripts property of your angular.json/project.json But this issue is still not resolved. I thought it was because I didn't fill out the license for jodit-pro. I recently applied for it and added it, but it still didn't work. image

julianpoemp commented 1 year ago

@Yang-Jing-Hui you are currently using jodit, not jodit-pro. The plugins don't work and the license key doesn't have any affect. You see this on two points:

1.) There is no Jodit-Pro v3. 2.) With Jodit-Pro the water mark "powered by" on the right bottom corner is not visible.

Please make sure, that you have installed "ngx-jodit-pro" as described here. If you installed ngx-jodit ealier make sure it's completely removed using "npm remove ngx-jodit". In node_modules folder "ngx-jodit" shouldn't exist but "ngx-jodit-pro" should. HTML snippet should look like this:

  <ngx-jodit-pro [(value)]="value" [options]="options"></ngx-jodit-pro>

If the problem still exists please send me your package.json content and the HTML snippet you are using to embed ngx-jodit-pro.

Reopening it. If it's solved please close this issue.

julianpoemp commented 1 year ago

@Yang-Jing-Hui I re-checked ngx-jodit-pro demo v1 and I have the same issue even if I'm using jodit-pro. It's very strange. I'll investigate this.

julianpoemp commented 1 year ago

@Yang-Jing-Hui no, I already re-opened it. Found the solution, releasing it in the next hour :)

julianpoemp commented 1 year ago

@Yang-Jing-Hui new release ngx-jodit-pro@1.0.3 fixes this issue.