Comments (6)
How about AngularJS 1.4.3 ?
from angular-froala.
How about AngularJS 1.4.4 ?
froala-sanitize causes console errors when used with newer version of AngularJS, [ 1.4.3 & 1.4.4 ]. Replacing froala-sanitize.js
with latest angular-sanitize.js
removes these errors.
The error appears when invoking ng-bind-html
and Angular Strap Popovers with HTML templates. Google Chrome console error:
TypeError: html.indexOf is not a function
at htmlParser (/angular-froala/src/froala-sanitize.js:254:17)
at $get (/angular-froala/src/froala-sanitize.js:148:7)
at getTrusted (/angular/angular.js:16764:16)
at Object.$get.sce.(anonymous function) [as getTrustedHtml] (/angular/angular.js:17444:16)
at Object.ngBindHtmlWatchAction [as fn] (/angular/angular.js:22374:29)
at Scope.$get.Scope.$digest (/angular/angular.js:15753:29)
at safeDigest (/angular-strap/dist/angular-strap.js:3952:70)
at Object.angular.module.provider.$get.$tooltip.show (/angular-strap/dist/angular-strap.js:3604:11)
at Object.angular.module.provider.$get.$tooltip.enter (/angular-strap/dist/angular-strap.js:3568:29)
at HTMLButtonElement.angular.module.provider.$get.$tooltip.toggle (/angular-strap/dist/angular-strap.js:3673:59) undefined
** UPDATE **
The angular-froala & angularJS 1.4.x console error is being triggered when you pass an integer to ng-bind.
<span ng-bind="number"></span>
If you inspect ngSanitize 1.4.4 it has a conditional to ensure the data is of type string. Adding this to froala-sanitize.js fixes the problem:
function htmlParser( html, handler ) {
// Added code from newer ngSanitize 1.4.3/1.4.4 version.
// --- Start ---
if (typeof html !== 'string') {
if (html === null || typeof html === 'undefined') {
html = '';
} else {
html = '' + html;
}
}
// --- End ---
var index, chars, match, stack = [], last = html;
stack.last = function() { return stack[ stack.length - 1 ]; };
from angular-froala.
Thats why I exactly don't like Angular or other technologies with hard dependencies .
Just use Summernote which is free compared to Froala ...
from angular-froala.
I've removed the hard requirement on angular and implemented @julian-iFactory's fix for sanitize in the editorV.2
branch.
from angular-froala.
Has this been fixed in the latest froala v2.7.6 release?
from angular-froala.
@cgallarno we've also run into this issue and used @julian-iFactory's fix but we don't see the fix in the current release of froala v2.8.1. Am I missing something?
from angular-froala.
Related Issues (20)
- error: "An invalid form control with name='' is not focusable HOT 3
- XSS Vulnerability on using an version 2.2.4
- ngModel is not set to fr-view when initOnClick: true
- Initialized event loses context HOT 1
- Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.7.9/$injector/modulerr HOT 1
- Module froala is not available HOT 1
- Cannot get source of removed image
- Invalid Bower dependecnies
- IE11 - Dropdowns don't open
- Outdated Readme
- Froala model / reactive forms value does not get updated when navigating with router.navigate
- Converting circular structure to JSON when using the same $scope.options in multiple editors HOT 3
- After upgrading to the latest version, copy and paste the image into the rich text and it will prompt ‘Uncaught ReferenceError: replace is not defined’
- Open in new tab not working
- Getting Constructor is not Compatible with Angular Dependency Injection (Ivy), for FroalaEditorDirective HOT 1
- Minimum character count validation
- Perpetual license for version 3.0. The editor does not work. get the message "Copy license expired of Froala Editor"
- Buttons missing after Angular 12 update
- How to Get Edited HTML in Angular 13
- Put text via script in Froala Editor
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-froala.