bbcode-converter-pipe
v2.0.0
Published
Convert plain bb code to html code with pipe
Downloads
12
Maintainers
Readme
BBcode converter angular 2+ pipe
Convert plain bb code to html code with pipe based on Js body parser.
Installation
- Use npm to install the package
npm i bbcode-converter-pipe --save
or
yarn add bbcode-converter-pipe
- You need also add into your module
declarations
theBbcodeConverterPipe
in order to add all of the pipes.
import {BbcodeConverterPipe} from 'bbcode-converter-pipe';
@NgModule({
// ...
declarations: [
// ...
BbcodeConverterPipe
]
})
Usage
export class AppComponent {
text = 'I would like to [b]emphasize[/b] this';
}
<span [innerHTML]="text | bbcode"></span>
<!-- Output: <span>I would like to <strong>emphasize</strong> this</span> -->
Contributing
- Before adding any new feature or a fix make sure to open an issue first!
Make sure you have angular-cli
& karma
installed globally.
npm install -g angular-cli karma
Clone the project, and install dependencies.
git clone https://github.com/call-me-adas/angular-converter-bbcode-pipe.git
npm install
Create a new branch
git checkout -b feat/someFeature
Add tests & make sure everything is running properly
npm test
Commit & push, and make a pull request!
Further help
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.