class
ActionText::RichText
- ActionText::RichText
- Marten::DB::Model
- Reference
- Object
Overview
https://martenframework.com/docs/models-and-databases/introduction#timestamps
Defined in:
action_text/rich_text.crConstant Summary
-
ATTACHMENT_ATTRIBUTES =
["content-type", "href", "filename", "filesize", "width", "height", "previewable", "presentation", "caption", "content"] of ::String -
FIELDS_ =
{"created_at" => {type: "date_time", kwargs: {auto_now_add: true}}, "updated_at" => {type: "date_time", kwargs: {auto_now: true}}, "id" => {type: "big_int", kwargs: {primary_key: true, auto: true}}, "name" => {type: "string", kwargs: {max_size: 255}}, "body" => {type: "text", kwargs: ::NamedTuple.new}, "record_type" => {type: "string", kwargs: {max_size: 255}}, "record_id" => {type: "big_int", kwargs: ::NamedTuple.new}} of Nil => Nil -
Ported from Rails ActionText::RichText: https://github.com/rails/rails/blob/main/actiontext/app/models/action_text/rich_text.rb
In Rails + Trix, the attachment SGID is generated server-side after upload (when Rails has an attachable record, usually ActiveStorage::Blob) and then injected into the action-text-attachment payload saved in RichText body.
Example Rails metadata payload observed for uploaded rich text attachments: {"_rails":{"data":"gid://drar/ActiveStorage::Blob/13?expires_in","pur":"attachable"}}
https://www.rubydoc.info/docs/rails/ActionText/Attachable https://guides.rubyonrails.org/action_text_overview.html
Class Method Summary
Instance Method Summary
- #attachments
- #blobs
- #body : String | Nil | Nil
- #body!
- #body=(body : String | Nil | Nil)
- #body?
- #build_xml_image(parent, url : String)
- #created_at : Time | Nil | Nil
- #created_at!
- #created_at=(created_at : Time | Nil | Nil)
- #created_at?
- #id : Int32 | Int64 | Nil | Nil
- #id!
- #id=(id : Int32 | Int64 | Nil | Nil)
- #id?
- #name : String | Nil | Nil
- #name!
- #name=(name : String | Nil | Nil)
- #name?
- #record_id : Int32 | Int64 | Nil | Nil
- #record_id!
- #record_id=(record_id : Int32 | Int64 | Nil | Nil)
- #record_id?
- #record_type : String | Nil | Nil
- #record_type!
- #record_type=(record_type : String | Nil | Nil)
- #record_type?
- #to_html
- #to_plain_text
- #updated_at : Time | Nil | Nil
- #updated_at!
- #updated_at=(updated_at : Time | Nil | Nil)
- #updated_at?