Search code examples
javascriptautocompleteace-editor

Acecomplete doesn't show 'meta' word


I successfully connected ace-editor with autocomplete but find an annoying bug: if autocomplete line is too long, 'meta' word is not shown: enter image description here How can I split my long line for multiple lines and show 'meta' word? If it's not possilbe, how to show 'meta' word at least?


Solution

  • Ace allows to use caption and value properties to set different texts for insertion and display

    {
       caption // short descriptive string
       value // the long string that gets inserted
    }
    

    you can aslo set item.docText to value, so that the value is displayed in the tooltip when the item is selected