Files
mixtape/zero.Backoffice.UI/app/modules/translations/schemas/editor.ts
T
2022-01-03 15:28:12 +01:00

20 lines
531 B
TypeScript

import { ZeroEditor } from '../../../editor/editor';
const editor = new ZeroEditor('translations');
editor.resourcePrefix = '@translation.fields.';
editor.field('key').text({ maxLength: 300 });
editor.field('display').state({
items: [
{ label: '@translation.display.text', value: 'text' },
{ label: '@translation.display.html', value: 'html' }
]
});
editor.field('value').setHidden(x => x.display === 'text').rte();
editor.field('value').setHidden(x => x.display === 'html').textarea();
export default editor;