Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Forum: Hacks
    In reply to: Limit Word Count
    nbernhard

    (@nbernhard)

    For starters, this function would return the string without the HTML tags:

    jQuery.fn.stripTags = function () {
        return this.replaceWith(this.html().replace(/<\/?[^>]+>/gi, ''));
    };
    Forum: Hacks
    In reply to: Limit Word Count
    nbernhard

    (@nbernhard)

    Could you use jQuery or something similar to disable the ‘publish’ button until the word count is acceptable?

    You would still need a fallback for those who do not use Javascript, but this may be a good solution to start with.

Viewing 2 replies - 1 through 2 (of 2 total)