Sha256: a284eb7b6b519877408824e33f8ed4715468bd0138c5a0545e4c8aed9b7ed84a
Contents?: true
Size: 781 Bytes
Versions: 9
Compression:
Stored size: 781 Bytes
Contents
# frozen_string_literal: true require_relative 'props_base_plugin' module CKEditor5::Rails::Editor class PropsPlugin < PropsBasePlugin def initialize(name, premium: false, **js_import_meta_attrs) super(name) js_import_meta_attrs[:import_name] ||= if premium 'ckeditor5-premium-features' else 'ckeditor5' end @js_import_meta = ::CKEditor5::Rails::Assets::JSImportMeta.new( import_as: js_import_meta_attrs[:window_name] ? nil : name, **js_import_meta_attrs ) end def to_h @js_import_meta.to_h.merge(type: :external) end end end
Version data entries
9 entries across 9 versions & 1 rubygems