-
Notifications
You must be signed in to change notification settings - Fork 200
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
FroalaEditorDirective should use the host's FloaraEditor #504
Comments
I found a workaround, although it is more likely a temporary solution:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Guys,
We are using
froala-editor
package, together withangular-froala-wysiwyg
.We recognized the following behaviors with the new version of these packages:
FroalaEditor
global object, as it is described here: https://froala.com/wysiwyg-editor/docs/concepts/custom/button/FroalaEditorDirective
importsFroalaEditor
fromfroala_editor.min.js
instead offroala_editor.pkgd.min.js
which causes lack of functionalities (e.g. in toolbar)These issues have been traced back to the following root cause:
FroalaEditorDirective
imports directlyFroalaEditor
object/constructor fromfroala-editor
like: https://github.com/froala/angular-froala-wysiwyg/blob/master/projects/library/src/editor/editor.directive.ts#L4I have created a test repo for demonstration with both Angular and Non-Angular version of the editor: bence-balogh-intland/angular-froala-test@master...add-froala
With the following result:
Please consider the following differences between the 2 editors:
For curiosity I checked what happens if I remove the line of the following import from
node_modules\...\angular-froala-wysiwyg.js
:import FroalaEditor from 'froala-editor';
And as you can see, it solved all of the points above:
So my suggestion would be to remove the import of
FroalaEditor
fromangular-froala-wysiwyg
, and leave this resolution for the host applications, sincefroala-editor
appendsFroalaEditor
to the window object on initialization.E.g. one possible way to do that: bence-balogh-intland/angular-froala-test@master...add-froala#diff-2d2675bb4687601a5c7ccf707455132f90f3516a33716185687e5c41df59ac7dR36
Checked with:
angular-froala-wysiwyg: 4.0.14
froala-editor: 4.0.14
Node: 14.18.0
Angular: 14.2.0
Thanks in advance!
The text was updated successfully, but these errors were encountered: