Nevertheless Published Mine
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    scribe-plugin-sanitizerpublic

    scribe-plugin-sanitizer

    Installation

    bower install scribe-plugin-sanitizer
    

    Usage Example

    scribe-plugin-sanitizer is an AMD module:

    require(['scribe', 'scribe-plugin-sanitizer'], function (Scribe, scribePluginSanitizer) {
      var scribeElement = document.querySelector('.scribe');
      var scribe = new Scribe(scribeElement);
      scribe.use(scribePluginSanitizer({
        tags: {
          p: true,
          a: {
            href: true,
            target: '_blank'
          }
        }
      }));
    });

    It uses the same format of options as html-janitor. To whitelist a tag, specify true for it. To whitelist specific attributes or even specific values, use an object.

    Keywords

    none

    install

    npm i scribe-plugin-sanitizer

    Downloadsweekly downloads

    534

    version

    0.1.10

    license

    none

    repository

    githubgithub

    last publish

    collaborators

    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar