Module: CKEditor5::Rails::Assets::WebComponentBundle

Defined in:
lib/ckeditor5/rails/assets/webcomponent_bundle.rb

Constant Summary collapse

WEBCOMPONENTS_PATH =
File.join(__dir__, 'webcomponents')
WEBCOMPONENTS_MODULES =
[
  'utils.mjs',
  'components/editable.mjs',
  'components/ui-part.mjs',
  'components/editor.mjs',
  'components/context.mjs'
].freeze

Class Method Summary collapse

Class Method Details

.sourceObject



16
17
18
19
20
# File 'lib/ckeditor5/rails/assets/webcomponent_bundle.rb', line 16

def source
  @source ||= WEBCOMPONENTS_MODULES.map do |file|
    File.read(File.join(WEBCOMPONENTS_PATH, file))
  end.join("\n").html_safe
end