Quote plugin



  • Anyone know of a plugin to quote outside sources?


  • Anime Lovers

    @torn2 said in Quote plugin:

    Anyone know of a plugin to quote outside sources?

    There aren't any. But what do you expect the plugin to do exactly? It's pretty easy to use markdown to quote an outside source. I guess you can add a button to the editor that automatically generates the outside quote for you by showing a popup with the url to the outside source and a textarea with the text to quote?

    According to Wikipedia on Canada:

    Canada (Listeni/ˈkænədə/; French: [ka.na.da]) is a country in the northern half of North America. Its ten provinces and three territories extend from the Atlantic to the Pacific and northward into the Arctic Ocean, covering 9.98 million square kilometres (3.85 million square miles), making it the world's second-largest country by total area and the fourth-largest country by land area.

    This was created with:

    According to [Wikipedia](https://en.wikipedia.org/wiki/Main_Page) on [Canada](https://en.wikipedia.org/wiki/Canada):
    > Canada (Listeni/ˈkænədə/; French: [ka.na.da]) is a country in the northern half of North America. Its ten provinces and three territories extend from the Atlantic to the Pacific and northward into the Arctic Ocean, covering 9.98 million square kilometres (3.85 million square miles), making it the world's second-largest country by total area and the fourth-largest country by land area.
    


  • This post is deleted!


  • @HolyPhoenix I know how to quote, it's when you want to quote large outside news sources...etc. This is why I was wondering if someone had a plugin that adds a button in the composer...



  • @torn2 Do you mean like this?
    0_1477507283633_Screen Shot 2016-10-26 at 8.41.04 PM.png



  • @Giggiux That's to quite a user within this topic. I'm talking about quoting outside of the topic, like a news article.



  • Do you mean like a "footnote" reference in the end of the article in a "wikipedia style"[1]?

    for exemple?

    1. like can be this


  • @Giggiux A button in the composer which will quote a particular text, just like when you quote someone who posts in a topic.

    Like this: article from yahoo

    Brady: My mom thinks I'm the fastest person on the field
    Moms just see their kids differently, right? Perfect, without flaws and better than the other kids. That’s the way it should be.

    It’s the same with Tom Brady and his mother. Mrs. Brady loves her son dearly, we’re certain, and the New England Patriots quarterback confirmed that on Wednesday when asked about a key scramble against the Pittsburgh Steelers — with the auspice of knowing, well, the dude is as slow as a sloth.

    “Don’t tell my mom that,” Brady said. “She would totally disagree with that. She thinks I’m very fast. She’ll say, ‘I think you’re the fastest person on the field.’ I say, ‘Mom, you’re crazy. There’s no way.’ That’s moms.”


  • Plugin & Theme Dev

    @torn2 there is no such plugin... you can create one if you need it. Hooks you need to create it are already available.



  • @pichalite Unfortunately I am a coding dummy. I would require a very detailed tutorial and lots of hand holding.


  • Plugin & Theme Dev

    @torn2 Well then pay someone to get it done. Contact the NodeBB team sales@nodebb.org



  • @pichalite Yea, that's why I asked first to see if someone had done one. Maybe I can try, but i'll probably burn my site down...

    Does this look OK?

    $('document').ready(function() {
      require(['composer', 'composer/controls'], function(composer, controls) {
        composer.addButton('fa fa-quote-right', function(textarea, selectionStart, selectionEnd) {
          if (selectionStart === selectionEnd) {
            controls.insertIntoTextarea(textarea, '@Username / Website said:\n> ');
            controls.updateTextareaSelection(textarea, selectionStart + 4, selectionStart + 20);
          } else {
            controls.wrapSelectionInTextareaWith(textarea, '@Username / Website said:\n> ', '\n\n');
            controls.updateTextareaSelection(textarea, selectionStart + 4, selectionEnd + 4);
          }
        });
      });
    });
    

Log in to reply
 


Looks like your connection to NodeBB was lost, please wait while we try to reconnect.