Html tags in input fields

Hello Webix team,

https://snippet.webix.com/lvdr2pjq

In above snippet we don't want any html tag to be displayed in text/suggest/combo box.

Comments

  • Hello,

    You can apply format property to the text view.
    To set a custom format, specify the property value as an object with two attributes:
    parse - the function that handles a real value kept by the control
    edit - the function that handles a value that will be rendered

       { view:"text", 
        value:a, 
        suggest:countries, 
         ...
         format:{
          parse: function(value){
            return value.replace(/<[/]?(b)|>|&nbsp;/g,'');
          },
          edit: function(value){
            return value;
          }
        } },
    ...
    

    Please check the sample: https://snippet.webix.com/suat171r

  • edited January 24

    Hi Nastja,

    I tried this but if I have element in list then it is not working. For suggest list select first element of list

    https://snippet.webix.com/5zh0xvyb

  • This is actually a bug
    Suggest provides different values for final and intermediate values.

    Fix will be included in the next version.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!