Organization and minor fix

Added a module to organize the interfaces.

Fix a problem with an optional parameter. Previously was marked as
required.
This commit is contained in:
patrick-mackay
2015-12-17 20:36:32 -03:00
parent a78ed230cd
commit 7ca98f4432
2 changed files with 15 additions and 9 deletions

View File

@@ -2,7 +2,7 @@
//import ngWYSIWYG = require("ngWYSIWYG");
var options: ngWYSIWYGConfig = {
var complete: ngWYSIWYG.Config = {
sanitize: false,
toolbar: [
{ name: "basicStyling", items: ["bold", "italic", "underline", "strikethrough", "subscript", "superscript", "-", "leftAlign", "centerAlign", "rightAlign", "blockJustify", "-"] },
@@ -14,3 +14,7 @@ var options: ngWYSIWYGConfig = {
{ name: "styling", items: ["font", "size", "format"] },
]
};
var partial: ngWYSIWYG.Config = {
sanitize: false
};

View File

@@ -3,12 +3,14 @@
// Definitions by: Patrick Mac Kay <https://github.com/patrick-mackay>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
interface ngWYSIWYGToolbar {
name: string;
items: string[];
}
declare module ngWYSIWYG {
export interface Toolbar {
name: string;
items: string[];
}
interface ngWYSIWYGConfig {
sanitize: boolean;
toolbar: ngWYSIWYGToolbar[]
}
export interface Config {
sanitize: boolean;
toolbar?: Toolbar[];
}
}