-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues with ESM #1029
Comments
Hello, thanks for the problem |
Hello @xdan, thank you for your response. I was able to inject the "stat" and "placeholder" plugins so these features are working now. Only one further question: Do Angular/react users need to import autobind-decorator? I didn't import it to my example app and Jodit still works: import {Component, OnInit} from '@angular/core';
import {Config} from 'jodit/esm/config';
import "jodit/esm/plugins/stat/stat.js"
import "jodit/esm/plugins/placeholder/placeholder.js"
import {Jodit} from 'jodit';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'],
})
export class AppComponent implements OnInit {
ngOnInit(){
Jodit.make('#editor', {
width: 600,
height: 400,
buttons: ["bold", "underline"],
textIcons: false
} as Config);
}
} |
Because autobind-decorator is the only non-dev dependency and it comes with Jodit https://github.com/xdan/jodit/blob/main/package.json#L50 I've added "stat" and "placeholder" to the basic list so you don't have to include them yourself. |
Still issue with v4 beta 98. I debugged it and found out, that somehow the ESM JS files from affected plugins like "bold" or "underline" are not injected. For example "bold": a breakpoint here: jodit/src/plugins/bold/bold.ts Line 113 in f9fd995
Further more it seems that Jodit can't set the icon because the name is empty ("") in makeIcon from Line 79 in f9fd995
For now I debugged the ESM build itself. Perhaps I find time to dive in this repository. |
the issue with missing icons for "bold" and "underline" still exists in beta 105. Perhaps there is a missing
I would have tested it myself but I didn't get an environment running that allows me to test the newly built esm version. |
Hi, yes, just add bold in your build import "jodit/esm/plugins/bold/bold.js" |
Hi @xdan, it works, thank you! |
Jodit Version: 4.0.0-beta.89
Browser: all
OS: all
Is React App: False
Code: See https://github.com/julianpoemp/jodit-ts-import-bug/blob/main/src/app/app.component.ts . You can clone the repository and call npm start to run local web server.
Expected behavior:
Jodit Editor generated by ESM build should have the same functionality like that one from the other builds (e.g. es2021). For example if I set two buttons "bold" and "underline" I expect Jodit to show the buttons with icons.
Actual behavior:
![Bildschirmfoto 2023-10-16 um 11 16 49](https://private-user-images.githubusercontent.com/25926588/275455265-fe524f0d-aa0e-4162-a7bd-18c2d976783f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwMTE1ODcsIm5iZiI6MTczOTAxMTI4NywicGF0aCI6Ii8yNTkyNjU4OC8yNzU0NTUyNjUtZmU1MjRmMGQtYWEwZS00MTYyLWE3YmQtMThjMmQ5NzY3ODNmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDEwNDEyN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRiZDIyNTk3NDkyY2I4MjhiZjA2ZTNlNzU4MWE0ZWQzMWNmMmIxMzIwMjA4YWYxMmFjZmY3NmYyODhkYTIxM2QmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.uaFAXL66h0-IBg9Nx45kcAXIdN7Ph30Z5tPsfSs59gg)
For both editors the exact same configurations were set. As you can see there are three visible points missing:
The text was updated successfully, but these errors were encountered: