# postxml-custom-tags

> Postxml plugin anable using custom tags in html. It replace them with div elements.

Latest version **0.1.1** (published 2015-09-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install postxml-custom-tags
pnpm add postxml-custom-tags
yarn add postxml-custom-tags
bun add postxml-custom-tags
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2015-09-04 |
| First published | 2015-08-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | alanev |
| Maintainers | alanev |
| Keywords | html, plugin, postxml, transform |

## Links

- npm: https://www.npmjs.com/package/postxml-custom-tags
- Repository: https://github.com/postxml/postxml-custom-tags
- Homepage: https://github.com/postxml/postxml-custom-tags#readme
- Issues: https://github.com/postxml/postxml-custom-tags/issues
- npm.io page: https://npm.io/package/postxml-custom-tags

## Dependencies (1)

- [postxml](https://npm.io/package/postxml.md) ^0.0.5

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 0.1.1 (latest) — 2015-09-04
- 0.1.0 — 2015-08-31

## README

# postxml-custom-tags
[![npm version][npm-image]][npm-url]

> [PostXML] plugin anable using custom tags in html. It replace them with div elements.

## Installation
`npm i postxml-custom-tags --save-dev`

## Usage
```js
var fs = require(fs),
   postxml = require(postxml),
   plugin = require(postxml-custom-tags);

var html = fs.readFileSync(input.html, utf8);

var output = postxml(
      html,
      [
         plugin()
      ]
   );
```

## Example

### Input
```html
<custom class="b-block" ng-click="init = 2">Text</custom>
```

### Output
```html
<div class="b-block" ng-click="init = 2">Text</div>
```

## options

#### src
Type: `string`<br>
Default: undefined<br>
Description: set tag for replacement of tags with "src" (except `audio, frame, iframe, img, input, layer, script, textarea, video`)<br>
Example:
```js
var fs = require(fs),
   postxml = require(postxml),
   plugin = require(postxml-custom-tags);

var html = fs.readFileSync(input.html, utf8);

var output = postxml(
      html,
      [
         plugin({
             src: 'img'
         })
      ]
   );
```
```html
/*Input*/
<image src="image.png"></image>

/*Output*/
<img src="image.png">
```

#### href
Type: `string`<br>
Default: undefined<br>
Description: set tag for replacement of tags with "href" (except `a, area, base, link`)<br>
Example:
```js
var fs = require(fs),
   postxml = require(postxml),
   plugin = require(postxml-custom-tags);

var html = fs.readFileSync(input.html, utf8);

var output = postxml(
      html,
      [
         plugin({
             href: 'a'
         })
      ]
   );
```
```html
/*Input*/
<div href="#"></div>

/*Output*/
<a href="#"></a>
```


## Licence
MIT

[PostXML]: https://github.com/postxml/postxml

[npm-url]: https://www.npmjs.org/package/postxml-custom-tags
[npm-image]: http://img.shields.io/npm/v/postxml-custom-tags.svg?style=flat-square

---
_Source: https://npm.io/package/postxml-custom-tags · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
