Search for ideas to Create option dropdown


#1

Hej there:-)
I’m writing a new package and would like to show the user available options for a specific item. I’ve figured out 2 different possibilities on my own, but didn’t get to far.

Possibility 1: Adding the options to autocomplete, if possible suppress all other options. But: How can I access the autocomplete-list?
Possibility 2: Creating a dropdown direktly in the editor. As it seems to work with HTML in the background, there might be a way to do so, but I didn’t find out how.
Possibility 3: [Add your suggestion here] :slight_smile:

Is there a way you cold help me? I’m very greatfull for every suggestions.


#2

This is extremely vague. You need to be more specific about what options and items you’re thinking about.

Possibility 1: Adding the options to autocomplete, if possible suppress all other options. But: How can I access the autocomplete-list?

Snippets get added to the autocomplete dropdown and the core autocomplete package provides an API for third-party providers, but it doesn’t sound like you want to add completions.

Possibility 2: Creating a dropdown direktly in the editor. As it seems to work with HTML in the background, there might be a way to do so, but I didn’t find out how.

Everything in Atom is defined with HTML, CSS, and JavaScript.


#3

You could take a look to see how autocomplete-plus does it.


#4

The options are the files in a specific path, but I allready found out how to list them. (If needed by anyone I could post a the code, but I don’t think anyone would find it here).

As there is just a very limited amount of options, I would like to offer them to the user. So It’s not exaclty autocomplete what I’m searching for, but the package may contain a solution to my problem.

Is there a way to manipulate the HTML-sourcecode out of a package? If there is a way to add a div to it, I might be able to get a step further.