")
+
+rich_text = ActionText::RichText.new
+rich_text.name.to_sym
+rich_text.body&.to_html
+rich_text.embeds.attached?
+rich_text.updated_at.to_date
+rich_text.to_s.size
+rich_text.to_plain_text.size
+rich_text.to_trix_html&.size
+if (content = rich_text.body)
+ content.links.first&.size
+ content.attachments.first&.to_html
+ content.gallery_attachments.size
+ content.to_plain_text.size
+ content.to_trix_html.size
+ content.to_html.size
+ content.to_s.size
+end
diff --git a/gems/actiontext/8.1/_test/test.rbs b/gems/actiontext/8.1/_test/test.rbs
new file mode 100644
index 000000000..ca4d100de
--- /dev/null
+++ b/gems/actiontext/8.1/_test/test.rbs
@@ -0,0 +1,5 @@
+class Article < ActiveRecord::Base
+end
+
+class Comment < ActiveRecord::Base
+end
diff --git a/gems/actiontext/8.1/actiontext-generated.rbs b/gems/actiontext/8.1/actiontext-generated.rbs
new file mode 100644
index 000000000..c8453da30
--- /dev/null
+++ b/gems/actiontext/8.1/actiontext-generated.rbs
@@ -0,0 +1,1018 @@
+# The generated code is based on Ruby on Rails source code
+# You can find the license of Ruby on Rails from following.
+
+#MIT License
+#
+#Copyright (c) 37signals LLC
+#
+#Permission is hereby granted, free of charge, to any person obtaining a copy
+#of this software and associated documentation files (the "Software"), to deal
+#in the Software without restriction, including without limitation the rights
+#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+#copies of the Software, and to permit persons to whom the Software is
+#furnished to do so, subject to the following conditions:
+#
+#The above copyright notice and this permission notice shall be included in all
+#copies or substantial portions of the Software.
+#
+#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+#SOFTWARE.
+
+module ActionText
+ module ContentHelper
+ def self.sanitizer: () -> untyped
+
+ def self.sanitizer=: (untyped value) -> untyped
+
+ def sanitizer: () -> untyped
+
+ def sanitizer=: (untyped value) -> untyped
+
+ def self.allowed_tags: () -> untyped
+
+ def self.allowed_tags=: (untyped value) -> untyped
+
+ def allowed_tags: () -> untyped
+
+ def allowed_tags=: (untyped value) -> untyped
+
+ def self.allowed_attributes: () -> untyped
+
+ def self.allowed_attributes=: (untyped value) -> untyped
+
+ def allowed_attributes: () -> untyped
+
+ def allowed_attributes=: (untyped value) -> untyped
+
+ def self.scrubber: () -> untyped
+
+ def self.scrubber=: (untyped value) -> untyped
+
+ def scrubber: () -> untyped
+
+ def scrubber=: (untyped value) -> untyped
+
+ def render_action_text_content: (untyped content) -> untyped
+
+ def sanitize_content_attachment: (untyped content_attachment) -> untyped
+
+ def sanitize_action_text_content: (untyped content) -> untyped
+
+ def render_action_text_attachments: (untyped content) -> untyped
+
+ def render_action_text_attachment: (untyped attachment, ?locals: ::Hash[untyped, untyped]) -> untyped
+
+ def sanitizer_allowed_tags: () -> untyped
+
+ def sanitizer_allowed_attributes: () -> untyped
+ end
+end
+
+module ActionText
+ module TagHelper
+ def self.id: () -> untyped
+
+ def self.id=: (untyped value) -> untyped
+
+ # Returns a `trix-editor` tag that instantiates the Trix JavaScript editor as
+ # well as a hidden field that Trix will write to on changes, so the content will
+ # be sent on form submissions.
+ #
+ # #### Options
+ # * `:class` - Defaults to "trix-content" so that default styles will be
+ # applied. Setting this to a different value will prevent default styles
+ # from being applied.
+ # * `[:data][:direct_upload_url]` - Defaults to `rails_direct_uploads_url`.
+ # * `[:data][:blob_url_template]` - Defaults to
+ # `rails_service_blob_url(":signed_id", ":filename")`.
+ #
+ #
+ # #### Example
+ #
+ # rich_textarea_tag "content", message.content
+ # #
+ # #
+ #
+ # rich_textarea_tag "content", nil do
+ # "
Default content
"
+ # end
+ # #
+ # #
+ def rich_textarea_tag: (untyped name, ?untyped? value, ?::Hash[untyped, untyped] options) ?{ (?) -> untyped } -> untyped
+
+ alias rich_text_area_tag rich_textarea_tag
+ end
+end
+
+module ActionView::Helpers
+ class Tags::ActionText < ::ActionView::Helpers::Tags::Base
+ def dom_id: (*untyped, **untyped) ?{ (*untyped) -> untyped } -> untyped
+
+ include ::ActionView::Helpers::Tags::Placeholderable
+
+ def render: () ?{ (?) -> untyped } -> untyped
+ end
+
+ module FormHelper
+ # Returns a `trix-editor` tag that instantiates the Trix JavaScript editor as
+ # well as a hidden field that Trix will write to on changes, so the content will
+ # be sent on form submissions.
+ #
+ # #### Options
+ # * `:class` - Defaults to "trix-content" which ensures default styling is
+ # applied.
+ # * `:value` - Adds a default value to the HTML input tag.
+ # * `[:data][:direct_upload_url]` - Defaults to `rails_direct_uploads_url`.
+ # * `[:data][:blob_url_template]` - Defaults to
+ # `rails_service_blob_url(":signed_id", ":filename")`.
+ #
+ #
+ # #### Example
+ # rich_textarea :message, :content
+ # #
+ # #
+ #
+ # rich_textarea :message, :content, value: "
"
+ # end
+ # #
+ # #
+ def rich_textarea: (untyped object_name, untyped method, ?::Hash[untyped, untyped] options) ?{ (?) -> untyped } -> untyped
+
+ alias rich_text_area rich_textarea
+ end
+
+ class FormBuilder
+ # Wraps ActionView::Helpers::FormHelper#rich_textarea for form builders:
+ #
+ # <%= form_with model: @message do |f| %>
+ # <%= f.rich_textarea :content %>
+ # <% end %>
+ #
+ # Please refer to the documentation of the base helper for details.
+ def rich_textarea: (untyped method, ?::Hash[untyped, untyped] options) ?{ (?) -> untyped } -> untyped
+
+ alias rich_text_area rich_textarea
+ end
+end
+
+module ActionText
+ class EncryptedRichText < ::ActionText::RichText
+ end
+end
+
+module ActionText
+ class Record < ::ActiveRecord::Base
+ end
+end
+
+module ActionText
+ # # Action Text RichText
+ #
+ # The RichText record holds the content produced by the Trix editor in a
+ # serialized `body` attribute. It also holds all the references to the embedded
+ # files, which are stored using Active Storage. This record is then associated
+ # with the Active Record model the application desires to have rich text content
+ # using the `has_rich_text` class method.
+ #
+ # class Message < ActiveRecord::Base
+ # has_rich_text :content
+ # end
+ #
+ # message = Message.create!(content: "
"
+ # body.to_plain_text # => "Funny times!"
+ class Content
+ extend ::ActionText::Serialization::ClassMethods
+
+ extend ::ActionText::Rendering::ClassMethods
+
+ def deconstruct: (*untyped, **untyped) ?{ (*untyped) -> untyped } -> untyped
+ def blank?: (*untyped, **untyped) ?{ (*untyped) -> untyped } -> untyped
+ def empty?: (*untyped, **untyped) ?{ (*untyped) -> untyped } -> untyped
+ def html_safe: (*untyped, **untyped) ?{ (*untyped) -> untyped } -> untyped
+ def present?: (*untyped, **untyped) ?{ (*untyped) -> untyped } -> untyped
+
+ include ::ActionText::Rendering
+
+ include ::ActionText::Serialization
+
+ include ::ActionText::ContentHelper
+
+ attr_reader fragment: untyped
+
+ def self.fragment_by_canonicalizing_content: (untyped content) -> untyped
+
+ def initialize: (?untyped? content, ?::Hash[untyped, untyped] options) -> void
+
+ def attachment_galleries: () -> untyped
+
+ # Extracts ActionText::Attachable objects from the HTML fragment:
+ #
+ # attachable = ActiveStorage::Blob.first
+ # html = %Q()
+ # content = ActionText::Content.new(html)
+ # content.attachables # => [attachable]
+ def attachables: () -> untyped
+
+ def append_attachables: (untyped attachables) -> untyped
+
+ def render_attachments: (**untyped options) { (?) -> untyped } -> untyped
+
+ def render_attachment_galleries: () { (?) -> untyped } -> untyped
+
+ def to_rendered_html_with_layout: () -> untyped
+
+ def to_partial_path: () -> "action_text/contents/content"
+
+ def as_json: (*untyped) -> untyped
+
+ def inspect: () -> ::String
+
+ def ==: (untyped other) -> (untyped | nil)
+
+ private
+
+ def attachment_nodes: () -> untyped
+
+ def attachment_gallery_nodes: () -> untyped
+
+ def attachment_for_node: (untyped node, ?with_full_attributes: bool) -> untyped
+
+ def attachment_gallery_for_node: (untyped node) -> untyped
+ end
+end
+
+module ActionText
+ def self.deprecator: () -> untyped
+end
+
+module ActionText
+ module Encryption
+ def encrypt: () -> untyped
+
+ def decrypt: () -> untyped
+
+ private
+
+ def encrypt_rich_texts: () -> untyped
+
+ def decrypt_rich_texts: () -> untyped
+
+ def has_encrypted_rich_texts?: () -> untyped
+
+ def encryptable_rich_texts: () -> untyped
+ end
+end
+
+module ActionText
+ class Engine < ::Rails::Engine
+ end
+end
+
+module ActionText
+ # # Action Text FixtureSet
+ #
+ # Fixtures are a way of organizing data that you want to test against; in short,
+ # sample data.
+ #
+ # To learn more about fixtures, read the ActiveRecord::FixtureSet documentation.
+ #
+ # ### YAML
+ #
+ # Like other Active Record-backed models, ActionText::RichText records inherit
+ # from ActiveRecord::Base instances and can therefore be populated by fixtures.
+ #
+ # Consider an `Article` class:
+ #
+ # class Article < ApplicationRecord
+ # has_rich_text :content
+ # end
+ #
+ # To declare fixture data for the related `content`, first declare fixture data
+ # for `Article` instances in `test/fixtures/articles.yml`:
+ #
+ # first:
+ # title: An Article
+ #
+ # Then declare the ActionText::RichText fixture data in
+ # `test/fixtures/action_text/rich_texts.yml`, making sure to declare each
+ # entry's `record:` key as a polymorphic relationship:
+ #
+ # first:
+ # record: first (Article)
+ # name: content
+ # body:
Hello, world.
+ #
+ # When processed, Active Record will insert database records for each fixture
+ # entry and will ensure the Action Text relationship is intact.
+ class FixtureSet
+ # Fixtures support Action Text attachments as part of their `body` HTML.
+ #
+ # ### Examples
+ #
+ # For example, consider a second `Article` fixture declared in
+ # `test/fixtures/articles.yml`:
+ #
+ # second:
+ # title: Another Article
+ #
+ # You can attach a mention of `articles(:first)` to `second`'s `content` by
+ # embedding a call to `ActionText::FixtureSet.attachment` in the `body:` value
+ # in `test/fixtures/action_text/rich_texts.yml`:
+ #
+ # second:
+ # record: second (Article)
+ # name: content
+ # body: