Files
mixtape/zero.Backoffice.UI/app/editor/_wip/editorFieldProxy.ts
T

18 lines
552 B
TypeScript
Raw Normal View History

2021-12-09 00:01:30 +01:00
import { EditorField } from "zero/editor";
export const fieldTypes: Record<string, any> = {};
export const proxy = new Proxy(fieldTypes, {
get(target, handler)
{
console.info({ target, handler });
return target[handler];
}
}) as EditorField;
2021-12-09 10:51:10 +01:00
//fieldTypes.number = (maxLength?: number, placeholder?: string | Function) => console.log(`number() called with maxLength: ${maxLength}, placeholder: ${placeholder}`);
//proxy.number({ maxLength: 17, placeholder: 'Enter your number...' });
2021-12-09 00:01:30 +01:00
//var field = editor.field('name').text("hallo");