2021-12-21 14:41:50 +01:00
|
|
|
|
|
|
|
|
import { ZeroEditor } from '../../../editor/editor';
|
|
|
|
|
|
2021-12-22 10:55:40 +01:00
|
|
|
const editor = new ZeroEditor('translations');
|
2021-12-21 14:41:50 +01:00
|
|
|
|
|
|
|
|
editor.resourcePrefix = '@translation.fields.';
|
|
|
|
|
|
|
|
|
|
|
2022-01-03 15:28:12 +01:00
|
|
|
editor.field('key').text({ maxLength: 300 });
|
|
|
|
|
editor.field('display').state({
|
2021-12-21 14:41:50 +01:00
|
|
|
items: [
|
2022-01-03 15:28:12 +01:00
|
|
|
{ label: '@translation.display.text', value: 'text' },
|
|
|
|
|
{ label: '@translation.display.html', value: 'html' }
|
2021-12-21 14:41:50 +01:00
|
|
|
]
|
|
|
|
|
});
|
|
|
|
|
|
2022-01-03 15:28:12 +01:00
|
|
|
editor.field('value').setHidden(x => x.display === 'text').rte();
|
|
|
|
|
editor.field('value').setHidden(x => x.display === 'html').textarea();
|
2021-12-21 14:41:50 +01:00
|
|
|
|
|
|
|
|
export default editor;
|