How use & nbsp ; on editor type select HELP !

How use & nbsp ; on editor type select HELP !

EmilioHayesEmilioHayes Posts: 5Questions: 2Answers: 0
edited November 2017 in General

using   on a select html .. it give you a hard space
but on the editor this doesnt work im trying:
"options":[{label:"USA", value:0},{label:"& nbsp ;California",value:1}
Or others ways to do this ?
(I USE SPACE ON & nbsp ; BECAUSE HTML REPLACE THIS WITH THE SPACE)

This question has an accepted answers - jump to answer

Answers

  • EmilioHayesEmilioHayes Posts: 5Questions: 2Answers: 0

    HELP !

  • EmilioHayesEmilioHayes Posts: 5Questions: 2Answers: 0

    it return this on editor:
    Options:
    USA
    &nbsp ;California

    Instead :
    USA
     Californa

  • allanallan Posts: 63,683Questions: 1Answers: 10,498 Site admin
    Answer ✓

    The label doesn't get rendered as HTML - as far as I am aware an HTML option can't display other HTML inside it. You'd need to use Select2 or similar to display HTML inside the options.

    Can you decode the entities on the server-side?

    Allan

  • EmilioHayesEmilioHayes Posts: 5Questions: 2Answers: 0

    I just use "\xa0" instead "&nbsp" works perfectly :)

This discussion has been closed.