<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Use readmore.js for blockquotes]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">I'm migrating from another forum to hosted nodeBB but need som help with one important feature.</p>
<p dir="auto">We have some users that make long posts, and when someone quotes, the quote become equally long, this makes it cumbersome to scroll throught the topic.</p>
<p dir="auto">Other forums solve this by fading out, and a clickable "read more..." text that expands the big quotes.</p>
<p dir="auto">I was hoping to do this as well, but am failing. Mainly I hope due to my lacking knowledge in javascript.</p>
<p dir="auto">So I tried uploading <code>readmore.min.js</code> to /assets/uploads/... and added the following to custon javascript:</p>
<pre><code class="language-javascript">function onLoad() {
    require(['/assets/uploads/readmore.min.js']);
    console.log('yeah it works');
    console.log($('blockquote'));
    $('blockquote').readmore();
}

$(document).ready(onLoad);
$(window).on('action:ajaxify.end', onLoad);
</code></pre>
<p dir="auto">This gives me the following output in the console:</p>
<p dir="auto"><img src="https://community.nodebb.org/assets/uploads/files/1621770657748-86a146b2-755d-45ef-8924-e2b63c5849df-image.png" alt="86a146b2-755d-45ef-8924-e2b63c5849df-image.png" class=" img-fluid img-markdown"></p>
<p dir="auto">Any help is much appreciated!</p>


<div class="row"><img class="img-thumbnail" src="https://community.nodebb.org/assets/uploads/files/1621770657748-86a146b2-755d-45ef-8924-e2b63c5849df-image.png" alt="Link Preview Image" /></div>]]></description><link>https://bbs.spacc.eu.org/new/topic/778a70c7-4e63-4099-9df8-5a69e63c7886/use-readmore.js-for-blockquotes</link><generator>RSS for Node</generator><lastBuildDate>Tue, 18 Aug 2026 00:50:47 GMT</lastBuildDate><atom:link href="https://bbs.spacc.eu.org/new/topic/778a70c7-4e63-4099-9df8-5a69e63c7886.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 23 May 2021 11:51:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Use readmore.js for blockquotes on Fri, 01 May 2026 03:31:01 GMT]]></title><description><![CDATA[<p dir="auto"><a href="https://community.nodebb.org/user/baris" target="_blank" rel="noopener noreferrer nofollow ugc">@baris</a> don't we already automatically collapse blockquotes?</p>
]]></description><link>https://bbs.spacc.eu.org/new/post/https://community.nodebb.org/post/107086</link><guid isPermaLink="true">https://bbs.spacc.eu.org/new/post/https://community.nodebb.org/post/107086</guid><dc:creator><![CDATA[julian@community.nodebb.org]]></dc:creator><pubDate>Fri, 01 May 2026 03:31:01 GMT</pubDate></item><item><title><![CDATA[Reply to Use readmore.js for blockquotes on Thu, 30 Apr 2026 14:27:43 GMT]]></title><description><![CDATA[<p dir="auto">The latest file is here <a href="https://github.com/jedfoster/Readmore.js/blob/master/readmore.min.js" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/jedfoster/Readmore.js/blob/master/readmore.min.js</a>, I tried using it with the latest version of nodebb and found some issues. Create a pull request with my fixes at <a href="https://github.com/jedfoster/Readmore.js/pull/265/changes" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/jedfoster/Readmore.js/pull/265/changes</a>.</p>
<p dir="auto">So with that updated file in <code>public/uploads</code> folder and the below custom javascript in the ACP it works.</p>
<pre><code>$(window).on('action:topic.loaded action:posts.loaded', function() {
   function enableReadMore() {
       $('blockquote').readmore({});
   } 
   if (!$.readmore) {
       $.getScript('/foren/assets/uploads/readmore.min.js').then(enableReadMore);
   } else {
       enableReadMore();
   }
});
</code></pre>
<p dir="auto"><img src="https://community.nodebb.org/assets/uploads/files/1777559246801-readmore.gif" alt="readmore.gif" class=" img-fluid img-markdown"></p>


