Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

HTML & CSS Input field like this one on the forum for the tags.

SpongeBOB

Well-Known Coder
Hi everyone,

How can I make simply an ~input field that work like the one on this very forum ? -->
damn_thats_neat.png

Without any extra add-on (like JSquery etc.. just CSS, HTML, or Regular Javascript.

Thanks.
 
I grab this code from stackover..


Its relative simple you need have a div and a input , an event on typing to show the input after the user type the content will show into a div

Code:
<div class="js-tag-editor tag-editor multi-line s-input" style="padding: 0px 9.1px; box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; width: 100%;"><span><span class="s-tag rendered-element">ruby<button class="s-tag--dismiss baw0 js-delete-tag" type="button" title="Remove tag"><svg class="svg-icon iconClearSm pe-none" width="14" height="14" viewBox="0 0 14 14"><path d="M12 3.41L10.59 2 7 5.59 3.41 2 2 3.41 5.59 7 2 10.59 3.41 12 7 8.41 10.59 12 12 10.59 8.41 7z"></path></svg></button></span></span><input type="text" autocomplete="off" tabindex="0" aria-autocomplete="list" aria-haspopup="listbox" role="combobox" aria-expanded="false" placeholder="" id="tageditor-replacing-tagnames--input" class="s-input js-tageditor-replacing" style="width: 19px;"><span></span></div>


HTML:
<input type="text" autocomplete="off" tabindex="0" aria-autocomplete="list" aria-haspopup="listbox" role="combobox" aria-expanded="false" placeholder="e.g. (ruby-on-rails xcode regex)" id="tageditor-replacing-tagnames--input" class="s-input js-tageditor-replacing" style="width: 19px;">

I seek for more info
 

New Threads

Latest posts

Buy us a coffee!

Back
Top Bottom