This Angular Component converts plain text tweets into real tweets. This component is responsible for parsing the tweets and handles transform mention (@sodhanalibrary), hashtags (#AngularJS) and URLs inserted in the tweet in functional URLs. This was created based on jquery-tweet-parser
Source Code           DEMO

Angular Component

This is the Angular Component which you can use it for converting plain text to real tweets
import { Component, Input } from '@angular/core';

    selector: 'tweetParser',
    template: `<div [innerHTML]="myHtml"></div>`
export class TweetParser {
    @Input('urlClass') urlClass: string = 'react-tweet-parser__url';
    @Input('userClass') userClass: string = 'react-tweet-parser__user';
    @Input('hashtagClass') hashtagClass: string = 'react-tweet-parser__hashTag';
    @Input('target') target: string = '_blank';
    @Input('searchWithHashtags') searchWithHashtags: boolean = true;
    @Input('parseUsers') parseUsers : boolean = true;
    @Input('parseUrls') parseUrls :  boolean = true;
    @Input('parseHashtags') parseHashtags: boolean = true;
    @Input('tweet') tweet: string = '';

    myHtml: string = '';
    constructor() {

    generateLink(url, urlClass, target, text) {
      return `<a href="${url}" className="${urlClass}" target="${target}">${text}</a>`;

    ngOnChanges() {


    parseTweet() {
     const {urlClass, userClass, hashtagClass, target, searchWithHashtags, parseUsers, parseUrls, parseHashtags} = this;

     const REGEX_URL = /(?:\s)(f|ht)tps?:\/\/([^\s\t\r\n<]*[^\s\t\r\n<)*_,\.])/g, //regex for urls
                REGEX_USER = /\B@([a-zA-Z0-9_]+)/g, //regex for @users
                REGEX_HASHTAG = /\B(#[á-úÁ-Úä-üÄ-Üa-zA-Z0-9_]+)/g; //regex for #hashtags
     let searchlink, myTweet = this.tweet; //search link for hashtags
      //Hashtag Search link
     if (searchWithHashtags) {
          //this is the search with hashtag
          searchlink = "";
      } else {
          //this is a more global search including hashtags and the word itself
          searchlink = "";
      //turn URLS in the tweet into... working urls
      if (parseUrls) {
          myTweet = myTweet.replace(REGEX_URL, (url) => {
              let link = this.generateLink(url, urlClass, target, url);
              return url.replace(url, link);
      //turn @users in the myTweet into... working urls
      if (parseUsers) {
          myTweet = myTweet.replace(REGEX_USER, (user) => {
              let userOnly = user.slice(1),
                  url = `${userOnly}`,
                  link = this.generateLink(url, userClass, target, user);
              return user.replace(user, link);
      //turn #hashtags in the myTweet into... working urls
      if (parseHashtags) {
          myTweet = myTweet.replace(REGEX_HASHTAG, (hashtag) => {
              let hashtagOnly = hashtag.slice(1),
                  url = searchlink + hashtagOnly,
                  link = this.generateLink(url, hashtagClass, target, hashtag);
              return hashtag.replace(hashtag, link);

      this.myHtml  = myTweet;


<tweetParser [tweet]="myTweet" urlClass="myUrlClass"></tweetParser>


  1. Pretty blog, so many ideas in a single site, thanks for the informative article, keep updating more article.
    Webdesining course in chennai

    1. ERP Gold ( is a world leader in serialized inventory management software solution for electronics and medical equipment retailers and wholesalers. Customized to your workflow needs, equipped with modules like accounting, inventory, order processing and shipping all-in-one.

      ERP Gold means more growth opportunities for you, inventory sync with multiple marketplaces e.g. Amazon, eBay, Walmart, BestBuy and many more.

  2. Your article is detailed, thanks to it I solved the problem I am entangled. I will regularly follow your writers and visit this site daily slope game

  3. Nowadays, games have rewards programs that you may need to use real money to get. Make sure you choose the right option! On one hand, there is not much more enjoyment in playing. Then again, they may save a bit of time.
    free Studio One Professional 4 Crack
    free WinThruster 2018 Crack

  4. Really informative article.Really looking forward to read more. Really Cool.
    โปรโมชั่นGclub ของทางทีมงานตอนนี้แจกฟรีโบนัส 50%
    เพียงแค่คุณสมัคร Gclub กับทางทีมงานของเราเพียงเท่านั้น
    สมัครสล็อตออนไลน์ >>> goldenslot
    สนใจร่วมลงทุนกับเรา สมัครเอเย่น Gclub คลิ๊กได้เลย

  5. Im grateful for the blog post.Really thank you!
    เว็บไซต์คาสิโนออนไลน์ที่ได้คุณภาพอับดับ 1 ของประเทศ
    เป็นเว็บไซต์การพนันออนไลน์ที่มีคนมา Gclub Royal1688
    และยังมีหวยให้คุณได้เล่น สมัครหวยออนไลน์ ได้เลย
    สมัครสล็อตออนไลน์ได้ที่นี่ >>> Golden slot
    ร่วมลงทุนสมัครเอเย่น Gclubกับทีมงานของเราได้เลย

  6. Things are very open and intensely clear explanation of issues. was truly information. Your website is very beneficial.
    hotmail login

  7. This is really a great stuff for sharing. Keep it up . Thanks for sharing.
    gmail login

  8. Attend The Data Analytics Courses From ExcelR. Practical Data Analytics Courses Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Data Analytics Courses.
    ExcelR Data Analytics Courses

  9. This comment has been removed by the author.

  10. Help full post, lots of information about it. Thank you admin for providing this information.

  11. Thank you so much for the sharing article. I have been reading your articles and they are really very helpful for the user. It’s a very nice blog on
    Digital exhibition
    Online trade fair
    online events
    digital events
    digital trade fair
    Upcoming Online events
    upcoming exhibitions
    Explore Best Online Events


  12. อยากมีเงินใช้ เงินเที่ยว เกมเล่นสนุกๆ slot online สล็อตออนไลน์ เล่นง่ายๆ เล่นสล็อต แจกฟรีเครดิตสล็อต slotxo ฟรีเครดิต ได้เงินจริง เล่นเลยที่นี่ คลิกเลย

  13. Thanks for sharing these wonderful informations. I really appreciate your hardwork. Keep it up. We buyjunk cars and truck

  14. Your site is in reality extremely alluring. Your own course is really immense. We should be existing by and by there. I'm agreeable along with your distribute. I'll go to an individual with respect to considerably more reconsider. Much obliged! Printer Repair

  15. ยินดีต้อนรับเข้าสู่ Click1234 สุดยอดเว็บแทงหวยออนไลน์ที่ดีที่สุดของประเทศไทย เว็บหวยออนไลน์อันดับ1 ของเมืองไทย ด้วยระบบที่ทันสมัย อยู่ที่ไหนก็เล่นได้ เล่นง่ายแค่ปลายนิ้ว อีกทั้งยังสามารถยกเลิกตั๋วด้วยตัวเอง เล่นง่ายไม่มีเลขอั้น ใหม่พร้อมเวอร์ชั่นโมบาย รองรับสมาร์ทโฟนทุกรุ่น ทำให้ไม่พลาดทุกเลขเด็ด สมัครสมาชิกฟรี ไม่เสียค่าใช้จ่าย เล่นง่ายไม่มีขั้นต่ำ เปิดรับการเล่นถึง 15.25น. มั่นคง ปลอดภัย 100% เล่นง่ายจ่ายจริงรับเงินเร็ว ไม่มีโกงแน่นอน “ท้าให้คุณลอง เปิดให้คุณเล่น หวยออนไลน์ยุคใหม่ อยู่ที่ไหนก็เล่นได้”


  16. Nice Blog.

    We Are The Best Canada Immigration Consultants in India,Offering Canada Visa Assistance for Those Who Are Under the process of Immigration to Canada.

    For more Details Please follow below link

  17. For getting best feed for animal,fish and poultry
    Pashu ahar in Bihar

  18. Crypto-currency as a modern form of the digital asset has received a worldwide acclaim for easy and faster financial transactions and its awareness among people have allowed them to take more interest in the field thus opening up new and advanced ways of making payments. Referral Code with the growing demand of this global phenomenon more,new traders and business owners are now willing to invest in this currency platform despite its fluctuating prices however it is quite difficult to choose the best one when the market is full. In the list of crypto-currencies bit-coins is one of the oldest and more popular Referral Code for the last few years. It is basically used for trading goods and services and has become the part of the so-called computerized block-chain system allowing anyone to use it thus increasing the craze among the public, Referral Code.

    Common people who are willing to purchase BTC can use an online wallet system for buying them safely in exchange of cash or credit cards and in a comfortable way from the thousands of BTC foundations around the world and keep them as assets for the future. Due to its popularity, many corporate investors are now accepting them as cross-border payments and the rise is unstoppable. With the advent of the internet and mobile devices,information gathering has become quite easy as a result the BTC financial transactions are accessible and its price is set in accordance with people’s choice and preferences thus leading to a profitable investment with Referral Code Code. Recent surveys have also proved that instability is good for BTC exchange as if there is instability and political unrest in the country due to which banks suffer then investing in BTC can surely be a better option. Again bit-coin transaction fees are pretty cheaper and a more convenient technology for making contracts thus attracting the crowd. The BTC can also be converted into different fiat currencies and is used for trading of securities, for land titles, document stamping, public rewards and vice versa.

    Another advanced block-chain project is Ethereumor the ETH which has served much more than just a digital form of crypto-currency Referral Code and its popularity in the last few decades have allowed billions of people to hold wallets for them. With the ease of the online world,the ETH have allowed the retailers and business organizations to accept them for trading purposes, therefore, can serve as the future of the financial system.

  19. Thank you so much. This article was very essential for me . I after a long time I found this kind of article. know about Roobet Promo Code Gambling Bitcoin Casino

  20. Our full Lace Front Wigs are all hand made with a lace cap. They are manufactured with thin lace sewn on top of the cap. Individual hairs are then sewn onto the thin lace. Each lace wig has lace all around the unit which will need to be cut prior to securing the wig to your head. You will need to cut along the hairline around your entire head. By doing so, you will be able to wear your hair anyway you like. You can even style ponytails, up-dos, etc. Once the Lace Wigs is successfully applied, it will appear that all the hair is growing directly from your head!

    Lace front wigs are hand-made with lace front cap & machine weft at back. Lace front wigs are manufactured with a thin lace that extends from ear to ear across the hairline. When you receive the wig, the lace will be quite long in the front. Cut and style according to your preference, as you will need to apply adhesive along the front of the wig. Once the wig is applied, you will still have Lace Wigs with a very natural appearance.
    TeamWigz Provide the Best Lace Front Wigs and Lace Wigs in Johannesburg and South Africa.

  21. news,busines,followers,likes,france,social,media,fitness,
    Thanks for posting this info. I just want to let you know that I just check out your site and I find it very interesting and informative.
    I can't wait to read lots of your posts.
    acheter des abonnés instagram france .
    acheter instagram aime france

  22. This was a great article. It is very helpful and informative. Thanks for sharing such kind of article.
    Keep up sharing such kind of article about DIgital Marketing.

  23. Thank you for this informative post

    Get Six Sigma Certification In Delhi with HenryHarvin.
    Learn from experts and be on top.

  24. Well written article, loved it!
    Get Six Sigma Certification Online with HenryHarvin.
    Learn from experts and be on top

  25. Marvelous Designer Free Download not only make conventional T-shirts but also makes dresses and professional outfits with various complex details. The property effects also can be displayed most realistically, accurately simulated. Therefore, It also can modify and check out clothing in real timeFullmaccrack .

  26. Tongkat Ali ist eine Pflanze beheimatet in Südostasien. Sie gehört zur Gattung der Bittereschengewächse und Ihr botanischer Name lautet “Eurycoma longifolia”. Es gibt noch eine weitere Reihe länderspezifischer Namen
    wie z. B. “Pasak Bumi”, wie die Pflanze in Indonesien genannt wird oder “longjack”, die allgemeine Bezeichnung für Tongkat Ali Kaufen in den USA, Kanada und Australien.

    Das Ursprungsland von Tongkat Ali Kaufen ist Indonesien, daher findet man auch dort auch die größten Bestände. Weitere Vorkommen gibt es in Ländern wie Thailand, Malaysia, Vietnam und Laos.

    Die Einnahme von Tongkat Ali Kaufen empfiehlt sich insbesondere für Leistungssportler, die einen schnellen
    Muskelaufbau und Muskelzuwachs anstreben und nicht auf illegale und künstliche Substanzen zurückgreifen möchten um Ihren Testosteronspiegel zu erhöhen.

    Generell empfiehlt sich eine Einnahme von Tongkat Ali für alle Männer ab dem 30ten Lebensjahr, da in dieser Phase nachweislich die Produktion von körpereigenem Testosteron zurückgeht. Dies macht sich vor allem dadurch bemerkbar dass die körperliche Leistungsfähigkeit nachlässt, die Lust auf Sex spürbar abnimmt und dadurch allgemein das Selbstwertgefühl negativ beeinflusst wird.

    Mit der Einnahme von Tongkat Ali können Sie nachweislich Ihre Libido steigern, Ihr Testosteron erhöhen und Ihre gewohnte Lebensenergie aus den jungen Jahren Ihres Lebens wieder herbeiführen. Hier können Sie übrigens weitere Informationen bekommen zum Thema ‘Libido steigern‘ ganz natürlich. Sollten Sie daran interessiert sein lohnt es sich auch unseren Artikel über
    Butea Superba zu lesen.

    Tongkat Ali wächst als Strauch und kann Höhen von bis zu 12 Metern erreichen. Typischerweise dauert es 10-15 Jahre bis solche Ausmaße erreicht werden. Der Strauch trägt anfangs grüne Blüten die sich im Laufe der Zeit, bis zur Reife, rot färben.

    Allerdings sind die Blüten im Hinblick auf die Wirkung der Pflanze weniger interessant. Der wertvolle Teil verbirgt sich unter der Erde.
    Im Laufe der Jahre wachsen die Wurzeln teilweise senkrecht und bis zu mehrere Meter tief in den Boden, was die Ernte zu einer schweren und mühsamen Arbeit werden lässt. Je älter die Wurzeln sind, desto höher ist auch die Anzahl der Wirkstoffe Butea Superba.
    Von daher gilt es einige Dinge zu beachten sollten Sie Tongkat Ali kaufen wollen.

  27. The article is well written and understandable. for more content i will get back to you SEO SERVICE COMPANY CHENNAI

  28. Thanks for sharing this content. very nice and useful information for me.

    Website Designing Services In Delhi

  29. ERP Gold Software
    How ERP Gold works as an inventory management software for Walmart
    Why do sellers on Walmart need inventory management software?
    Inventory management involves the process of ordering, handling, storing, and processing a company’s inventory. This has done because, without an effective inventory management system, the full potential of the supply chain becomes unattainable.
    For more information about ERP Gold inventory management software, please click on the link below.

  30. Hey my website is made up of react frame work but my website title and description is not caching, can anyone help me out. Plz Check. Maccaron

  31. thank you for sharing this wonderful blog. it's very helpful for me

  32. i like your blog and artical too much

  33. Health Experts have proven that regular exercise coupled with a good diet allow you to live longer and healthier. In this busy day and age, not everyone has the time to go to the gym - resulting to a lot of overweight people that desperately need to exercise. A healthy alternative is for you to Buy Home Gym Equipments that you can store in your own home or even at your office. Here are some tips when buying home gym equipment.

    First, know your fitness goals and keep these goals in mind when you are buying home gym equipment. One of the biggest mistakes that people make is buying the biggest or trendiest fitness machine simply because they like how it looks. More often than not, these end up gathering dust in your storage rooms or garage because you never end up using them. It is important to take note of what particular type of physical activity you want or enjoy doing before you buy your exercise machine. If you are looking to loose a few pounds and you enjoy walking or hiking, a treadmill is the best option for you. If you are looking to tone your lower body while burning calories a stationary bike is your obvious choice. Similarly, Special Equipments for Core Strength Exercises, Strength Training Weight Vests, Core Strength & Abdominal Trainers, Home Cardio Training, Strength Training Power Cages, Strength Training Racks & More.

    Second, set aside a budget before Buying Home Gym Equipments. Quality exercise machines do not come cheap. They are constantly exposed to wear and tear when they are used properly. So, pick machines that are built to last and have passed quality certifications to get the most out of your money. If you are operating on a tight budget, think about investing in several weights, We can Provide you High Quality Home Gym Equipments at Very Low Prices for your Complete Uses: Core Strength Exercises, Strength Training Weight Vests, Core Strength & Abdominal Trainers, Home Cardio Training, Strength Training Power Cages, Strength Training Racks & More.

    Its the Right Time to Buy Home Gym Equipments for you at Very Low Prices.

  34. We offer you a selection of unique and professionally embroidered and printed handcrafted wedding accessories at affordable prices.
    learn more:

  35. Come on guys its Christmas and new year take a break seriously and and have fun before the year ends go on do some shopping on berrylook coupon

  36. Buy Dank Now began as an idea to create a top-notch delivery service for buy weed online in the US and quickly evolved in much more. Even though California accepted Safe to Buy Marijuana Online in 1996, we felt there was still a major lacking in quality and service. From what once started as a humble, flower-child type movement, evolved into the next California gold rush.

    Buy Dank Now Shop is committed to ensuring that your privacy and security is protected at all times, in fact, we care so much that we offer guaranteed stealth delivery to anywhere in the world at no extra cost! Buy Weed Online, Glo Carts, Glo Extracts, Glo Cart, Glo Cartridges, Glo thc Carts, Glo vape, Lions Breath Carts, Big Chief Carts and All orders are fully guaranteed, so whatever happens, nothing will ever stand between you and your weed!

    With literally thousands upon thousands of amazing strains from the best breeders in the world, ranging from famous cup-winners to potent, CBD-laden medical strains, High THC powerhouses, Glo Extracts, famous cheese to Buy Marijuana Online and Glo Carts popular white widow strains, all the way through to some of the rarest, hardest-to-find varieties in the world.

    Why Is Marijuana Effective for Treating Anxiety? Conventional medicine uses several different kinds of drugs to treat anxiety disorders, including serotonin reuptake inhibitors like Zoloft and tranquilizers like Valium. However, many patients don’t respond well to these medications. One of the non-psychoactive cannabinoids found in marijuana that is commonly used to treat anxiety is cannabidiol (CBD). Various scientists and researchers have experimented with both animals and humans to test the effectiveness of CBD for anxiety treatment.

    You can get it all right here at Buy Dank Now! Because we only ever work with breeders who meet our rigorous quality standards, you can be sure that whatever products you get from our Website such as, Glo Carts, Glo Extracts, Glo Cart, Glo Cartridges, Glo thc Carts, Glo vape, Lions Breath Carts, Big Chief Carts, they’ll make exceptional additions to your genetic library!

  37. Angular 1on1 training in rayachoty

    Project sentears in rayachoty house lighting design

  38. That's an excellent point. Very important information There is no doubt about it. Thanks For Sharing. Custom Web Solutions.Retail Electricity Supplier

  39. This Angular Component converts plain text tweets into real tweets.Electrical Engineering Company in Hyderabad

  40. This post is not only informative but impressive also, I learned new thing from this blog. This post is so persuasive that it created an urge to choose Mobile application development company. You can email us at or call us at +91-9717270746



Follow this blog by Email

Popular Posts