You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I could find neither in the documentation nor in the Avo Demo nor in the test suite how to hook up a resource with Action Text has_rich_text attributes.
Expected behavior
the documentation explains how to configure an Avo resource field to show and edit Action Text rich text as defined by the presence of has_rich_text in the Rails model
when the model contains has_rich_text :body (*), rails g avo:resource generates an Avo field of the correct type and with the correct parameters (currently it generates field :body, as: :text). NB: The closest existing field name is :trix but the field name :rich_text would make more sense in my view (this field is about more than just the front-end editor, and using another name than trix also opens the door to other editors such as prosemirror, tiptap, rhino).
the Avo field works without the presence of an attachment_key parameter and without the presence of has_many_attached on the Rails model
the demo has a model with has_rich_text, with support for rich text editing and embeds of images and other media types; the corresponding Avo resource has a corresponding field defined, allowing to view and edit the rich text, without needing an attachment_key parameter
the demo DB has an action_text_rich_texts table and other files generated by action_text:install, e.g. app/views/active_storage/blobs/_blob.html.erb
the test suite tests that Avo fields are created appropriately for models with has_rich_text
The documentation and demo do make use of a trix Avo field (example), but only hooked up into regular :text ActiveRecord attributes, not Action Text (example).
The Avo Demo DB schema does not contain an action_text_rich_texts table nor other Action Text config files. It looks like rails action_text:install was not run.
Impact
High impact (It makes my app un-usable.)
Medium impact (I'm annoyed, but I'll live.)
Low impact (It's really a tiny thing that I could live with.)
Urgency
High urgency (I can't continue development without it.)
Medium urgency (I found a workaround, but I'd love to have it fixed.)
Low urgency (It can wait. I just wanted you to know about it.)
Our current workaround is to suspend our Avo migration and continuing to rely on Administrate, due to some outstanding questions with the Avo Trix field, primarily related to the management of embeds. We also tried to check the situation with the latest main commit but encountered issues. Clearer documentation/demo on the subject would be helpful.
(*) or other equivalent definitions, such as translates :body, backend: :action_text in the case of this gem I wrote. In all cases the rich text is available as record.body or record.rich_text_body and returns an object of type ActionText::RichText.
The text was updated successfully, but these errors were encountered:
sedubois
changed the title
No documentation/demo for Action Text has_rich_text
No documentation/demo/testing for Action Text has_rich_text
May 7, 2024
Describe the bug
I could find neither in the documentation nor in the Avo Demo nor in the test suite how to hook up a resource with Action Text
has_rich_text
attributes.Expected behavior
has_rich_text
in the Rails modelhas_rich_text :body
(*),rails g avo:resource
generates an Avo field of the correct type and with the correct parameters (currently it generatesfield :body, as: :text
). NB: The closest existing field name is:trix
but the field name:rich_text
would make more sense in my view (this field is about more than just the front-end editor, and using another name thantrix
also opens the door to other editors such as prosemirror, tiptap, rhino).attachment_key
parameter and without the presence ofhas_many_attached
on the Rails modelhas_rich_text
, with support for rich text editing and embeds of images and other media types; the corresponding Avo resource has a corresponding field defined, allowing to view and edit the rich text, without needing anattachment_key
parameteraction_text_rich_texts
table and other files generated byaction_text:install
, e.g.app/views/active_storage/blobs/_blob.html.erb
has_rich_text
Models and resource files
Additional context
The documentation and demo do make use of a
trix
Avo field (example), but only hooked up into regular:text
ActiveRecord attributes, not Action Text (example).The Avo Demo DB schema does not contain an
action_text_rich_texts
table nor other Action Text config files. It looks likerails action_text:install
was not run.Impact
Urgency
Our current workaround is to suspend our Avo migration and continuing to rely on Administrate, due to some outstanding questions with the Avo Trix field, primarily related to the management of embeds. We also tried to check the situation with the latest main commit but encountered issues. Clearer documentation/demo on the subject would be helpful.
(*) or other equivalent definitions, such as
translates :body, backend: :action_text
in the case of this gem I wrote. In all cases the rich text is available asrecord.body
orrecord.rich_text_body
and returns an object of typeActionText::RichText
.The text was updated successfully, but these errors were encountered: