Implemented new Editor Option: CodeMirror. (Vim mode not 100% done yet)

This commit is contained in:
danielyxie
2019-01-27 14:08:45 -08:00
parent a2237d4319
commit 8d2c007bcb
39 changed files with 69645 additions and 9328 deletions

View File

@@ -12,10 +12,13 @@ interface ICreateElementAnchorOptions {
*/
interface ICreateElementInputOptions {
checked?: boolean;
max?: string;
maxLength?: number;
min?: string;
name?: string;
pattern?: string;
placeholder?: string;
step?: string;
type?: string;
value?: string;
}
@@ -130,6 +133,15 @@ function setElementInput(el: HTMLInputElement, params: ICreateElementInputOption
if (params.placeholder !== undefined) {
el.placeholder = params.placeholder;
}
if (params.max !== undefined) {
el.max = params.max;
}
if (params.min !== undefined) {
el.min = params.min;
}
if (params.step !== undefined) {
el.step = params.step;
}
}
function setElementLabel(el: HTMLLabelElement, params: ICreateElementLabelOptions) {