richtext.ts 881 B

1234567891011121314151617181920212223242526272829
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. import type { FieldResolverModule } from '#shared/entities/object-attributes/types/resolver.ts'
  3. import FieldResolver from '../FieldResolver.ts'
  4. export class FieldResolverRichtext extends FieldResolver {
  5. fieldType = 'editor'
  6. // TODO:
  7. // def field_for_oa_type_richtext(context:, attribute:)
  8. // FormSchema::Field::Editor.new(
  9. // **base_attributes(context: context, attribute: attribute),
  10. // // TODO: the OA has a maxlength attribute, but Field::Editor does not support that yet.
  11. // // maxlength: attribute[:data_option]['maxlength']
  12. // )
  13. // end
  14. // eslint-disable-next-line class-methods-use-this
  15. public fieldTypeAttributes() {
  16. return {
  17. props: {},
  18. }
  19. }
  20. }
  21. export default <FieldResolverModule>{
  22. type: 'richtext',
  23. resolver: FieldResolverRichtext,
  24. }