Giter Site home page Giter Site logo

Comments (5)

linear avatar linear commented on June 2, 2024

NV-3689 πŸ› Bug Report: Error when copy/paste template code to email editor - Failed to extract variables

from novu.

YugfeldID avatar YugfeldID commented on June 2, 2024

@lucafaggianelli you can paste template code into Custom code tab in the Email editor, it works for me

from novu.

YugfeldID avatar YugfeldID commented on June 2, 2024

Also, it seems like the problem occurs because when we type in the in-app editor text like this:
The expense {{expense.name}}

it is represented in DOM like this:

<span>The&nbsp;expense&nbsp;</span>   
<span >{{</span>
<span> expense.name</span>
<span >}}</span>

and after copying and pasting into email editor, 'data/html' will be pasted like in the example above. But email editor is not rich text editor, so when the app tries to find variables it parses HTML tags and can't find variables.

I assume it will be proper to prohibit pasting any 'data/html' into email editor not only because variables are not parsed correctly, but also because all styles and fonts are pasted with text now and there are no controls to clear them.
If it's okay, I can do it.

from novu.

lucafaggianelli avatar lucafaggianelli commented on June 2, 2024

Yeah I imagine it's something like that. I agree with your idea of blocking the pasting of html but on the other side it would be cool to let a user to copy the message from one editor to another, that in my opinion is a common case. So in this case the copy from the editor should copy a data/text.

In any case I'm thinking about moving to the echo version where I can use react email (I already have the templates).

Thanks for taking a look!

from novu.

YugfeldID avatar YugfeldID commented on June 2, 2024

Yes, I agree, I meant the same: prohibit paste 'data/html' but still allow to taste 'data/text'. So in case of copying from the editor 'data/text' should be pasted.
Let's wait for novu team response, if this approach is okay, I can implement it.

from novu.

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.