Giter VIP home page Giter VIP logo

Comments (5)

vsymguysung avatar vsymguysung commented on June 12, 2024

@jvenator, I found a bug where the addon handles the app.options that is for what you set up in the Brocfile.js.
So now ember-cli-summernote is version 0.1.10, please try this version and you may also want to configure the contentSecurityPolicy in the config/environment.js like the following

module.exports = function(environment) {
  var ENV = {
    modulePrefix: 'interest-bucket',
    firebase_instance: process.env.FIREBASE_APP_NAME,
    ...
    APP: {
      // Here you can pass flags/options to your application instance
      // when it is created
    },
    contentSecurityPolicy: {
      'img-src': "'self' data:",
      'style-src':"'self' 'unsafe-inline'"
    },
  };

Thanks for letting me have a chance to correct this and you're more than welcome to join and contribute to this project.

from ember-cli-summernote.

jvenator avatar jvenator commented on June 12, 2024

It works! And thanks for the heads up regarding the contentSecurityPolicy.

There is one more thing I am trying to do based on your demo app, which is to render the wysiwyg results below the editor area. I did the following inside summernote.hbs for route /summernote.

{{summer-note height=200 btnSize=bs-sm content=postContent}}

<div class='wysiwyg-preview'>
    <pre>
        {{postContent}}
    </pre>
</div>

It appears to be escaping the HTML and not rendering it properly. Anything I'm missing in my configuration elsewhere? I looked in your dummy.js file, but it's difficult to understand. It seems that you are setting unescaped: true, which I assume has something to do with Handlebars.SafeString.

Here's a screenshot of the output:

screenshot

from ember-cli-summernote.

vsymguysung avatar vsymguysung commented on June 12, 2024

You may want to try {{{postContent}}} instead of {{postContent}}.

from ember-cli-summernote.

jvenator avatar jvenator commented on June 12, 2024

Much appreciated. Crazy that my googling of "handlebars escape html" didn't turn that up as one of the first results. Once I've messed around with it a little more to understand it better I'll submit a PR for some example explanation in the README. You can accept if you think it's of value.

from ember-cli-summernote.

vsymguysung avatar vsymguysung commented on June 12, 2024

Sure, please submit a PR, I will review it.
Thanks for your contribution.

from ember-cli-summernote.

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.