0.0.19 • Published 5 years ago

@eriice/pretty-code v0.0.19

Weekly downloads
3
License
-
Repository
-
Last release
5 years ago

Pretty-code

This module is an effort to implement highlight code block in Angular project.

This module is seperated from the Angular.io. I follow the source code in custom-elements/code part and packaged secondary.

License

This software is provided free of charge and without restriction under the MIT License

Demo

example

Installation

Please make sure the follow packages have been introduced in your project cause this module is based on Angular-Material.

@angular/cdk
@angular/material
@angular/animations

This package is installable through NPM.

$ npm install @eriice/pretty-code --save

Usage

Example module

import { PrettyCodeModule } from "@eriice/pretty-code";

@NgModule({
  imports: [
    ...
    PrettyCodeModule
  ]
})

Example Template

// single code block
<app-code-example [config]="config"></app-code-example>

// multiple code block
<app-code-tabs [config]="config"></app-code-tabs>

Input property

PropertyTypeDefaultDescription
configConfignullUsed to configure code block display including language of code, header, linenum and the code block.
interface Config {
  code: string| null;
  language: string| null;
  linenums: boolean| number| string;
  header: string| null;
}
0.0.19

5 years ago

0.0.17

5 years ago

0.0.15

5 years ago

0.0.14

5 years ago

0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago