MisterniceGuy
MisterniceGuy

Reputation: 1796

Double quote issue in Object in Angular Component File

I have a component in this case its froala editor which allows you to create custom drop downs. to do so it takes an object in the format of

// Options for the dropdown.
  options: {
    'opt1': 'Option 1',
    'opt2': 'Option 2'
  },

i am using this dropdown to insert a place holders in the editor for mail merge. And my values are like this.

{
'{{ first_name | fallback: "" }}': 'First Name',
'{{ last_name | fallback: "" }}': 'Last Name'
}

when doing so instead of returning {{ first_name | fallback: "" }} it returns only {{ first_name | fallback: i tried to escape the " with a \ but that did not do anything. What do i need to do to have the full string returned ?

Upvotes: 2

Views: 456

Answers (1)

Ashot Aleqsanyan
Ashot Aleqsanyan

Reputation: 4453

Try like this

"{{ last_name | fallback:   &#34&#34 }}"

and here is the link of characters https://www.degraeve.com/reference/specialcharacters.php

here is the stackblitz example: https://stackblitz.com/edit/angular-froala-v3-custombutton-dynamic-sgzfvm

Upvotes: 2

Related Questions