Giter VIP home page Giter VIP logo

Comments (6)

cgallarno avatar cgallarno commented on May 29, 2024

@eddcvjm Are you including angular-sanitize? angular-sanitize will remove the inline style tags and needs to be replaced by froala-sanitize which should maintain the styles.

from angular-froala.

eddcvjm avatar eddcvjm commented on May 29, 2024

Hi,
I have the following code in my index.html and app.js
As you can see I have the code in my index.html

<script src="https://code.angularjs.org/1.2.5/angular.min.js"></script> <script src="../src/froala-sanitize.js"></script> <script src="../src/angular-froala.js"></script>

So, I'm assuming that I'm using the froala-sanitize.

But as you can see in my app.js, if I set $scope.myHtml without
$sce.trustAsHtml, the rendering looses all formatting.
If I set $scope.myHtml with $sce.trustAsHtml, the javascript is fired.

Am I missing something? Could you provide some help on this issue?

Thanks

2015-09-03 18:16 GMT+01:00 Cameron Gallarno [email protected]:

@eddcvjm https://github.com/eddcvjm Are you including angular-sanitize?
angular-sanitize will remove the inline style tags and needs to be replaced
by froala-sanitize which should maintain the styles.


Reply to this email directly or view it on GitHub
#40 (comment)
.

from angular-froala.

j-hogue avatar j-hogue commented on May 29, 2024

I am seeing the same issue, any progress?

I added the following to froala-sanitize starting at line 486 :

function validStyles(styleAttr){
....
            key === 'float' && (
                value === 'left'
                || value === 'right'
                || value === 'none'
            )

added

            ||
                key === 'font-family'
            ||
                key === 'font-size'

seemed to resolve the issue.

from angular-froala.

cgallarno avatar cgallarno commented on May 29, 2024

@j-hogue can you submit a pull request?

from angular-froala.

yanivlllev avatar yanivlllev commented on May 29, 2024

hi, was this issue solved?
i'm experiencing the same thing.

from angular-froala.

cgallarno avatar cgallarno commented on May 29, 2024

I have added support for these attributes to froala-sanitize in this commit 1f8dfc1, we're working on a 'catch-all' solution to support all style attributes.

from angular-froala.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.