Reputation: 8144
I'm trying out the Atom editor from Github and I really like it. I would like to create a simple (just to learn) plugin. I used the online resources to create the figgle example successfully.
Now I would like to create something with an UI. I would like to add an input field to my UI, but how can I get it to be styled to same way Atom does.
I see in the documentation that I have to create an element with 'atom-text-editor' tag. However this creates an text area with line numbers etc. I just want a single lined input field.
So concrete, my question is: 'How can I create an input field which looks the same as the atom one.'
Upvotes: 2
Views: 519
Reputation: 8144
Found the answer through atom slack chat.
var elem = document.createElement 'atom-text-editor'
element.setAttribute 'mini', ''
element.setAttribute 'placeholder-text', 'Search'
Which gives:
Upvotes: 2