New definition for ngWYSIWYG

Interface definitions for an AngularJS wysiwyg component, developed by
https://github.com/psergus.

I'm not sure what kind of tests can be created for interface
definitions. Let me know if more is needed.
This commit is contained in:
patrick-mackay
2015-12-17 20:04:14 -03:00
parent 78ba6e4154
commit a78ed230cd
2 changed files with 30 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
/// <reference path="ngwysiwyg.d.ts" />
//import ngWYSIWYG = require("ngWYSIWYG");
var options: ngWYSIWYGConfig = {
sanitize: false,
toolbar: [
{ name: "basicStyling", items: ["bold", "italic", "underline", "strikethrough", "subscript", "superscript", "-", "leftAlign", "centerAlign", "rightAlign", "blockJustify", "-"] },
{ name: "paragraph", items: ["orderedList", "unorderedList", "outdent", "indent", "-"] },
{ name: "doers", items: ["removeFormatting", "undo", "redo", "-"] },
{ name: "colors", items: ["fontColor", "backgroundColor", "-"] },
{ name: "links", items: ["image", "hr", "symbols", "link", "unlink", "-"] },
{ name: "tools", items: ["print", "-"] },
{ name: "styling", items: ["font", "size", "format"] },
]
};
+14
View File
@@ -0,0 +1,14 @@
// Type definitions for Marked
// Project: https://github.com/psergus/ngWYSIWYG
// Definitions by: Patrick Mac Kay <https://github.com/patrick-mackay>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
interface ngWYSIWYGToolbar {
name: string;
items: string[];
}
interface ngWYSIWYGConfig {
sanitize: boolean;
toolbar: ngWYSIWYGToolbar[]
}