<div class="row"><img class="img-thumbnail" src="https://community.nodebb.org/assets/uploads/files/1777559246801-readmore.gif" alt="Link Preview Image" /></div>]]></description><link>https://bbs.spacc.eu.org/new/post/https://community.nodebb.org/post/107079</link><guid isPermaLink="true">https://bbs.spacc.eu.org/new/post/https://community.nodebb.org/post/107079</guid><dc:creator><![CDATA[baris@community.nodebb.org]]></dc:creator><pubDate>Thu, 30 Apr 2026 14:27:43 GMT</pubDate></item><item><title><![CDATA[Reply to Use readmore.js for blockquotes on Wed, 29 Apr 2026 16:23:47 GMT]]></title><description><![CDATA[<p dir="auto"><a href="https://community.nodebb.org/user/downpw" target="_blank" rel="noopener noreferrer nofollow ugc">@downpw</a><br />
Where do I download the updated readmore.min.js file?</p>
]]></description><link>https://bbs.spacc.eu.org/new/post/https://community.nodebb.org/post/107075</link><guid isPermaLink="true">https://bbs.spacc.eu.org/new/post/https://community.nodebb.org/post/107075</guid><dc:creator><![CDATA[moshe@community.nodebb.org]]></dc:creator><pubDate>Wed, 29 Apr 2026 16:23:47 GMT</pubDate></item><item><title><![CDATA[Reply to Use readmore.js for blockquotes on Tue, 28 Apr 2026 10:41:40 GMT]]></title><description><![CDATA[<p dir="auto"><a href="https://community.nodebb.org/user/moshe" target="_blank" rel="noopener noreferrer nofollow ugc">@moshe</a></p>
<p dir="auto">Why don't use custom javascript in ACP ?</p>
]]></description><link>https://bbs.spacc.eu.org/new/post/https://community.nodebb.org/post/107069</link><guid isPermaLink="true">https://bbs.spacc.eu.org/new/post/https://community.nodebb.org/post/107069</guid><dc:creator><![CDATA[downpw@community.nodebb.org]]></dc:creator><pubDate>Tue, 28 Apr 2026 10:41:40 GMT</pubDate></item><item><title><![CDATA[Reply to Use readmore.js for blockquotes on Tue, 28 Apr 2026 08:14:02 GMT]]></title><description><![CDATA[<p dir="auto"><a href="https://community.nodebb.org/user/baris" target="_blank" rel="noopener noreferrer nofollow ugc">@baris</a> I would appreciate a more detailed explanation!<br />
I guess I didn't understand the whole thread.<br />
Is there a way to add a read more button to very long quotes?<br />
If so, what is the whole process you had to do?</p>
]]></description><link>https://bbs.spacc.eu.org/new/post/https://community.nodebb.org/post/107067</link><guid isPermaLink="true">https://bbs.spacc.eu.org/new/post/https://community.nodebb.org/post/107067</guid><dc:creator><![CDATA[moshe@community.nodebb.org]]></dc:creator><pubDate>Tue, 28 Apr 2026 08:14:02 GMT</pubDate></item><item><title><![CDATA[Reply to Use readmore.js for blockquotes on Mon, 27 Apr 2026 21:04:57 GMT]]></title><description><![CDATA[<p dir="auto">Core no longer uses requirejs so that syntax will no longer work. If you put the readmore.min.js file in <code>public/uploads</code> then you can load it and use it with $.getScript().</p>
<pre><code>$.getScript('/assets/uploads/readmore.min.js', function () {
  $('&lt;div&gt;').readmore();
})
```&lt;/div&gt;</code></pre>
]]></description><link>https://bbs.spacc.eu.org/new/post/https://community.nodebb.org/post/107063</link><guid isPermaLink="true">https://bbs.spacc.eu.org/new/post/https://community.nodebb.org/post/107063</guid><dc:creator><![CDATA[baris@community.nodebb.org]]></dc:creator><pubDate>Mon, 27 Apr 2026 21:04:57 GMT</pubDate></item><item><title><![CDATA[Reply to Use readmore.js for blockquotes on Mon, 27 Apr 2026 20:47:27 GMT]]></title><description><![CDATA[<p dir="auto"><a href="https://community.nodebb.org/user/baris" target="_blank" rel="noopener noreferrer nofollow ugc">@baris</a><br />
It looks like this was fixed as part of NODEBB, but was removed in recent versions.</p>
]]></description><link>https://bbs.spacc.eu.org/new/post/https://community.nodebb.org/post/107062</link><guid isPermaLink="true">https://bbs.spacc.eu.org/new/post/https://community.nodebb.org/post/107062</guid><dc:creator><![CDATA[moshe@community.nodebb.org]]></dc:creator><pubDate>Mon, 27 Apr 2026 20:47:27 GMT</pubDate></item><item><title><![CDATA[Reply to Use readmore.js for blockquotes on Mon, 27 Apr 2026 20:33:56 GMT]]></title><description><![CDATA[<p dir="auto">Is there a solution to this issue today?<br />
Does this come as part of the options nodebb?</p>
]]></description><link>https://bbs.spacc.eu.org/new/post/https://community.nodebb.org/post/107061</link><guid isPermaLink="true">https://bbs.spacc.eu.org/new/post/https://community.nodebb.org/post/107061</guid><dc:creator><![CDATA[moshe@community.nodebb.org]]></dc:creator><pubDate>Mon, 27 Apr 2026 20:33:56 GMT</pubDate></item><item><title><![CDATA[Reply to Use readmore.js for blockquotes on Tue, 25 May 2021 20:14:40 GMT]]></title><description><![CDATA[<p dir="auto">Did you try with this?</p>
<pre><code>function onLoad() {
    require(['/assets/uploads/readmore.min.js'], function () {
       console.log('yeah it works');
       console.log($('blockquote'));
       $('blockquote').readmore();
    });
}

$(document).ready(onLoad);
$(window).on('action:ajaxify.end', onLoad);
</code></pre>
]]></description><link>https://bbs.spacc.eu.org/new/post/https://community.nodebb.org/post/83420</link><guid isPermaLink="true">https://bbs.spacc.eu.org/new/post/https://community.nodebb.org/post/83420</guid><dc:creator><![CDATA[baris@community.nodebb.org]]></dc:creator><pubDate>Tue, 25 May 2021 20:14:40 GMT</pubDate></item><item><title><![CDATA[Reply to Use readmore.js for blockquotes on Tue, 25 May 2021 19:13:25 GMT]]></title><description><![CDATA[<p dir="auto"><a href="https://community.nodebb.org/user/klockprat" target="_blank" rel="noopener noreferrer nofollow ugc">@klockprat</a> I will look inte customizing the template file to achieve this instead</p>
]]></description><link>https://bbs.spacc.eu.org/new/post/https://community.nodebb.org/post/83418</link><guid isPermaLink="true">https://bbs.spacc.eu.org/new/post/https://community.nodebb.org/post/83418</guid><dc:creator><![CDATA[klockprat@community.nodebb.org]]></dc:creator><pubDate>Tue, 25 May 2021 19:13:25 GMT</pubDate></item></channel></rss>