├── spec
├── dummy
│ ├── lib
│ │ └── assets
│ │ │ └── .keep
│ ├── public
│ │ ├── favicon.ico
│ │ ├── apple-touch-icon.png
│ │ └── apple-touch-icon-precomposed.png
│ ├── app
│ │ ├── assets
│ │ │ ├── images
│ │ │ │ └── .keep
│ │ │ ├── config
│ │ │ │ └── manifest.js
│ │ │ ├── javascripts
│ │ │ │ └── active_admin.js
│ │ │ └── stylesheets
│ │ │ │ ├── active_admin.scss
│ │ │ │ └── application.css
│ │ ├── models
│ │ │ ├── concerns
│ │ │ │ └── .keep
│ │ │ ├── application_record.rb
│ │ │ ├── profile.rb
│ │ │ ├── tag.rb
│ │ │ ├── post_tag.rb
│ │ │ ├── author.rb
│ │ │ └── post.rb
│ │ ├── controllers
│ │ │ ├── concerns
│ │ │ │ └── .keep
│ │ │ └── application_controller.rb
│ │ ├── views
│ │ │ └── layouts
│ │ │ │ ├── mailer.text.erb
│ │ │ │ ├── mailer.html.erb
│ │ │ │ └── application.html.erb
│ │ ├── helpers
│ │ │ └── application_helper.rb
│ │ ├── admin
│ │ │ ├── tags.rb
│ │ │ ├── dashboard.rb
│ │ │ ├── posts.rb
│ │ │ └── authors.rb
│ │ ├── channels
│ │ │ └── application_cable
│ │ │ │ ├── channel.rb
│ │ │ │ └── connection.rb
│ │ ├── mailers
│ │ │ └── application_mailer.rb
│ │ ├── jobs
│ │ │ └── application_job.rb
│ │ └── javascript
│ │ │ └── packs
│ │ │ └── application.js
│ ├── .ruby-version
│ ├── bin
│ │ ├── rake
│ │ ├── rails
│ │ └── setup
│ ├── config
│ │ ├── routes.rb
│ │ ├── spring.rb
│ │ ├── environment.rb
│ │ ├── storage.yml
│ │ ├── initializers
│ │ │ ├── mime_types.rb
│ │ │ ├── filter_parameter_logging.rb
│ │ │ ├── application_controller_renderer.rb
│ │ │ ├── cookies_serializer.rb
│ │ │ ├── backtrace_silencers.rb
│ │ │ ├── assets.rb
│ │ │ ├── wrap_parameters.rb
│ │ │ ├── inflections.rb
│ │ │ └── content_security_policy.rb
│ │ ├── cable.yml
│ │ ├── boot.rb
│ │ ├── database.yml
│ │ ├── application.rb
│ │ └── locales
│ │ │ └── en.yml
│ ├── config.ru
│ ├── Rakefile
│ └── db
│ │ ├── migrate
│ │ ├── 20180607053255_create_tags.rb
│ │ ├── 20180607053251_create_authors.rb
│ │ ├── 20180607053254_create_profiles.rb
│ │ ├── 20180607053257_create_post_tags.rb
│ │ ├── 20180607053739_create_posts.rb
│ │ ├── 20180101010101_create_active_admin_comments.rb
│ │ └── 20170806125915_create_active_storage_tables.active_storage.rb
│ │ └── seeds.rb
├── page_objects
│ ├── admin
│ │ ├── posts
│ │ │ └── edit_page.rb
│ │ └── authors
│ │ │ └── edit_page.rb
│ ├── base_object.rb
│ ├── base_page.rb
│ └── shared
│ │ ├── html_editor.rb
│ │ └── trumbowyg_editor.rb
├── support
│ ├── string_clean_multiline.rb
│ └── capybara.rb
├── system
│ └── trumbowyg_js_spec.rb
├── spec_helper.rb
└── rails_helper.rb
├── .rspec
├── extra
├── .bashrc
├── screenshot.png
├── dev_setup.sh
├── .env
├── Dockerfile.dockerignore
├── docker-compose.yml
└── Dockerfile
├── lib
├── activeadmin
│ ├── trumbowyg.rb
│ └── trumbowyg
│ │ ├── version.rb
│ │ └── engine.rb
├── activeadmin_trumbowyg.rb
├── formtastic
│ └── inputs
│ │ └── trumbowyg_input.rb
└── tasks
│ └── trumbowyg.rake
├── .fasterer.yml
├── .reviewdog.yml
├── examples
└── upload_plugin_using_activestorage
│ └── app
│ ├── models
│ └── post.rb
│ ├── assets
│ ├── stylesheets
│ │ └── active_admin.scss
│ └── javascripts
│ │ └── active_admin.js
│ └── admin
│ └── posts.rb
├── .gitignore
├── yarn.lock
├── package.json
├── app
└── assets
│ ├── javascripts
│ └── activeadmin
│ │ ├── trumbowyg
│ │ ├── plugins
│ │ │ ├── highlight
│ │ │ │ └── ui
│ │ │ │ │ ├── trumbowyg.highlight.min.css
│ │ │ │ │ ├── sass
│ │ │ │ │ └── trumbowyg.highlight.scss
│ │ │ │ │ └── trumbowyg.highlight.css
│ │ │ ├── mention
│ │ │ │ ├── ui
│ │ │ │ │ ├── trumbowyg.mention.min.css
│ │ │ │ │ ├── sass
│ │ │ │ │ │ └── trumbowyg.mention.scss
│ │ │ │ │ └── trumbowyg.mention.css
│ │ │ │ └── trumbowyg.mention.min.js
│ │ │ ├── mathml
│ │ │ │ └── ui
│ │ │ │ │ ├── trumbowyg.mathml.min.css
│ │ │ │ │ ├── trumbowyg.mathml.css
│ │ │ │ │ └── sass
│ │ │ │ │ └── trumbowyg.mathml.scss
│ │ │ ├── emoji
│ │ │ │ └── ui
│ │ │ │ │ ├── trumbowyg.emoji.min.css
│ │ │ │ │ ├── trumbowyg.emoji.css
│ │ │ │ │ └── sass
│ │ │ │ │ └── trumbowyg.emoji.scss
│ │ │ ├── pasteimage
│ │ │ │ └── trumbowyg.pasteimage.min.js
│ │ │ ├── template
│ │ │ │ └── trumbowyg.template.min.js
│ │ │ ├── specialchars
│ │ │ │ ├── ui
│ │ │ │ │ ├── trumbowyg.specialchars.min.css
│ │ │ │ │ ├── trumbowyg.specialchars.css
│ │ │ │ │ └── sass
│ │ │ │ │ │ └── trumbowyg.specialchars.scss
│ │ │ │ └── trumbowyg.specialchars.min.js
│ │ │ ├── pasteembed
│ │ │ │ └── trumbowyg.pasteembed.min.js
│ │ │ ├── indent
│ │ │ │ └── trumbowyg.indent.min.js
│ │ │ ├── insertaudio
│ │ │ │ └── trumbowyg.insertaudio.min.js
│ │ │ └── colors
│ │ │ │ └── ui
│ │ │ │ └── trumbowyg.colors.min.css
│ │ └── langs
│ │ │ ├── zh_cn.min.js
│ │ │ ├── th.min.js
│ │ │ ├── he.min.js
│ │ │ ├── ja.min.js
│ │ │ ├── bg.min.js
│ │ │ ├── my.min.js
│ │ │ ├── sk.min.js
│ │ │ ├── ua.min.js
│ │ │ ├── ph.min.js
│ │ │ ├── rs.min.js
│ │ │ ├── zh_tw.min.js
│ │ │ ├── pl.min.js
│ │ │ ├── fa.min.js
│ │ │ ├── vi.min.js
│ │ │ ├── fi.min.js
│ │ │ ├── ko.min.js
│ │ │ ├── hr.min.js
│ │ │ ├── rs_latin.min.js
│ │ │ ├── lt.min.js
│ │ │ ├── es_ar.min.js
│ │ │ ├── mn.min.js
│ │ │ ├── bn.min.js
│ │ │ ├── sv.min.js
│ │ │ ├── by.min.js
│ │ │ ├── hu.min.js
│ │ │ ├── nl.min.js
│ │ │ ├── ru.min.js
│ │ │ ├── sq.min.js
│ │ │ ├── az.min.js
│ │ │ ├── id.min.js
│ │ │ ├── cs.min.js
│ │ │ ├── da.min.js
│ │ │ ├── it.min.js
│ │ │ ├── es.min.js
│ │ │ ├── ar.min.js
│ │ │ ├── sl.min.js
│ │ │ ├── et.min.js
│ │ │ ├── tr.min.js
│ │ │ ├── ro.min.js
│ │ │ ├── pt.min.js
│ │ │ ├── pt_br.min.js
│ │ │ ├── de.min.js
│ │ │ ├── el.min.js
│ │ │ ├── zh_cn.js
│ │ │ ├── fr.min.js
│ │ │ ├── nb.min.js
│ │ │ ├── th.js
│ │ │ ├── ca.min.js
│ │ │ ├── he.js
│ │ │ ├── bg.js
│ │ │ ├── my.js
│ │ │ ├── sk.js
│ │ │ ├── ua.js
│ │ │ ├── ja.js
│ │ │ ├── ph.js
│ │ │ ├── rs.js
│ │ │ ├── pl.js
│ │ │ ├── fa.js
│ │ │ ├── hr.js
│ │ │ ├── vi.js
│ │ │ ├── fi.js
│ │ │ ├── rs_latin.js
│ │ │ ├── es_ar.js
│ │ │ ├── zh_tw.js
│ │ │ ├── mn.js
│ │ │ ├── sv.js
│ │ │ ├── id.js
│ │ │ ├── ko.js
│ │ │ ├── lt.js
│ │ │ ├── hu.js
│ │ │ ├── bn.js
│ │ │ ├── by.js
│ │ │ ├── nl.js
│ │ │ ├── ro.js
│ │ │ ├── ru.js
│ │ │ ├── az.js
│ │ │ ├── it.js
│ │ │ ├── sl.js
│ │ │ ├── cs.js
│ │ │ ├── sq.js
│ │ │ ├── tr.js
│ │ │ ├── da.js
│ │ │ └── es.js
│ │ └── trumbowyg_input.js
│ └── stylesheets
│ └── activeadmin
│ └── _trumbowyg_input.scss
├── .rubocop.yml
├── bin
├── rails
├── rake
├── rspec
├── rubocop
└── fasterer
├── Rakefile
├── .github
├── FUNDING.yml
└── workflows
│ ├── linters.yml
│ ├── specs_rails70.yml
│ ├── specs_rails71.yml
│ ├── specs_rails72.yml
│ ├── specs_rails80.yml
│ └── specs_rails61.yml
├── LICENSE.txt
├── activeadmin_trumbowyg.gemspec
├── Makefile
├── CHANGELOG.md
└── Gemfile
/spec/dummy/lib/assets/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/spec/dummy/public/favicon.ico:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/spec/dummy/app/assets/images/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/spec/dummy/app/models/concerns/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/spec/dummy/public/apple-touch-icon.png:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/spec/dummy/.ruby-version:
--------------------------------------------------------------------------------
1 | ruby-2.7.1
2 |
--------------------------------------------------------------------------------
/spec/dummy/app/controllers/concerns/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/spec/dummy/public/apple-touch-icon-precomposed.png:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.rspec:
--------------------------------------------------------------------------------
1 | --require rails_helper
2 | --format documentation
3 |
--------------------------------------------------------------------------------
/spec/dummy/app/views/layouts/mailer.text.erb:
--------------------------------------------------------------------------------
1 | <%= yield %>
2 |
--------------------------------------------------------------------------------
/extra/.bashrc:
--------------------------------------------------------------------------------
1 | alias ls='ls --color'
2 | alias ll='ls -l'
3 | alias la='ls -la'
4 |
--------------------------------------------------------------------------------
/spec/dummy/app/helpers/application_helper.rb:
--------------------------------------------------------------------------------
1 | module ApplicationHelper
2 | end
3 |
--------------------------------------------------------------------------------
/extra/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/blocknotes/activeadmin_trumbowyg/HEAD/extra/screenshot.png
--------------------------------------------------------------------------------
/lib/activeadmin/trumbowyg.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require 'activeadmin/trumbowyg/engine'
4 |
--------------------------------------------------------------------------------
/spec/dummy/app/controllers/application_controller.rb:
--------------------------------------------------------------------------------
1 | class ApplicationController < ActionController::Base
2 | end
3 |
--------------------------------------------------------------------------------
/spec/dummy/bin/rake:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require_relative '../config/boot'
3 | require 'rake'
4 | Rake.application.run
5 |
--------------------------------------------------------------------------------
/extra/dev_setup.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | export DEVEL=1
4 |
5 | export RAILS_VERSION=7.2.2.1
6 | export ACTIVEADMIN_VERSION=3.3.0
7 |
--------------------------------------------------------------------------------
/spec/dummy/app/admin/tags.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | ActiveAdmin.register Tag do
4 | permit_params :name
5 | end
6 |
--------------------------------------------------------------------------------
/.fasterer.yml:
--------------------------------------------------------------------------------
1 | ---
2 | exclude_paths:
3 | - bin/*
4 | - db/schema.rb
5 | - gemfiles/**/*
6 | - spec/dummy/**/*
7 | - vendor/**/*
8 |
--------------------------------------------------------------------------------
/extra/.env:
--------------------------------------------------------------------------------
1 | COMPOSE_PROJECT_NAME=activeadmin_trumbowyg
2 |
3 | BUNDLER_VERSION=2.5.23
4 | SERVER_PORT=4000
5 |
6 | UID=1000
7 | GID=1000
8 |
--------------------------------------------------------------------------------
/spec/dummy/config/routes.rb:
--------------------------------------------------------------------------------
1 | Rails.application.routes.draw do
2 | ActiveAdmin.routes(self)
3 |
4 | root to: redirect('/admin')
5 | end
6 |
--------------------------------------------------------------------------------
/spec/dummy/app/channels/application_cable/channel.rb:
--------------------------------------------------------------------------------
1 | module ApplicationCable
2 | class Channel < ActionCable::Channel::Base
3 | end
4 | end
5 |
--------------------------------------------------------------------------------
/spec/dummy/config/spring.rb:
--------------------------------------------------------------------------------
1 | Spring.watch(
2 | ".ruby-version",
3 | ".rbenv-vars",
4 | "tmp/restart.txt",
5 | "tmp/caching-dev.txt"
6 | )
7 |
--------------------------------------------------------------------------------
/extra/Dockerfile.dockerignore:
--------------------------------------------------------------------------------
1 | # Ignore everything but the required files for bundle install
2 | /**/*
3 |
4 | !/*.gemspec
5 | !/Gemfile
6 | !/lib
7 |
--------------------------------------------------------------------------------
/lib/activeadmin_trumbowyg.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require 'activeadmin/trumbowyg'
4 | require 'formtastic/inputs/trumbowyg_input'
5 |
--------------------------------------------------------------------------------
/.reviewdog.yml:
--------------------------------------------------------------------------------
1 | ---
2 | runner:
3 | fasterer:
4 | cmd: bin/fasterer
5 | level: info
6 | rubocop:
7 | cmd: bin/rubocop
8 | level: info
9 |
--------------------------------------------------------------------------------
/spec/dummy/app/assets/config/manifest.js:
--------------------------------------------------------------------------------
1 | //= link_tree ../images
2 | //= link_directory ../stylesheets .css
3 | // OFF link active_storage_db_manifest.js
4 |
--------------------------------------------------------------------------------
/spec/dummy/app/channels/application_cable/connection.rb:
--------------------------------------------------------------------------------
1 | module ApplicationCable
2 | class Connection < ActionCable::Connection::Base
3 | end
4 | end
5 |
--------------------------------------------------------------------------------
/spec/dummy/app/mailers/application_mailer.rb:
--------------------------------------------------------------------------------
1 | class ApplicationMailer < ActionMailer::Base
2 | default from: 'from@example.com'
3 | layout 'mailer'
4 | end
5 |
--------------------------------------------------------------------------------
/lib/activeadmin/trumbowyg/version.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | module ActiveAdmin
4 | module Trumbowyg
5 | VERSION = '1.2.0'
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/spec/dummy/app/models/application_record.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | class ApplicationRecord < ActiveRecord::Base
4 | self.abstract_class = true
5 | end
6 |
--------------------------------------------------------------------------------
/spec/dummy/config.ru:
--------------------------------------------------------------------------------
1 | # This file is used by Rack-based servers to start the application.
2 |
3 | require_relative 'config/environment'
4 |
5 | run Rails.application
6 |
--------------------------------------------------------------------------------
/spec/dummy/bin/rails:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | APP_PATH = File.expand_path('../config/application', __dir__)
3 | require_relative '../config/boot'
4 | require 'rails/commands'
5 |
--------------------------------------------------------------------------------
/spec/dummy/app/assets/javascripts/active_admin.js:
--------------------------------------------------------------------------------
1 | //= require active_admin/base
2 |
3 | //= require activeadmin/trumbowyg/trumbowyg
4 | //= require activeadmin/trumbowyg_input
5 |
--------------------------------------------------------------------------------
/spec/dummy/config/environment.rb:
--------------------------------------------------------------------------------
1 | # Load the Rails application.
2 | require_relative 'application'
3 |
4 | # Initialize the Rails application.
5 | Rails.application.initialize!
6 |
--------------------------------------------------------------------------------
/spec/dummy/config/storage.yml:
--------------------------------------------------------------------------------
1 | test:
2 | service: Disk
3 | root: <%= Rails.root.join("tmp/storage") %>
4 |
5 | local:
6 | service: Disk
7 | root: <%= Rails.root.join("storage") %>
8 |
--------------------------------------------------------------------------------
/spec/dummy/config/initializers/mime_types.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new mime types for use in respond_to blocks:
4 | # Mime::Type.register "text/richtext", :rtf
5 |
--------------------------------------------------------------------------------
/spec/page_objects/admin/posts/edit_page.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | module Admin
4 | module Posts
5 | class EditPage < BasePage
6 | include Capybara::DSL
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/spec/page_objects/admin/authors/edit_page.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | module Admin
4 | module Authors
5 | class EditPage < BasePage
6 | include Capybara::DSL
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/examples/upload_plugin_using_activestorage/app/models/post.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | class Post < ApplicationRecord
4 | has_many_attached :images
5 |
6 | validates :title, allow_blank: false, presence: true
7 | end
8 |
--------------------------------------------------------------------------------
/examples/upload_plugin_using_activestorage/app/assets/stylesheets/active_admin.scss:
--------------------------------------------------------------------------------
1 | @import 'active_admin/mixins';
2 | @import 'active_admin/base';
3 |
4 | @import 'activeadmin/trumbowyg/trumbowyg';
5 | @import 'activeadmin/trumbowyg_input';
6 |
--------------------------------------------------------------------------------
/spec/dummy/config/cable.yml:
--------------------------------------------------------------------------------
1 | development:
2 | adapter: async
3 |
4 | test:
5 | adapter: test
6 |
7 | production:
8 | adapter: redis
9 | url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
10 | channel_prefix: dummy_production
11 |
--------------------------------------------------------------------------------
/spec/dummy/config/initializers/filter_parameter_logging.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Configure sensitive parameters which will be filtered from the log file.
4 | Rails.application.config.filter_parameters += [:password]
5 |
--------------------------------------------------------------------------------
/spec/dummy/Rakefile:
--------------------------------------------------------------------------------
1 | # Add your own tasks in files placed in lib/tasks ending in .rake,
2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3 |
4 | require_relative 'config/application'
5 |
6 | Rails.application.load_tasks
7 |
--------------------------------------------------------------------------------
/spec/dummy/config/boot.rb:
--------------------------------------------------------------------------------
1 | # Set up gems listed in the Gemfile.
2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../Gemfile', __dir__)
3 |
4 | require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
5 | $LOAD_PATH.unshift File.expand_path('../../../lib', __dir__)
6 |
--------------------------------------------------------------------------------
/examples/upload_plugin_using_activestorage/app/assets/javascripts/active_admin.js:
--------------------------------------------------------------------------------
1 | //= require active_admin/base
2 |
3 | //= require activeadmin/trumbowyg/trumbowyg
4 | //= require activeadmin/trumbowyg_input
5 | //= require activeadmin/trumbowyg/plugins/upload/trumbowyg.upload
6 |
--------------------------------------------------------------------------------
/lib/activeadmin/trumbowyg/engine.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require 'active_admin'
4 |
5 | module ActiveAdmin
6 | module Trumbowyg
7 | class Engine < ::Rails::Engine
8 | engine_name 'activeadmin_trumbowyg'
9 | end
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.gem
2 | *.orig
3 |
4 | /.rspec_failures
5 | /.rubocop-*
6 | /Gemfile.lock
7 |
8 | /_misc/
9 | /coverage/
10 | /node_modules/
11 | /spec/dummy/db/*.sqlite3*
12 | /spec/dummy/db/schema-dev.rb
13 | /spec/dummy/log/
14 | /spec/dummy/storage/
15 | /spec/dummy/tmp/
16 |
--------------------------------------------------------------------------------
/spec/dummy/db/migrate/20180607053255_create_tags.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | class CreateTags < ActiveRecord::Migration[5.2]
4 | def change
5 | create_table :tags do |t|
6 | t.string :name
7 |
8 | t.timestamps
9 | end
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/spec/support/string_clean_multiline.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | module StringCleanMultiline
4 | refine String do
5 | def clean_multiline
6 | # Get rid of newlines and indentation spaces
7 | strip.gsub(/\s*\n\s*/, "")
8 | end
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/spec/page_objects/base_object.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | class BaseObject
4 | include Capybara::DSL
5 |
6 | attr_reader :element, :selector
7 |
8 | def initialize(selector:)
9 | @selector = selector
10 | @element = find(selector)
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/spec/dummy/config/initializers/application_controller_renderer.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # ActiveSupport::Reloader.to_prepare do
4 | # ApplicationController.renderer.defaults.merge!(
5 | # http_host: 'example.org',
6 | # https: false
7 | # )
8 | # end
9 |
--------------------------------------------------------------------------------
/spec/dummy/config/initializers/cookies_serializer.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Specify a serializer for the signed and encrypted cookie jars.
4 | # Valid options are :json, :marshal, and :hybrid.
5 | Rails.application.config.action_dispatch.cookies_serializer = :json
6 |
--------------------------------------------------------------------------------
/spec/system/trumbowyg_js_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | RSpec.describe 'Trumbowyg JS' do
4 | it 'defines a Javascript object for the editor', :aggregate_failures do
5 | visit '/admin/posts'
6 |
7 | expect(page.evaluate_script('typeof jQuery.trumbowyg')).to eq 'object'
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/spec/dummy/app/jobs/application_job.rb:
--------------------------------------------------------------------------------
1 | class ApplicationJob < ActiveJob::Base
2 | # Automatically retry jobs that encountered a deadlock
3 | # retry_on ActiveRecord::Deadlocked
4 |
5 | # Most jobs are safe to ignore if the underlying records are no longer available
6 | # discard_on ActiveJob::DeserializationError
7 | end
8 |
--------------------------------------------------------------------------------
/spec/dummy/app/views/layouts/mailer.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
10 |
11 | <%= yield %>
12 |
13 |
14 |
--------------------------------------------------------------------------------
/spec/dummy/app/views/layouts/application.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Dummy
5 | <%= csrf_meta_tags %>
6 | <%= csp_meta_tag %>
7 |
8 | <%= stylesheet_link_tag 'application', media: 'all' %>
9 |
10 |
11 |
12 | <%= yield %>
13 |
14 |
15 |
--------------------------------------------------------------------------------
/spec/dummy/config/database.yml:
--------------------------------------------------------------------------------
1 | default: &default
2 | adapter: sqlite3
3 | pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
4 | timeout: 5000
5 |
6 | test:
7 | <<: *default
8 | database: db/test.sqlite3
9 |
10 | development:
11 | <<: *default
12 | database: db/development.sqlite3
13 | schema_dump: schema-dev.rb
14 |
--------------------------------------------------------------------------------
/spec/dummy/db/migrate/20180607053251_create_authors.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | class CreateAuthors < ActiveRecord::Migration[5.2]
4 | def change
5 | create_table :authors do |t|
6 | t.string :name
7 | t.integer :age
8 | t.string :email
9 |
10 | t.timestamps
11 | end
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/spec/dummy/db/migrate/20180607053254_create_profiles.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | class CreateProfiles < ActiveRecord::Migration[5.2]
4 | def change
5 | create_table :profiles do |t|
6 | t.text :description
7 | t.belongs_to :author, foreign_key: true
8 |
9 | t.timestamps
10 | end
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/spec/dummy/db/migrate/20180607053257_create_post_tags.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | class CreatePostTags < ActiveRecord::Migration[5.2]
4 | def change
5 | create_table :post_tags do |t|
6 | t.belongs_to :post, foreign_key: true
7 | t.belongs_to :tag, foreign_key: true
8 |
9 | t.timestamps
10 | end
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/spec/page_objects/base_page.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | class BasePage
4 | include Capybara::DSL
5 |
6 | attr_reader :path
7 |
8 | def initialize(path:)
9 | @path = path
10 | end
11 |
12 | def load = visit(path)
13 |
14 | def lookup_editor(editor_container:)
15 | @editor = Shared::TrumbowygEditor.new(editor_container)
16 | end
17 | end
18 |
--------------------------------------------------------------------------------
/yarn.lock:
--------------------------------------------------------------------------------
1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2 | # yarn lockfile v1
3 |
4 |
5 | trumbowyg@^2.31.0:
6 | version "2.31.0"
7 | resolved "https://registry.yarnpkg.com/trumbowyg/-/trumbowyg-2.31.0.tgz#377959f76a4fcafd947570720cc986c843434df2"
8 | integrity sha512-I+DMiluTpLDx3yn6LR0TIVR7xIOjgtBQmpEE6Ofd+2yl5ruzY63q/yA/DfBuRVxdK7yDYSBe9FXpVjM1P2NdtA==
9 |
--------------------------------------------------------------------------------
/spec/dummy/app/models/profile.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | class Profile < ApplicationRecord
4 | belongs_to :author, inverse_of: :profile, touch: true
5 |
6 | def to_s
7 | description
8 | end
9 |
10 | class << self
11 | def ransackable_attributes(auth_object = nil)
12 | %w[author_id created_at description id updated_at]
13 | end
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/lib/formtastic/inputs/trumbowyg_input.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | module Formtastic
4 | module Inputs
5 | class TrumbowygInput < Formtastic::Inputs::TextInput
6 | def to_html
7 | input_wrapping do
8 | label_html << builder.text_area(method, input_html_options.merge('data-aa-trumbowyg': '1'))
9 | end
10 | end
11 | end
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "activeadmin_trumbowyg",
3 | "version": "1.2.0",
4 | "description": "An Active Admin plugin to use Trumbowyg as WYSIWYG editor in form inputs.",
5 | "main": "index.js",
6 | "repository": "https://github.com/blocknotes/activeadmin_trumbowyg",
7 | "author": "Mattia Roccoberton ",
8 | "license": "MIT",
9 | "dependencies": {
10 | "trumbowyg": "^2.31.0"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/spec/dummy/app/models/tag.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | class Tag < ApplicationRecord
4 | has_many :post_tags, inverse_of: :tag, dependent: :destroy
5 | has_many :posts, through: :post_tags
6 |
7 | def self.ransackable_associations(auth_object = nil)
8 | %w[post_tags posts]
9 | end
10 |
11 | def self.ransackable_attributes(auth_object = nil)
12 | %w[created_at id name updated_at]
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/spec/dummy/app/models/post_tag.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | class PostTag < ApplicationRecord
4 | belongs_to :post, inverse_of: :post_tags
5 | belongs_to :tag, inverse_of: :post_tags
6 |
7 | validates :post, presence: true
8 | validates :tag, presence: true
9 |
10 | class << self
11 | def ransackable_attributes(auth_object = nil)
12 | %w[created_at id post_id tag_id updated_at]
13 | end
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/spec/dummy/config/initializers/backtrace_silencers.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5 |
6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7 | # Rails.backtrace_cleaner.remove_silencers!
8 |
--------------------------------------------------------------------------------
/spec/dummy/config/application.rb:
--------------------------------------------------------------------------------
1 | require_relative 'boot'
2 |
3 | require 'rails/all'
4 |
5 | Bundler.require(*Rails.groups)
6 |
7 | module Dummy
8 | class Application < Rails::Application
9 | config.load_defaults Rails::VERSION::STRING.to_f
10 |
11 | config.active_support.deprecation = :raise
12 |
13 | if Gem::Version.new(Rails.version) < Gem::Version.new('7.1')
14 | config.active_record.legacy_connection_handling = false
15 | end
16 | end
17 | end
18 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/plugins/highlight/ui/trumbowyg.highlight.min.css:
--------------------------------------------------------------------------------
1 | /** Trumbowyg v2.31.0 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg/ - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */
2 | .trumbowyg-highlight-form-group{margin:15px 10px}.trumbowyg-highlight-form-group .trumbowyg-highlight-form-control{width:100%;border:1px solid #dedede;font-size:14px;padding:7px}.trumbowyg-highlight-form-group .trumbowyg-highlight-form-control.code{height:200px}
--------------------------------------------------------------------------------
/spec/dummy/db/migrate/20180607053739_create_posts.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | class CreatePosts < ActiveRecord::Migration[5.2]
4 | def change
5 | create_table :posts do |t|
6 | t.string :title
7 | t.string :state
8 | t.text :summary
9 | t.text :description
10 | t.belongs_to :author, foreign_key: true
11 | t.string :category
12 | t.datetime :dt
13 | t.float :position
14 | t.boolean :published
15 |
16 | t.timestamps
17 | end
18 | end
19 | end
20 |
--------------------------------------------------------------------------------
/extra/docker-compose.yml:
--------------------------------------------------------------------------------
1 | services:
2 | app:
3 | build:
4 | context: ..
5 | dockerfile: extra/Dockerfile
6 | args:
7 | BUNDLER_VERSION: ${BUNDLER_VERSION}
8 | RUBY_IMAGE: ruby:${RUBY:-3.4}-slim
9 | RAILS_VERSION: ${RAILS:-}
10 | ACTIVEADMIN_VERSION: ${ACTIVEADMIN:-}
11 | UID: ${UID}
12 | user: ${UID}:${GID}
13 | ports:
14 | - ${SERVER_PORT}:${SERVER_PORT}
15 | working_dir: /app
16 | volumes:
17 | - ..:/app
18 | stdin_open: true
19 | tty: true
20 |
--------------------------------------------------------------------------------
/spec/dummy/db/migrate/20180101010101_create_active_admin_comments.rb:
--------------------------------------------------------------------------------
1 | class CreateActiveAdminComments < ActiveRecord::Migration[6.0]
2 | def self.up
3 | create_table :active_admin_comments do |t|
4 | t.string :namespace
5 | t.text :body
6 | t.references :resource, polymorphic: true
7 | t.references :author, polymorphic: true
8 | t.timestamps
9 | end
10 | add_index :active_admin_comments, [:namespace]
11 | end
12 |
13 | def self.down
14 | drop_table :active_admin_comments
15 | end
16 | end
17 |
--------------------------------------------------------------------------------
/spec/dummy/config/initializers/assets.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Version of your assets, change this if you want to expire all your assets.
4 | Rails.application.config.assets.version = '1.0'
5 |
6 | # Add additional assets to the asset load path.
7 | # Rails.application.config.assets.paths << Emoji.images_path
8 |
9 | # Precompile additional assets.
10 | # application.js, application.css, and all non-JS/CSS in the app/assets
11 | # folder are already added.
12 | # Rails.application.config.assets.precompile += %w( admin.js admin.css )
13 |
--------------------------------------------------------------------------------
/.rubocop.yml:
--------------------------------------------------------------------------------
1 | inherit_from:
2 | - https://relaxed.ruby.style/rubocop.yml
3 |
4 | plugins:
5 | - rubocop-capybara
6 | - rubocop-packaging
7 | - rubocop-performance
8 | - rubocop-rails
9 | - rubocop-rspec
10 | - rubocop-rspec_rails
11 |
12 | AllCops:
13 | Exclude:
14 | - bin/*
15 | - db/schema.rb
16 | - gemfiles/**/*
17 | - spec/dummy/**/*
18 | - vendor/**/*
19 | NewCops: enable
20 | TargetRubyVersion: 3.0
21 |
22 | RSpec/ExampleLength:
23 | # default 5
24 | Max: 12
25 |
26 | RSpec/MultipleMemoizedHelpers:
27 | # default: 5
28 | Max: 10
29 |
--------------------------------------------------------------------------------
/spec/dummy/config/initializers/wrap_parameters.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # This file contains settings for ActionController::ParamsWrapper which
4 | # is enabled by default.
5 |
6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7 | ActiveSupport.on_load(:action_controller) do
8 | wrap_parameters format: [:json]
9 | end
10 |
11 | # To enable root element in JSON for ActiveRecord objects.
12 | # ActiveSupport.on_load(:active_record) do
13 | # self.include_root_in_json = true
14 | # end
15 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/plugins/mention/ui/trumbowyg.mention.min.css:
--------------------------------------------------------------------------------
1 | /** Trumbowyg v2.31.0 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg/ - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */
2 | .trumbowyg-dropdown-mention button{position:relative;white-space:nowrap}.trumbowyg-dropdown-mention button:after{content:"";position:absolute;top:0;right:0;width:15%;height:100%;background-size:100%;background-image:-webkit-gradient(linear,left top,right top,from(rgba(255,255,255,0)),color-stop(80%,#fff),to(#fff));background-image:linear-gradient(to right,rgba(255,255,255,0) 0,#fff 80%,#fff 100%);pointer-events:none}
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/plugins/mathml/ui/trumbowyg.mathml.min.css:
--------------------------------------------------------------------------------
1 | /** Trumbowyg v2.31.0 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg/ - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */
2 | @charset "UTF-8";[formulas]{position:relative;display:inline-block;pointer-events:none}[formulas][inline=false]{display:block;width:100%}[formulas]::after{content:"✎";position:absolute;top:0;right:0;bottom:0;left:0;opacity:0;background-color:rgba(255,255,255,.83);-webkit-box-shadow:0 0 5px 5px rgba(255,255,255,.83);box-shadow:0 0 5px 5px rgba(255,255,255,.83);cursor:pointer;pointer-events:auto}[formulas]:hover::after{opacity:1}
--------------------------------------------------------------------------------
/bin/rails:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | # This command will automatically be run when you run "rails" with Rails gems
3 | # installed from the root of your application.
4 |
5 | ENV['RAILS_ENV'] ||= 'development'
6 |
7 | ENGINE_ROOT = File.expand_path('..', __dir__)
8 | ENGINE_PATH = File.expand_path('../lib/activeadmin/trumbowyg/engine', __dir__)
9 | APP_PATH = File.expand_path('../spec/dummy/config/application', __dir__)
10 |
11 | # Set up gems listed in the Gemfile.
12 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
13 | require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
14 |
15 | require 'rails/all'
16 | require 'rails/engine/commands'
17 |
--------------------------------------------------------------------------------
/Rakefile:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | begin
4 | require 'bundler/setup'
5 | rescue LoadError
6 | puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
7 | end
8 |
9 | APP_RAKEFILE = File.expand_path("spec/dummy/Rakefile", __dir__)
10 | load 'rails/tasks/engine.rake'
11 |
12 | load 'rails/tasks/statistics.rake'
13 |
14 | require 'bundler/gem_tasks'
15 |
16 | begin
17 | require 'rspec/core/rake_task'
18 |
19 | RSpec::Core::RakeTask.new(:spec) do |t|
20 | # t.ruby_opts = %w[-w]
21 | t.rspec_opts = ['--color', '--format documentation']
22 | end
23 |
24 | task default: :spec
25 | rescue LoadError
26 | puts '! LoadError: no RSpec available'
27 | end
28 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/plugins/highlight/ui/sass/trumbowyg.highlight.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * Trumbowyg v2.31.0 - A lightweight WYSIWYG editor
3 | * Trumbowyg plugin stylesheet
4 | * ------------------------
5 | * @link https://alex-d.github.io/Trumbowyg/
6 | * @license MIT
7 | * @author Alexandre Demode (Alex-D)
8 | * Twitter : @AlexandreDemode
9 | * Website : alex-d.fr
10 | */
11 |
12 | .trumbowyg-highlight-form-group {
13 | margin: 15px 10px;
14 |
15 | .trumbowyg-highlight-form-control {
16 | width: 100%;
17 | border: 1px solid #DEDEDE;
18 | font-size: 14px;
19 | padding: 7px;
20 |
21 | &.code {
22 | height: 200px;
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/spec/dummy/config/initializers/inflections.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new inflection rules using the following format. Inflections
4 | # are locale specific, and you may define rules for as many different
5 | # locales as you wish. All of these examples are active by default:
6 | # ActiveSupport::Inflector.inflections(:en) do |inflect|
7 | # inflect.plural /^(ox)$/i, '\1en'
8 | # inflect.singular /^(ox)en/i, '\1'
9 | # inflect.irregular 'person', 'people'
10 | # inflect.uncountable %w( fish sheep )
11 | # end
12 |
13 | # These inflection rules are supported but not enabled by default:
14 | # ActiveSupport::Inflector.inflections(:en) do |inflect|
15 | # inflect.acronym 'RESTful'
16 | # end
17 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg_input.js:
--------------------------------------------------------------------------------
1 | (function () {
2 | 'use strict'
3 |
4 | function initTrumbowygEditors() {
5 | $('[data-aa-trumbowyg]').each(function () {
6 | if (!$(this).hasClass('trumbowyg-textarea--active')) {
7 | let options = {
8 | svgPath: '/assets/trumbowyg/icons.svg'
9 | }
10 | options = $.extend({}, options, $(this).data('options'))
11 | $(this).trumbowyg(options)
12 | $(this).addClass('trumbowyg-textarea--active')
13 | }
14 | })
15 | }
16 |
17 | $(document).ready(initTrumbowygEditors)
18 | $(document).on('has_many_add:after', '.has_many_container', initTrumbowygEditors)
19 | $(document).on('turbolinks:load', initTrumbowygEditors)
20 | })()
21 |
--------------------------------------------------------------------------------
/spec/spec_helper.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | RSpec.configure do |config|
4 | config.disable_monkey_patching!
5 | config.filter_run focus: true
6 | config.filter_run_excluding changes_filesystem: true
7 | config.run_all_when_everything_filtered = true
8 |
9 | config.color = true
10 | config.tty = true
11 |
12 | config.example_status_persistence_file_path = '.rspec_failures'
13 | config.order = :random
14 | config.shared_context_metadata_behavior = :apply_to_host_groups
15 |
16 | config.expect_with :rspec do |expectations|
17 | expectations.include_chain_clauses_in_custom_matcher_descriptions = true
18 | end
19 | config.mock_with :rspec do |mocks|
20 | mocks.verify_partial_doubles = true
21 | end
22 | end
23 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/plugins/highlight/ui/trumbowyg.highlight.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Trumbowyg v2.31.0 - A lightweight WYSIWYG editor
3 | * Trumbowyg plugin stylesheet
4 | * ------------------------
5 | * @link https://alex-d.github.io/Trumbowyg/
6 | * @license MIT
7 | * @author Alexandre Demode (Alex-D)
8 | * Twitter : @AlexandreDemode
9 | * Website : alex-d.fr
10 | */
11 |
12 | .trumbowyg-highlight-form-group {
13 | margin: 15px 10px;
14 | }
15 | .trumbowyg-highlight-form-group .trumbowyg-highlight-form-control {
16 | width: 100%;
17 | border: 1px solid #DEDEDE;
18 | font-size: 14px;
19 | padding: 7px;
20 | }
21 | .trumbowyg-highlight-form-group .trumbowyg-highlight-form-control.code {
22 | height: 200px;
23 | }
--------------------------------------------------------------------------------
/spec/page_objects/shared/html_editor.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | module Shared
4 | class HtmlEditor < BaseObject
5 | def content_element
6 | raise NotImplementedError
7 | end
8 |
9 | def clear
10 | select_all
11 | content_element.send_keys(:delete)
12 | self
13 | end
14 |
15 | # @return [self]
16 | def open_dropdown
17 | raise NotImplementedError
18 | end
19 |
20 | def select_all
21 | content_element.send_keys([:control, "a"])
22 | self
23 | end
24 |
25 | def toolbar_control(control, ...)
26 | send(:"toggle_#{control}", ...)
27 | self
28 | end
29 |
30 | def <<(content)
31 | content_element.send_keys(content)
32 | self
33 | end
34 | end
35 | end
36 |
--------------------------------------------------------------------------------
/lib/tasks/trumbowyg.rake:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require 'fileutils'
4 |
5 | namespace :trumbowyg do
6 | desc 'Create nondigest versions of all trumbowyg digest assets'
7 | task nondigest: :environment do
8 | # include ActionView::Helpers::AssetUrlHelper
9 | # p font_path( 'active_admin-trumbowyg.svg' )
10 |
11 | fingerprint = /-[0-9a-f]{32,64}\./
12 | path = Rails.public_path.join('assets/active_admin-trumbowyg*')
13 |
14 | Dir[path].each do |file|
15 | next unless file&.match?(fingerprint)
16 |
17 | nondigest = file.sub fingerprint, '.'
18 | if !File.exist?(nondigest) || File.mtime(file) > File.mtime(nondigest)
19 | FileUtils.cp file, nondigest, verbose: true, preserve: true
20 | end
21 | end
22 | end
23 | end
24 |
--------------------------------------------------------------------------------
/spec/dummy/app/assets/stylesheets/active_admin.scss:
--------------------------------------------------------------------------------
1 | // SASS variable overrides must be declared before loading up Active Admin's styles.
2 | //
3 | // To view the variables that Active Admin provides, take a look at
4 | // `app/assets/stylesheets/active_admin/mixins/_variables.scss` in the
5 | // Active Admin source.
6 | //
7 | // For example, to change the sidebar width:
8 | // $sidebar-width: 242px;
9 |
10 | // Active Admin's got SASS!
11 | @import 'active_admin/mixins';
12 | @import 'active_admin/base';
13 |
14 | @import 'activeadmin/trumbowyg/trumbowyg';
15 | @import 'activeadmin/trumbowyg_input';
16 |
17 | // Overriding any non-variable SASS must be done after the fact.
18 | // For example, to change the default status-tag color:
19 | //
20 | // .status_tag { background: #6090DB; }
21 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: [blocknotes]
4 | patreon: # Replace with a single Patreon username
5 | open_collective: # Replace with a single Open Collective username
6 | ko_fi: # Replace with a single Ko-fi username
7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9 | liberapay: # Replace with a single Liberapay username
10 | issuehunt: # Replace with a single IssueHunt username
11 | otechie: # Replace with a single Otechie username
12 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
13 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
14 |
--------------------------------------------------------------------------------
/spec/support/capybara.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require 'capybara/cuprite'
4 |
5 | Capybara.register_driver(:capybara_cuprite) do |app|
6 | browser_options = {}.tap do |opts|
7 | opts['no-sandbox'] = nil if ENV['DEVEL']
8 | end
9 |
10 | Capybara::Cuprite::Driver.new(
11 | app,
12 | window_size: [1600, 1280],
13 | browser_options: browser_options,
14 | process_timeout: 20,
15 | timeout: 20,
16 | inspector: true,
17 | headless: !ENV['CUPRITE_HEADLESS'].in?(%w[n 0 no false])
18 | )
19 | end
20 |
21 | # Capybara.server = :puma
22 | Capybara.default_driver = Capybara.javascript_driver = :capybara_cuprite
23 |
24 | RSpec.configure do |config|
25 | config.prepend_before(:each, type: :system) do
26 | driven_by Capybara.javascript_driver
27 | end
28 | end
29 |
--------------------------------------------------------------------------------
/spec/dummy/app/javascript/packs/application.js:
--------------------------------------------------------------------------------
1 | // This is a manifest file that'll be compiled into application.js, which will include all the files
2 | // listed below.
3 | //
4 | // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5 | // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6 | //
7 | // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8 | // compiled file. JavaScript code in this file should be added after the last require_* statement.
9 | //
10 | // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11 | // about supported directives.
12 | //
13 | //= require rails-ujs
14 | //= require activestorage
15 | //= require_tree .
16 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/plugins/emoji/ui/trumbowyg.emoji.min.css:
--------------------------------------------------------------------------------
1 | /** Trumbowyg v2.31.0 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg/ - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */
2 | .trumbowyg-dropdown-emoji{width:265px;padding:7px 0 7px 5px}.trumbowyg-dropdown-emoji svg{display:none!important}.trumbowyg-dropdown-emoji button{display:block;position:relative;float:left;height:26px;width:26px;padding:0;margin:2px;line-height:24px;text-align:center}.trumbowyg-dropdown-emoji button:focus::after,.trumbowyg-dropdown-emoji button:hover::after{display:block;position:absolute;top:-5px;left:-5px;height:27px;width:27px;background:inherit;-webkit-box-shadow:#000 0 0 2px;box-shadow:#000 0 0 2px;z-index:10;background-color:transparent}.trumbowyg .emoji{width:22px;height:22px;display:inline-block}
--------------------------------------------------------------------------------
/spec/dummy/app/assets/stylesheets/application.css:
--------------------------------------------------------------------------------
1 | /*
2 | * This is a manifest file that'll be compiled into application.css, which will include all the files
3 | * listed below.
4 | *
5 | * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6 | * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7 | *
8 | * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9 | * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
10 | * files in this directory. Styles in this file should be added after the last require_* statement.
11 | * It is generally better to create a new file per style scope.
12 | *
13 | *= require_tree .
14 | *= require_self
15 | */
16 |
--------------------------------------------------------------------------------
/extra/Dockerfile:
--------------------------------------------------------------------------------
1 | ARG RUBY_IMAGE=ruby:3
2 | FROM ${RUBY_IMAGE}
3 |
4 | ENV DEBIAN_FRONTEND=noninteractive
5 | ENV DEVEL=1
6 | ENV LANG=C.UTF-8
7 |
8 | RUN apt-get update -qq
9 | RUN apt-get install -yqq --no-install-recommends build-essential chromium less libyaml-dev nano netcat-traditional pkg-config
10 |
11 | ARG BUNDLER_VERSION
12 | RUN gem install bundler -v ${BUNDLER_VERSION}
13 | RUN echo 'gem: --no-document' > /etc/gemrc
14 |
15 | ARG UID
16 | RUN useradd -u $UID --shell /bin/bash app
17 |
18 | RUN mkdir -p /home/app && chown -R app:app /home/app
19 |
20 | ARG RAILS_VERSION
21 | ENV RAILS_VERSION=$RAILS_VERSION
22 |
23 | ARG ACTIVEADMIN_VERSION
24 | ENV ACTIVEADMIN_VERSION=$ACTIVEADMIN_VERSION
25 |
26 | WORKDIR /app
27 | COPY . /app
28 | RUN bundle install
29 | RUN chown -R app:app /usr/local/bundle
30 |
31 | RUN ln -s /app/extra/.bashrc /home/app/.bashrc
32 |
--------------------------------------------------------------------------------
/spec/page_objects/shared/trumbowyg_editor.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | module Shared
4 | class TrumbowygEditor < HtmlEditor
5 | attr_reader :editor_selector
6 |
7 | def initialize(container)
8 | @editor_selector = "#{container} .trumbowyg-box"
9 | super(selector: editor_selector)
10 | end
11 |
12 | def content = content_element['innerHTML']
13 |
14 | def content_element
15 | @content_element ||= find("#{editor_selector} [contenteditable]")
16 | end
17 |
18 | def toggle_bold = find("#{editor_selector} .trumbowyg-strong-button").click
19 |
20 | def toggle_delete = find("#{editor_selector} .trumbowyg-del-button").click
21 |
22 | def toggle_italic = find("#{editor_selector} .trumbowyg-em-button").click
23 |
24 | def toggle_underline = find("#{editor_selector} .trumbowyg-underline-button").click
25 | end
26 | end
27 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/plugins/pasteimage/trumbowyg.pasteimage.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * trumbowyg.pasteimage.js v1.0
3 | * Basic base64 paste plugin for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Alexandre Demode (Alex-D)
7 | * Twitter : @AlexandreDemode
8 | * Website : alex-d.fr
9 | */
10 | !function(e){"use strict";e.extend(!0,e.trumbowyg,{plugins:{pasteImage:{init:function(e){e.pasteHandlers.push((function(t){try{for(var a,n=(t.originalEvent||t).clipboardData.items,i=!1,r=n.length-1;r>=0;r-=1)n[r].type.match(/^image\//)&&((a=new FileReader).onloadend=function(t){e.execCmd("insertImage",t.target.result,!1,!0)},a.readAsDataURL(n[r].getAsFile()),i=!0);i&&(t.stopPropagation(),t.preventDefault())}catch(e){}}))}}}})}(jQuery);
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/plugins/template/trumbowyg.template.min.js:
--------------------------------------------------------------------------------
1 | !function(t){"use strict";function e(e){var a=e.o.plugins.templates,l=[];return t.each(a,(function(t,a){e.addBtnDef("template_"+t,{fn:function(){e.html(a.html)},hasIcon:!1,title:a.name}),l.push("template_"+t)})),l}t.extend(!0,t.trumbowyg,{langs:{en:{template:"Template"},az:{template:"Şablon"},by:{template:"Шаблон"},da:{template:"Skabelon"},de:{template:"Vorlage"},et:{template:"Mall"},fr:{template:"Patron"},hu:{template:"Sablon"},ja:{template:"テンプレート"},ko:{template:"서식"},nl:{template:"Sjabloon"},pt_br:{template:"Modelo"},ru:{template:"Шаблон"},sl:{template:"Predloga"},tr:{template:"Şablon"},zh_tw:{template:"模板"}}}),t.extend(!0,t.trumbowyg,{plugins:{template:{shouldInit:function(t){return t.o.plugins.hasOwnProperty("templates")},init:function(t){t.addBtnDef("template",{dropdown:e(t),hasIcon:!1,text:t.lang.template})}}}})}(jQuery);
--------------------------------------------------------------------------------
/bin/rake:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | # frozen_string_literal: true
3 |
4 | #
5 | # This file was generated by Bundler.
6 | #
7 | # The application 'rake' is installed as part of a gem, and
8 | # this file is here to facilitate running it.
9 | #
10 |
11 | require "pathname"
12 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13 | Pathname.new(__FILE__).realpath)
14 |
15 | bundle_binstub = File.expand_path("../bundle", __FILE__)
16 |
17 | if File.file?(bundle_binstub)
18 | if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19 | load(bundle_binstub)
20 | else
21 | abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22 | Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23 | end
24 | end
25 |
26 | require "rubygems"
27 | require "bundler/setup"
28 |
29 | load Gem.bin_path("rake", "rake")
30 |
--------------------------------------------------------------------------------
/bin/rspec:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | # frozen_string_literal: true
3 |
4 | #
5 | # This file was generated by Bundler.
6 | #
7 | # The application 'rspec' is installed as part of a gem, and
8 | # this file is here to facilitate running it.
9 | #
10 |
11 | require "pathname"
12 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13 | Pathname.new(__FILE__).realpath)
14 |
15 | bundle_binstub = File.expand_path("../bundle", __FILE__)
16 |
17 | if File.file?(bundle_binstub)
18 | if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19 | load(bundle_binstub)
20 | else
21 | abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22 | Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23 | end
24 | end
25 |
26 | require "rubygems"
27 | require "bundler/setup"
28 |
29 | load Gem.bin_path("rspec-core", "rspec")
30 |
--------------------------------------------------------------------------------
/bin/rubocop:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | # frozen_string_literal: true
3 |
4 | #
5 | # This file was generated by Bundler.
6 | #
7 | # The application 'rubocop' is installed as part of a gem, and
8 | # this file is here to facilitate running it.
9 | #
10 |
11 | require "pathname"
12 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13 | Pathname.new(__FILE__).realpath)
14 |
15 | bundle_binstub = File.expand_path("../bundle", __FILE__)
16 |
17 | if File.file?(bundle_binstub)
18 | if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19 | load(bundle_binstub)
20 | else
21 | abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22 | Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23 | end
24 | end
25 |
26 | require "rubygems"
27 | require "bundler/setup"
28 |
29 | load Gem.bin_path("rubocop", "rubocop")
30 |
--------------------------------------------------------------------------------
/bin/fasterer:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | # frozen_string_literal: true
3 |
4 | #
5 | # This file was generated by Bundler.
6 | #
7 | # The application 'fasterer' is installed as part of a gem, and
8 | # this file is here to facilitate running it.
9 | #
10 |
11 | require "pathname"
12 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13 | Pathname.new(__FILE__).realpath)
14 |
15 | bundle_binstub = File.expand_path("../bundle", __FILE__)
16 |
17 | if File.file?(bundle_binstub)
18 | if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19 | load(bundle_binstub)
20 | else
21 | abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22 | Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23 | end
24 | end
25 |
26 | require "rubygems"
27 | require "bundler/setup"
28 |
29 | load Gem.bin_path("fasterer", "fasterer")
30 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/plugins/specialchars/ui/trumbowyg.specialchars.min.css:
--------------------------------------------------------------------------------
1 | /** Trumbowyg v2.31.0 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg/ - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */
2 | .trumbowyg-symbol-\ -dropdown-button{display:none!important}.trumbowyg-symbol-\ -dropdown-button+button{clear:both}.trumbowyg-dropdown-specialChars{width:248px;padding:5px 3px 3px}.trumbowyg-dropdown-specialChars button{display:block;position:relative;float:left;height:26px;width:26px;padding:0;margin:2px;line-height:24px;text-align:center}.trumbowyg-dropdown-specialChars button:focus::after,.trumbowyg-dropdown-specialChars button:hover::after{display:block;position:absolute;top:-5px;left:-5px;height:27px;width:27px;background:inherit;-webkit-box-shadow:#000 0 0 2px;box-shadow:#000 0 0 2px;z-index:10;background-color:transparent}.trumbowyg .specialChars{width:22px;height:22px;display:inline-block}
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/zh_cn.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * zh_cn.js
3 | * Simplified Chinese translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Liu Kai (akai)
7 | * Twitter : @akai404
8 | * Github : https://github.com/akai
9 | */
10 | // jshint camelcase:false
11 | jQuery.trumbowyg.langs.zh_cn={viewHTML:"源代码",formatting:"格式",p:"段落",blockquote:"引用",code:"代码",header:"标题",bold:"加粗",italic:"斜体",strikethrough:"删除线",underline:"下划线",strong:"加粗",em:"斜体",del:"删除线",unorderedList:"无序列表",orderedList:"有序列表",insertImage:"插入图片",insertVideo:"插入视频",link:"超链接",createLink:"插入链接",unlink:"取消链接",justifyLeft:"居左对齐",justifyCenter:"居中对齐",justifyRight:"居右对齐",justifyFull:"两端对齐",horizontalRule:"插入分隔线",fullscreen:"全屏",close:"关闭",submit:"确定",reset:"取消",required:"必需的",description:"描述",title:"标题",text:"文字"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/plugins/mention/ui/sass/trumbowyg.mention.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * Trumbowyg v2.31.0 - A lightweight WYSIWYG editor
3 | * Trumbowyg plugin stylesheet
4 | * ------------------------
5 | * @link https://alex-d.github.io/Trumbowyg/
6 | * @license MIT
7 | * @author Alexandre Demode (Alex-D)
8 | * Twitter : @AlexandreDemode
9 | * Website : alex-d.fr
10 | */
11 |
12 | .trumbowyg-dropdown-mention {
13 | button {
14 | position: relative;
15 | white-space: nowrap;
16 |
17 | &:after {
18 | content: "";
19 | position: absolute;
20 | top: 0;
21 | right: 0;
22 | width: 15%;
23 | height: 100%;
24 | background-size: 100%;
25 | background-image: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, #ffffff 80%, #ffffff 100%);
26 | pointer-events: none;
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/plugins/mention/ui/trumbowyg.mention.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Trumbowyg v2.31.0 - A lightweight WYSIWYG editor
3 | * Trumbowyg plugin stylesheet
4 | * ------------------------
5 | * @link https://alex-d.github.io/Trumbowyg/
6 | * @license MIT
7 | * @author Alexandre Demode (Alex-D)
8 | * Twitter : @AlexandreDemode
9 | * Website : alex-d.fr
10 | */
11 |
12 | .trumbowyg-dropdown-mention button {
13 | position: relative;
14 | white-space: nowrap;
15 | }
16 | .trumbowyg-dropdown-mention button:after {
17 | content: "";
18 | position: absolute;
19 | top: 0;
20 | right: 0;
21 | width: 15%;
22 | height: 100%;
23 | background-size: 100%;
24 | background-image: -webkit-gradient(linear, left top, right top, from(rgba(255, 255, 255, 0)), color-stop(80%, #ffffff), to(#ffffff));
25 | background-image: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, #ffffff 80%, #ffffff 100%);
26 | pointer-events: none;
27 | }
--------------------------------------------------------------------------------
/spec/dummy/app/models/author.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | class Author < ApplicationRecord
4 | has_many :posts
5 | has_many :published_posts, -> { published }, class_name: 'Post'
6 | has_many :recent_posts, -> { recents }, class_name: 'Post'
7 |
8 | has_many :tags, through: :posts
9 |
10 | has_one :profile, inverse_of: :author, dependent: :destroy
11 |
12 | has_one_attached :avatar
13 |
14 | accepts_nested_attributes_for :profile, allow_destroy: true
15 | accepts_nested_attributes_for :posts, allow_destroy: true
16 |
17 | validates :email, format: { with: /\A[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\z/i, message: 'Invalid email' }
18 |
19 | validate -> {
20 | errors.add( :base, 'Invalid age' ) if !age || age.to_i % 3 == 1
21 | }
22 |
23 | def to_s
24 | "#{name} (#{age})"
25 | end
26 |
27 | class << self
28 | def ransackable_attributes(auth_object = nil)
29 | %w[age created_at email id name updated_at]
30 | end
31 | end
32 | end
33 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/th.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * th.js
3 | * Thai translation for Trumbowyg
4 | * https://github.com/ionsoft/Trumbowyg
5 | * ===========================================================
6 | * Author : Gonatee Klanktong
7 | * Github : https://github.com/gonateek
8 | */
9 | jQuery.trumbowyg.langs.th={viewHTML:"ดู HTML",formatting:"จัดรูปแบบ",p:"ย่อหน้า",blockquote:"อ้างอิง",code:"โค๊ด",header:"ส่วนหัว",bold:"หนา",italic:"เอียง",strikethrough:"ขีดทับ",underline:"เส้นใต้",strong:"สำคัญ",em:"เน้น",del:"ลบ",unorderedList:"รายการ",orderedList:"รายการ(ตัวเลข)",insertImage:"ใส่รูป",insertVideo:"ใส่วิดีโอ",link:"ลิงค์",createLink:"สร้างลิงค์",unlink:"ยกเลิกลิงค์",justifyLeft:"ชิดซ้าย",justifyCenter:"กลาง",justifyRight:"ชิดขวา",justifyFull:"เต็มบรรทัด",horizontalRule:"เส้นแนวนอน",fullscreen:"เต็มหน้าจอ",close:"ปิด",submit:"ตกลง",reset:"เริ่มใหม่",required:"จำเป็น",description:"คำอธิบาย",title:"หัวเรื่อง",text:"ข้อความ"};
--------------------------------------------------------------------------------
/spec/dummy/config/locales/en.yml:
--------------------------------------------------------------------------------
1 | # Files in the config/locales directory are used for internationalization
2 | # and are automatically loaded by Rails. If you want to use locales other
3 | # than English, add the necessary files in this directory.
4 | #
5 | # To use the locales, use `I18n.t`:
6 | #
7 | # I18n.t 'hello'
8 | #
9 | # In views, this is aliased to just `t`:
10 | #
11 | # <%= t('hello') %>
12 | #
13 | # To use a different locale, set it with `I18n.locale`:
14 | #
15 | # I18n.locale = :es
16 | #
17 | # This would use the information in config/locales/es.yml.
18 | #
19 | # The following keys must be escaped otherwise they will not be retrieved by
20 | # the default I18n backend:
21 | #
22 | # true, false, on, off, yes, no
23 | #
24 | # Instead, surround them with single quotes.
25 | #
26 | # en:
27 | # 'true': 'foo'
28 | #
29 | # To learn more, please read the Rails Internationalization guide
30 | # available at https://guides.rubyonrails.org/i18n.html.
31 |
32 | en:
33 | hello: "Hello world"
34 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/he.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * he.js
3 | * Hebrew translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Udi Doron (udidoron)
7 | * Github : https://github.com/udidoron
8 | */
9 | jQuery.trumbowyg.langs.he={_dir:"rtl",viewHTML:"צפה ב-HTML",formatting:"פורמט",p:"פסקה",blockquote:"ציטוט",code:"קוד",header:"ראשית",bold:"מודגש",italic:"נטוי",strikethrough:"קו חוצה",underline:"קו תחתון",strong:"בולט",em:"הדגשה",del:"נמחק",unorderedList:"רשימה ללא סדר",orderedList:"רשימה מסודרת",insertImage:"הכנס תמונה",insertVideo:"הכנס סרטון",link:"קישור",createLink:"צור קישור",unlink:"הסר קישור",justifyLeft:"ישר לשמאל",justifyCenter:"מרכז",justifyRight:"ישר לימין",justifyFull:"ישר לשני הצדדים",horizontalRule:"הכנס קו אופקי",fullscreen:"מסך מלא",close:"סגור",submit:"שלח",reset:"אתחל מחדש",required:"נחוץ",description:"תיאור",title:"כותרת",text:"טקסט"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/ja.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * ja.js
3 | * Japanese translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Kouta Fukuhara (foo9)
7 | * Twitter : @foo9
8 | * Website : https://github.com/foo9
9 | */
10 | jQuery.trumbowyg.langs.ja={viewHTML:"HTML表示",undo:"元に戻す",redo:"やり直す",formatting:"フォーマット",p:"段落",blockquote:"引用",code:"コード",header:"見出し",bold:"太字",italic:"斜体",strikethrough:"取り消し線",underline:"下線",strong:"太字",em:"斜体",del:"取り消し線",superscript:"上付き文字",subscript:"下付き文字",unorderedList:"順序なしリスト",orderedList:"順序ありリスト",insertImage:"画像の挿入",link:"リンク",createLink:"リンクの作成",unlink:"リンクの削除",justifyLeft:"左揃え",justifyCenter:"中央揃え",justifyRight:"右揃え",justifyFull:"両端揃え",horizontalRule:"横罫線",removeformat:"フォーマットの削除",fullscreen:"全画面表示",close:"閉じる",submit:"送信",reset:"キャンセル",required:"必須",description:"説明",title:"タイトル",text:"テキスト",target:"ターゲット"};
--------------------------------------------------------------------------------
/.github/workflows/linters.yml:
--------------------------------------------------------------------------------
1 | ---
2 | name: Linters
3 |
4 | on:
5 | pull_request:
6 | branches: [main]
7 | push:
8 | branches: [main]
9 |
10 | jobs:
11 | reviewdog:
12 | name: Reviewdog
13 | runs-on: ubuntu-latest
14 |
15 | env:
16 | RAILS_VERSION: 7.0
17 |
18 | steps:
19 | - name: Checkout repository
20 | uses: actions/checkout@v4
21 |
22 | - name: Set up Ruby
23 | uses: ruby/setup-ruby@v1
24 | with:
25 | ruby-version: 3.0
26 | bundler-cache: true
27 |
28 | - name: Set up Reviewdog
29 | uses: reviewdog/action-setup@v1
30 | with:
31 | reviewdog_version: latest
32 |
33 | - name: Run Reviewdog
34 | env:
35 | REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36 | run: |
37 | reviewdog -fail-on-error -reporter=github-pr-review -runners=fasterer,rubocop
38 |
39 | # NOTE: check with: reviewdog -fail-on-error -reporter=github-pr-review -runners=fasterer -diff="git diff" -tee
40 |
--------------------------------------------------------------------------------
/.github/workflows/specs_rails70.yml:
--------------------------------------------------------------------------------
1 | ---
2 | name: Specs Rails 7.0
3 |
4 | on:
5 | pull_request:
6 | branches: [main]
7 | push:
8 | branches: [main]
9 |
10 | jobs:
11 | test:
12 | runs-on: ubuntu-latest
13 |
14 | strategy:
15 | matrix:
16 | ruby: ['3.0', '3.2']
17 |
18 | env:
19 | RAILS_VERSION: 7.0
20 |
21 | steps:
22 | - name: Checkout repository
23 | uses: actions/checkout@v4
24 |
25 | - name: Set up Ruby
26 | uses: ruby/setup-ruby@v1
27 | with:
28 | ruby-version: ${{ matrix.ruby }}
29 | bundler-cache: true
30 |
31 | - name: Database setup
32 | run: bin/rails db:create db:migrate db:test:prepare
33 |
34 | - name: Run tests
35 | run: bundle exec rspec --profile
36 |
37 | - name: On failure, archive screenshots as artifacts
38 | uses: actions/upload-artifact@v4
39 | if: failure()
40 | with:
41 | name: test-failed-screenshots
42 | path: spec/dummy/tmp/screenshots
43 |
--------------------------------------------------------------------------------
/.github/workflows/specs_rails71.yml:
--------------------------------------------------------------------------------
1 | ---
2 | name: Specs Rails 7.1
3 |
4 | on:
5 | pull_request:
6 | branches: [main]
7 | push:
8 | branches: [main]
9 |
10 | jobs:
11 | test:
12 | runs-on: ubuntu-latest
13 |
14 | strategy:
15 | matrix:
16 | ruby: ['3.2', '3.4']
17 |
18 | env:
19 | RAILS_VERSION: 7.1
20 |
21 | steps:
22 | - name: Checkout repository
23 | uses: actions/checkout@v4
24 |
25 | - name: Set up Ruby
26 | uses: ruby/setup-ruby@v1
27 | with:
28 | ruby-version: ${{ matrix.ruby }}
29 | bundler-cache: true
30 |
31 | - name: Database setup
32 | run: bin/rails db:create db:migrate db:test:prepare
33 |
34 | - name: Run tests
35 | run: bundle exec rspec --profile
36 |
37 | - name: On failure, archive screenshots as artifacts
38 | uses: actions/upload-artifact@v4
39 | if: failure()
40 | with:
41 | name: test-failed-screenshots
42 | path: spec/dummy/tmp/screenshots
43 |
--------------------------------------------------------------------------------
/.github/workflows/specs_rails72.yml:
--------------------------------------------------------------------------------
1 | ---
2 | name: Specs Rails 7.2
3 |
4 | on:
5 | pull_request:
6 | branches: [main]
7 | push:
8 | branches: [main]
9 |
10 | jobs:
11 | test:
12 | runs-on: ubuntu-latest
13 |
14 | strategy:
15 | matrix:
16 | ruby: ['3.2', '3.4']
17 |
18 | env:
19 | RAILS_VERSION: 7.2
20 |
21 | steps:
22 | - name: Checkout repository
23 | uses: actions/checkout@v4
24 |
25 | - name: Set up Ruby
26 | uses: ruby/setup-ruby@v1
27 | with:
28 | ruby-version: ${{ matrix.ruby }}
29 | bundler-cache: true
30 |
31 | - name: Database setup
32 | run: bin/rails db:create db:migrate db:test:prepare
33 |
34 | - name: Run tests
35 | run: bundle exec rspec --profile
36 |
37 | - name: On failure, archive screenshots as artifacts
38 | uses: actions/upload-artifact@v4
39 | if: failure()
40 | with:
41 | name: test-failed-screenshots
42 | path: spec/dummy/tmp/screenshots
43 |
--------------------------------------------------------------------------------
/.github/workflows/specs_rails80.yml:
--------------------------------------------------------------------------------
1 | ---
2 | name: Specs Rails 8.0
3 |
4 | on:
5 | pull_request:
6 | branches: [main]
7 | push:
8 | branches: [main]
9 |
10 | jobs:
11 | test:
12 | runs-on: ubuntu-latest
13 |
14 | strategy:
15 | matrix:
16 | ruby: ['3.2', '3.4']
17 |
18 | env:
19 | RAILS_VERSION: 8.0
20 |
21 | steps:
22 | - name: Checkout repository
23 | uses: actions/checkout@v4
24 |
25 | - name: Set up Ruby
26 | uses: ruby/setup-ruby@v1
27 | with:
28 | ruby-version: ${{ matrix.ruby }}
29 | bundler-cache: true
30 |
31 | - name: Database setup
32 | run: bin/rails db:create db:migrate db:test:prepare
33 |
34 | - name: Run tests
35 | run: bundle exec rspec --profile
36 |
37 | - name: On failure, archive screenshots as artifacts
38 | uses: actions/upload-artifact@v4
39 | if: failure()
40 | with:
41 | name: test-failed-screenshots
42 | path: spec/dummy/tmp/screenshots
43 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/plugins/mathml/ui/trumbowyg.mathml.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Trumbowyg v2.31.0 - A lightweight WYSIWYG editor
3 | * Trumbowyg plugin stylesheet
4 | * ------------------------
5 | * @link https://alex-d.github.io/Trumbowyg/
6 | * @license MIT
7 | * @author Alexandre Demode (Alex-D)
8 | * Twitter : @AlexandreDemode
9 | * Website : alex-d.fr
10 | */
11 |
12 | @charset "UTF-8";
13 | [formulas] {
14 | position: relative;
15 | display: inline-block;
16 | pointer-events: none;
17 | }
18 | [formulas][inline=false] {
19 | display: block;
20 | width: 100%;
21 | }
22 | [formulas]::after {
23 | content: "✎";
24 | position: absolute;
25 | top: 0;
26 | right: 0;
27 | bottom: 0;
28 | left: 0;
29 | opacity: 0;
30 | background-color: rgba(255, 255, 255, 0.83);
31 | -webkit-box-shadow: 0 0 5px 5px rgba(255, 255, 255, 0.83);
32 | box-shadow: 0 0 5px 5px rgba(255, 255, 255, 0.83);
33 | cursor: pointer;
34 | pointer-events: auto;
35 | }
36 | [formulas]:hover::after {
37 | opacity: 1;
38 | }
--------------------------------------------------------------------------------
/spec/dummy/app/admin/dashboard.rb:
--------------------------------------------------------------------------------
1 | ActiveAdmin.register_page "Dashboard" do
2 | menu priority: 1, label: proc { I18n.t("active_admin.dashboard") }
3 |
4 | content title: proc { I18n.t("active_admin.dashboard") } do
5 | div class: "blank_slate_container", id: "dashboard_default_message" do
6 | span class: "blank_slate" do
7 | span I18n.t("active_admin.dashboard_welcome.welcome")
8 | small I18n.t("active_admin.dashboard_welcome.call_to_action")
9 | end
10 | end
11 |
12 | # Here is an example of a simple dashboard with columns and panels.
13 | #
14 | # columns do
15 | # column do
16 | # panel "Recent Posts" do
17 | # ul do
18 | # Post.recent(5).map do |post|
19 | # li link_to(post.title, admin_post_path(post))
20 | # end
21 | # end
22 | # end
23 | # end
24 |
25 | # column do
26 | # panel "Info" do
27 | # para "Welcome to ActiveAdmin."
28 | # end
29 | # end
30 | # end
31 | end # content
32 | end
33 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/bg.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * bg.js
3 | * Bulgarian translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Aleksandar Dimitrov
7 | */
8 | jQuery.trumbowyg.langs.bg={viewHTML:"Прегледай HTML",formatting:"Форматиране",p:"Параграф",blockquote:"Цитат",code:"Код",header:"Заглавие",bold:"Удебелен",italic:"Наклонен",strikethrough:"Зачеркнат",underline:"Подчертан",strong:"Удебелен",em:"Наклонен",del:"Зачеркнат",unorderedList:"Обикновен списък",orderedList:"Номериран списък",insertImage:"Добави изображение",insertVideo:"Добави видео",link:"Връзка",createLink:"Създай връзка",unlink:"Премахни връзката",justifyLeft:"Подравни от ляво",justifyCenter:"Центрирай",justifyRight:"Подравни от дясно",justifyFull:"Подравни по ширина",horizontalRule:"Хоризонтална линия",fullscreen:"На цял екран",close:"Затвори",submit:"Впиши",reset:"Отмени",required:"Задължително",description:"Описание",title:"Заглавие",text:"Текст"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/my.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * my.js
3 | * Malaysian translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : JohnPozy
7 | */
8 | jQuery.trumbowyg.langs.id={viewHTML:"Lihat HTML",formatting:"Pemformatan",p:"Perenggan",blockquote:"Blockquote",code:"Kod",header:"Pengepala",bold:"Tebal",italic:"Condong",strikethrough:"Garis batal",underline:"Garis bawah",strong:"Kuat",em:"Condong",del:"Hapus",unorderedList:"Senarai tidak tertib",orderedList:"Senarai tertib",insertImage:"Masukkan imej",insertVideo:"Masukkan video",link:"Pautan",createLink:"Cipta pautan",unlink:"Hapus pautan",justifyLeft:"Mengimbangkan ke kiri",justifyCenter:"Mengimbangkan ke tengah",justifyRight:"Mengimbangkan ke kanan",justifyFull:"Mengimbangkan ke kiri dan kanan",horizontalRule:"Masukkan garis mendatar",fullscreen:"Skrin penuh",close:"Tutup",submit:"Hantar",reset:"Batal",required:"Diperlukan",description:"Perihal",title:"Tajuk",text:"Teks"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/sk.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * sk.js
3 | * Slovak translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : VeeeneX (https://github.com/VeeeneX)
7 | */
8 | jQuery.trumbowyg.langs.sk={viewHTML:"Zobraziť HTML",formatting:"Formátovanie",p:"Paragraf",blockquote:"Citácia",code:"Kód",header:"Nadpis",bold:"Tučné",italic:"Kurzíva",strikethrough:"Preškrtnuté",underline:"Podčiarknuté",strong:"Tučné",em:"Zvýrazniť",del:"Zmazať",unorderedList:"Netriedený zoznam",orderedList:"Triedený zoznam",insertImage:"Vložiť obrázok",insertVideo:"Vložiť video",link:"Odkaz",createLink:"Vložiť odkaz",unlink:"Zmazať odkaz",justifyLeft:"Zarovnať doľava",justifyCenter:"Zarovnať na stred",justifyRight:"Zarovnať doprava",justifyFull:"Zarovnať do bloku",horizontalRule:"Vložit vodorovnú čiaru",fullscreen:"Režim celej obrazovky",close:"Zavrieť",submit:"Potvrdiť",reset:"Zrušiť",required:"Povinné",description:"Popis",title:"Nadpis",text:"Text"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/ua.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * ua.js
3 | * Ukrainian translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Igor Buksha
7 | */
8 | jQuery.trumbowyg.langs.ua={viewHTML:"Подивитись HTML",formatting:"Форматування",p:"Звичайний",blockquote:"Витяг",code:"Код",header:"Заголовок",bold:"Напівжирний",italic:"Курсив",strikethrough:"Закреслений",underline:"Підкреслений",strong:"Напівжирний",em:"Курсив",del:"Закреслений",unorderedList:"Звичайний список",orderedList:"Нумерований список",insertImage:"Вставити зображення",insertVideo:"Вставити відео",link:"Посилання",createLink:"Вставити посилання",unlink:"Видалити посилання",justifyLeft:"По лівому краю",justifyCenter:"В центрі",justifyRight:"По правому краю",justifyFull:"По ширині",horizontalRule:"Горизонтальна лінія",fullscreen:"На весь екран",close:"Закрити",submit:"Вставити",reset:"Скасувати",required:"Обов'язкове",description:"Опис",title:"Підказка",text:"Текст"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/ph.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * ph.js
3 | * Filipino translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : @leogono
7 | */
8 | jQuery.trumbowyg.langs.ph={viewHTML:"Tumingin sa HTML",formatting:"Formatting",p:"Talata",blockquote:"Blockquote",code:"Kowd",header:"Header",bold:"Makapal",italic:"Hilig",strikethrough:"Strikethrough",underline:"Salungguhit",strong:"Malakas",em:"Hilig",del:"Tinanggal",unorderedList:"Hindi nakahanay na listahan",orderedList:"Nakahanay na listahan",insertImage:"Ilagay ang larawan",insertVideo:"Ilagay ang video",link:"Koneksyon",createLink:"Iugnay",unlink:"Tanggalin ang koneksyon",justifyLeft:"Ihanay sa kaliwa",justifyCenter:"Ihanay sa gitna",justifyRight:"Ihanay sa kanan",justifyFull:"Ihanay sa kaliwa at kanan",horizontalRule:"Pahalang na linya",fullscreen:"Fullscreen",close:"Isara",submit:"Ipasa",reset:"I-reset",required:"Kailangan",description:"Paglalarawan",title:"Pamagat",text:"Teksto"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/rs.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * rs.js
3 | * Serbian (Cyrlic) translation for Trumbowyg
4 | * https://www.github.com/johonunu
5 | * ===========================================================
6 | * Author : Nikola Trifunovic (https://www.github.com/johonunu)
7 | */
8 | jQuery.trumbowyg.langs.rs={viewHTML:"Погледај HTML кóд",formatting:"Форматирање",p:"Параграф",blockquote:"Цитат",code:"Кóд",header:"Наслов",bold:"Подебљано",italic:"Курзив",strikethrough:"Прецртано",underline:"Подвучено",strong:"Подебљано",em:"Истакнуто",del:"Обрисано",unorderedList:"Ненабројива листа",orderedList:"Набројива листа",insertImage:"Унеси слику",insertVideo:"Унеси видео",link:"Линк",createLink:"Унеси линк",unlink:"Уклони линк",justifyLeft:"Лево равнање",justifyCenter:"Централно равнање",justifyRight:"Десно равнање",justifyFull:"Обострано равнање",horizontalRule:"Хоризонтална линија",fullscreen:"Режим читавог екрана",close:"Затвори",submit:"Унеси",reset:"Откажи",required:"Обавезно поље",description:"Опис",title:"Наслов",text:"Текст"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/zh_tw.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * zh_tw.js
3 | * Traditional Chinese translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Peter Dave Hello (PeterDaveHello)
7 | * Twitter : @PeterDaveHello
8 | * Github : https://github.com/PeterDaveHello
9 | */
10 | // jshint camelcase:false
11 | jQuery.trumbowyg.langs.zh_tw={viewHTML:"原始碼",undo:"復原",redo:"重做",formatting:"格式",p:"段落",blockquote:"引用",code:"代碼",header:"標題",bold:"加粗",italic:"斜體",strikethrough:"刪除線",underline:"底線",strong:"粗體",em:"斜體",del:"刪除線",superscript:"上標",subscript:"下標",unorderedList:"無序列表",orderedList:"有序列表",insertImage:"插入圖片",insertVideo:"插入影片",link:"超連結",createLink:"插入連結",unlink:"取消連結",justifyLeft:"靠左對齊",justifyCenter:"置中對齊",justifyRight:"靠右對齊",justifyFull:"左右對齊",horizontalRule:"插入分隔線",removeformat:"移除格式",fullscreen:"全螢幕",close:"關閉",submit:"確定",reset:"取消",required:"必需的",description:"描述",title:"標題",text:"文字",target:"目標",width:"寬度"};
--------------------------------------------------------------------------------
/.github/workflows/specs_rails61.yml:
--------------------------------------------------------------------------------
1 | ---
2 | name: Specs Rails 6.1 with ActiveAdmin 2.9
3 |
4 | on:
5 | pull_request:
6 | branches: [main]
7 | push:
8 | branches: [main]
9 |
10 | jobs:
11 | test:
12 | runs-on: ubuntu-latest
13 |
14 | strategy:
15 | matrix:
16 | ruby: ['3.0']
17 |
18 | env:
19 | RAILS_VERSION: 6.0
20 | ACTIVEADMIN_VERSION: 2.9.0
21 |
22 | steps:
23 | - name: Checkout repository
24 | uses: actions/checkout@v4
25 |
26 | - name: Set up Ruby
27 | uses: ruby/setup-ruby@v1
28 | with:
29 | ruby-version: ${{ matrix.ruby }}
30 | bundler-cache: true
31 |
32 | - name: Database setup
33 | run: bin/rails db:create db:migrate db:test:prepare
34 |
35 | - name: Run tests
36 | run: bundle exec rspec --profile
37 |
38 | - name: On failure, archive screenshots as artifacts
39 | uses: actions/upload-artifact@v4
40 | if: failure()
41 | with:
42 | name: test-failed-screenshots
43 | path: spec/dummy/tmp/screenshots
44 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/pl.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * pl.js
3 | * Polish translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Paweł Abramowicz
7 | * Github : https://github.com/pawelabrams
8 | */
9 | jQuery.trumbowyg.langs.pl={viewHTML:"Pokaż HTML",formatting:"Format",p:"Akapit",blockquote:"Cytat",code:"Kod",header:"Nagłówek",bold:"Pogrubienie",italic:"Pochylenie",strikethrough:"Przekreślenie",underline:"Podkreślenie",strong:"Wytłuszczenie",em:"Uwydatnienie",del:"Usunięte",unorderedList:"Lista nieuporządkowana",orderedList:"Lista uporządkowana",insertImage:"Wstaw obraz",insertVideo:"Wstaw film",link:"Link",createLink:"Wstaw link",unlink:"Usuń link",justifyLeft:"Wyrównaj do lewej",justifyCenter:"Wyśrodkuj",justifyRight:"Wyrównaj do prawej",justifyFull:"Wyjustuj",horizontalRule:"Odkreśl linią",fullscreen:"Pełny ekran",close:"Zamknij",submit:"Zastosuj",reset:"Przywróć",required:"Wymagane",description:"Opis",title:"Tytuł",text:"Tekst"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/fa.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * fa.js
3 | * Persian translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Kiarash Soleimanzadeh
7 | * Github : https://github.com/kiyarash
8 | * Email : kiarash.s@hotmail.com
9 | */
10 | jQuery.trumbowyg.langs.fa={_dir:"rtl",viewHTML:"نمایش کد اچ تی ام ال",formatting:"قالب بندی",p:"پاراگراف",blockquote:"نقل قول",code:"کد",header:"سر تیتر",bold:"ضخیم",italic:"مورب",strikethrough:"میان خط دار",underline:"زیر خط دار",strong:"برجسته",em:"مورب",del:"حذف شده",unorderedList:"لیست نامرتب",orderedList:"لیست مرتب",insertImage:"درج تصویر",insertVideo:"درج ویدئو",link:"لینک",createLink:"درج لینک",unlink:"حذف لینک",justifyLeft:"تراز به چپ",justifyCenter:"تراز به وسط",justifyRight:"تراز به راست",justifyFull:"تراز به چپ و راست",horizontalRule:"درج خط افقی",fullscreen:"تمام صفحه",close:"بستن",submit:"تائید",reset:"انصراف",required:"اجباری",description:"توضیحات",title:"عنوان",text:"متن"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/vi.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * vi.js
3 | * Vietnamese translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : heocoi
7 | * Github: https://github.com/heocoi
8 | */
9 | jQuery.trumbowyg.langs.vi={viewHTML:"Hiển thị HTML",formatting:"Định dạng",p:"Đoạn",blockquote:"Trích dẫn",code:"Code",header:"Đầu trang",bold:"In đậm",italic:"In nghiêng",strikethrough:"Gạch ngang",underline:"Gạch chân",strong:"In đậm",em:"In nghiêng",del:"Gạch ngang",unorderedList:"Danh sách không thứ tự",orderedList:"Danh sách có thứ tự",insertImage:"Chèn hình ảnh",insertVideo:"Chèn video",link:"Đường dẫn",createLink:"Tạo đường dẫn",unlink:"Hủy đường dẫn",justifyLeft:"Canh lề trái",justifyCenter:"Canh giữa",justifyRight:"Canh lề phải",justifyFull:"Canh đều",horizontalRule:"Thêm đường kẻ ngang",fullscreen:"Toàn màn hình",close:"Đóng",submit:"Đồng ý",reset:"Hủy bỏ",required:"Bắt buộc",description:"Mô tả",title:"Tiêu đề",text:"Nội dung",target:"Đối tượng"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/fi.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * fi.js
3 | * Finnish translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Teppo Koivula (teppokoivula)
7 | * Github : https://github.com/teppokoivula
8 | */
9 | jQuery.trumbowyg.langs.fi={viewHTML:"Näytä HTML",undo:"Kumoa",redo:"Tee uudelleen",formatting:"Muotoilu",p:"Kappale",blockquote:"Lainaus",code:"Koodi",header:"Otsikko",bold:"Lihavointi",italic:"Kursivointi",strikethrough:"Yliviivaus",underline:"Allevivaus",strong:"Vahvennus",em:"Painotus",del:"Poistettu",unorderedList:"Luettelo",orderedList:"Numeroitu luettelo",insertImage:"Lisää kuva",insertVideo:"Lisää video",link:"Linkki",createLink:"Luo linkki",unlink:"Poista linkki",justifyLeft:"Tasaa vasemmalle",justifyCenter:"Keskitä",justifyRight:"Tasaa oikealle",justifyFull:"Tasaa",horizontalRule:"Vaakaviiva",fullscreen:"Kokoruutu",close:"Sulje",submit:"Lisää",reset:"Palauta",required:"Pakollinen",description:"Kuvaus",title:"Otsikko",text:"Teksti"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/ko.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * ko.js
3 | * Korean translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : SeungWoo Chae (SDuck4)
7 | * Github : https://github.com/SDuck4
8 | * Victor Chanil Park (opdev1004)
9 | * Github : https://github.com/opdev1004
10 | */
11 | jQuery.trumbowyg.langs.ko={viewHTML:"HTML 보기",undo:"되돌리기",redo:"다시 실행",formatting:"스타일",p:"본문",blockquote:"인용문",code:"코드",header:"제목",bold:"진하게",italic:"기울임",strikethrough:"취소선",underline:"밑줄",strong:"중요",em:"강조",del:"삭제",superscript:"위 첨자",subscript:"아래 첨자",unorderedList:"기호 목록",orderedList:"번호 목록",insertImage:"이미지 넣기",insertVideo:"비디오 넣기",link:"링크",createLink:"링크 넣기",unlink:"링크 지우기",justifyLeft:"왼쪽 정렬",justifyCenter:"가운데 정렬",justifyRight:"오른쪽 정렬",justifyFull:"양쪽 정렬",horizontalRule:"구분선 넣기",removeformat:"글꼴 효과 지우기",fullscreen:"전체 화면",close:"닫기",submit:"확인",reset:"취소",required:"필수 입력",description:"설명",title:"툴팁",text:"내용",target:"타겟",width:"너비"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/hr.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * hr.js
3 | * Croatian translation for Trumbowyg
4 | * https://www.github.com/Buda9
5 | * ===========================================================
6 | * Author : Davor Budimir (https://www.github.com/Buda9)
7 | */
8 | // jshint camelcase:false
9 | jQuery.trumbowyg.langs.hr={viewHTML:"Poglеdaj HTML kód",formatting:"Formatiranjе",p:"Odlomak",blockquote:"Citat",code:"Kód",header:"Zaglavlje",bold:"Podеbljano",italic:"Nakošeno",strikethrough:"Prеcrtano",underline:"Podvučеno",strong:"Podеbljano",em:"Istaknuto",del:"Obrisano",unorderedList:"Neuređen popis",orderedList:"Uređen popis",insertImage:"Dodaj sliku",insertVideo:"Dodaj vidеo",link:"Povezica",createLink:"Dodaj povezicu",unlink:"Ukloni povezicu",justifyLeft:"Lijеvo poravnanjе",justifyCenter:"Središnje poravnanjе",justifyRight:"Dеsno poravnanjе",justifyFull:"Obostrano poravnanjе",horizontalRule:"Horizontalna crta",fullscreen:"Puni zaslon",close:"Zatvori",submit:"Unеsi",reset:"Otkaži",required:"Obavеzno poljе",description:"Opis",title:"Naslov",text:"Tеkst"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/plugins/mathml/ui/sass/trumbowyg.mathml.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * Trumbowyg v2.31.0 - A lightweight WYSIWYG editor
3 | * Trumbowyg plugin stylesheet
4 | * ------------------------
5 | * @link https://alex-d.github.io/Trumbowyg/
6 | * @license MIT
7 | * @author Alexandre Demode (Alex-D)
8 | * Twitter : @AlexandreDemode
9 | * Website : alex-d.fr
10 | */
11 |
12 | [formulas] {
13 | position: relative;
14 | display: inline-block;
15 | pointer-events: none;
16 |
17 | &[inline="false"] {
18 | display: block;
19 | width: 100%;
20 | }
21 |
22 | &::after {
23 | content: '\270E';
24 | position: absolute;
25 | top: 0;
26 | right: 0;
27 | bottom: 0;
28 | left: 0;
29 | opacity: 0;
30 | background-color: rgba(255, 255, 255, 0.83);
31 | box-shadow: 0 0 5px 5px rgba(255, 255, 255, 0.83);
32 | cursor: pointer;
33 | pointer-events: auto;
34 | }
35 |
36 | &:hover {
37 | &::after {
38 | opacity: 1;
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2017-2020 Mattia Roccoberton
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining
4 | a copy of this software and associated documentation files (the
5 | "Software"), to deal in the Software without restriction, including
6 | without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to
8 | permit persons to whom the Software is furnished to do so, subject to
9 | the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be
12 | included in all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/rs_latin.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * rs_latin.js
3 | * Serbian (Latin) translation for Trumbowyg
4 | * https://www.github.com/johonunu
5 | * ===========================================================
6 | * Author : Nikola Trifunovic (https://www.github.com/johonunu)
7 | */
8 | // jshint camelcase:false
9 | jQuery.trumbowyg.langs.rs_latin={viewHTML:"Poglеdaj HTML kód",formatting:"Formatiranjе",p:"Paragraf",blockquote:"Citat",code:"Kód",header:"Naslov",bold:"Podеbljano",italic:"Kurziv",strikethrough:"Prеcrtano",underline:"Podvučеno",strong:"Podеbljano",em:"Istaknuto",del:"Obrisano",unorderedList:"Nеnabrojiva lista",orderedList:"Nabrojiva lista",insertImage:"Unеsi sliku",insertVideo:"Unеsi vidеo",link:"Link",createLink:"Unеsi link",unlink:"Ukloni link",justifyLeft:"Lеvo ravnanjе",justifyCenter:"Cеntralno ravnanjе",justifyRight:"Dеsno ravnanjе",justifyFull:"Obostrano ravnanjе",horizontalRule:"Horizontalna linija",fullscreen:"Rеžim čitavog еkrana",close:"Zatvori",submit:"Unеsi",reset:"Otkaži",required:"Obavеzno poljе",description:"Opis",title:"Naslov",text:"Tеkst"};
--------------------------------------------------------------------------------
/spec/dummy/db/migrate/20170806125915_create_active_storage_tables.active_storage.rb:
--------------------------------------------------------------------------------
1 | # This migration comes from active_storage (originally 20170806125915)
2 | class CreateActiveStorageTables < ActiveRecord::Migration[5.2]
3 | def change
4 | create_table :active_storage_blobs do |t|
5 | t.string :key, null: false
6 | t.string :filename, null: false
7 | t.string :content_type
8 | t.text :metadata
9 | t.bigint :byte_size, null: false
10 | t.string :checksum, null: false
11 | t.datetime :created_at, null: false
12 |
13 | t.index [ :key ], unique: true
14 | end
15 |
16 | create_table :active_storage_attachments do |t|
17 | t.string :name, null: false
18 | t.references :record, null: false, polymorphic: true, index: false
19 | t.references :blob, null: false
20 |
21 | t.datetime :created_at, null: false
22 |
23 | t.index [ :record_type, :record_id, :name, :blob_id ], name: "index_active_storage_attachments_uniqueness", unique: true
24 | t.foreign_key :active_storage_blobs, column: :blob_id
25 | end
26 | end
27 | end
28 |
--------------------------------------------------------------------------------
/spec/dummy/bin/setup:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require 'fileutils'
3 |
4 | # path to your application root.
5 | APP_ROOT = File.expand_path('..', __dir__)
6 |
7 | def system!(*args)
8 | system(*args) || abort("\n== Command #{args} failed ==")
9 | end
10 |
11 | FileUtils.chdir APP_ROOT do
12 | # This script is a way to setup or update your development environment automatically.
13 | # This script is idempotent, so that you can run it at anytime and get an expectable outcome.
14 | # Add necessary setup steps to this file.
15 |
16 | puts '== Installing dependencies =='
17 | system! 'gem install bundler --conservative'
18 | system('bundle check') || system!('bundle install')
19 |
20 | # puts "\n== Copying sample files =="
21 | # unless File.exist?('config/database.yml')
22 | # FileUtils.cp 'config/database.yml.sample', 'config/database.yml'
23 | # end
24 |
25 | puts "\n== Preparing database =="
26 | system! 'bin/rails db:prepare'
27 |
28 | puts "\n== Removing old logs and tempfiles =="
29 | system! 'bin/rails log:clear tmp:clear'
30 |
31 | puts "\n== Restarting application server =="
32 | system! 'bin/rails restart'
33 | end
34 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/lt.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * lt.js
3 | * Lithuanian translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Justas Brazauskas
7 | */
8 | jQuery.trumbowyg.langs.lt={viewHTML:"Žiūrėti HTML",formatting:"Formatuoti",p:"Paragrafas",blockquote:"Citata",code:"Kodas",header:"Antraštė",bold:"Paryškinti",italic:"Kursyvuoti",strikethrough:"Perbraukti",underline:"Pabrėžti",strong:"Paryškinti",em:"Pabrėžti",del:"Trinti",unorderedList:"Sąrašas",orderedList:"Numeruotas sąrašas",insertImage:"Pridėti vaizdą",insertVideo:"Pridėti video",link:"Nuoroda",createLink:"Kurti nuorodą",unlink:"Ištrinti nuorodą",justifyLeft:"Lyginti kairėn",justifyCenter:"Lygiuoti Centre",justifyRight:"Lyginti dešinėn",justifyFull:"Centruoti",horizontalRule:"Horizontali linija",fullscreen:"Pilnas ekranas",close:"Uždaryti",submit:"Siųsti",reset:"Atšaukti",required:"Privaloma",description:"Aprašymas",title:"Pavadinimas",text:"Tekstas",removeformat:"Pašalinti formatavimą",superscript:"Viršutinis indeksas",subscript:"Apatinis indeksas"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/es_ar.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * es_ar.js
3 | * Spanish (Argentina) translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Félix Vera
7 | * Email : felix.vera@gmail.com
8 | */
9 | // jshint camelcase:false
10 | jQuery.trumbowyg.langs.es_ar={viewHTML:"Ver HTML",formatting:"Formato",p:"Párrafo",blockquote:"Cita",code:"Código",header:"Título",bold:"Negrita",italic:"Itálica",strikethrough:"Tachado",underline:"Subrayado",strong:"Fuere",em:"Énfasis",del:"Borrar",unorderedList:"Lista Desordenada",orderedList:"Lista Ordenada",insertImage:"Insertar una imagen",insertVideo:"Insertar un video",link:"Vínculo",createLink:"Insertar un vínculo",unlink:"Suprimir un vínculo",justifyLeft:"Alinear a la Izquierda",justifyCenter:"Centrar",justifyRight:"Alinear a la Derecha",justifyFull:"Justificado",horizontalRule:"Insertar separado Horizontal",fullscreen:"Pantalla Completa",close:"Cerrar",submit:"Enviar",reset:"Cancelar",required:"Obligatorio",description:"Descripción",title:"Título",text:"Texto"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/mn.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * mn.js
3 | * Mongolian translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Ganbayar.B (ganbayar13)
7 | */
8 | jQuery.trumbowyg.langs.mn={viewHTML:"HTML харах",undo:"Буцаах",redo:"Дахих",formatting:"Формат",p:"Догол мөр",blockquote:"Ишлэл",code:"Код",header:"Гарчиг",bold:"Тод",italic:"Налуу",strikethrough:"Дундуур зураас",underline:"Доогуур зураас",strong:"Тод",em:"Налуу",del:"Дундуур зураас",superscript:"Дээд индекс",subscript:"Доод индекс",unorderedList:"Дугаарлаагүй жагсаалт",orderedList:"Дугаарласан жагсаалт",insertImage:"Зураг оруулах",insertVideo:"Видео оруулах",link:"Холбоос",createLink:"Холбоос үүсгэх",unlink:"Холбоос цуцлах",justifyLeft:"Зүүн тийш шахах",justifyCenter:"Голлуулах",justifyRight:"Баруун Баруун тийш шахах",justifyFull:"Тэгшитгэх",horizontalRule:"Хөндлөн шугам",removeformat:"Формат арилгах",fullscreen:"Дэлгэц дүүргэх",close:"Хаах",submit:"Оруулах",reset:"Цуцлах",required:"Шаардлагатай",description:"Тайлбар",title:"Гарчиг",text:"Текст",target:"Бай"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/bn.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * bn.js
3 | * Bangla translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Ahammad Naim
7 | * Website : https://github.com/AhammadNaim
8 | */
9 | jQuery.trumbowyg.langs.bn={viewHTML:"HTML দেখান",undo:"পূর্বাবস্থায় ফিরুন",redo:"পুনরায় করুন",formatting:"বিন্যাস",p:"অনুচ্ছেদ",blockquote:"উদ্ধৃতি",code:"কোড",header:"শিরোনাম",bold:"বোল্ড",italic:"ইটালিক",strikethrough:"স্ট্রাইকথ্রু",underline:"আন্ডারলাইন",strong:"বোল্ড",em:"ইটালিক",del:"স্ট্রাইকথ্রু",superscript:"সুপারস্ক্রিপ্ট",subscript:"সাবস্ক্রিপ্ট",unorderedList:"অসংখ্যায়িত তালিকা",orderedList:"সাজানো তালিকা",insertImage:"ছবি",link:"লিংক",createLink:"লিংক তৈরি করুন",unlink:"লিংক মুছুন",justifyLeft:"বামে জাস্টিফাইড",justifyCenter:"কেন্দ্রীভূত",justifyRight:"ডানে জাস্টিফাইড",justifyFull:"জাস্টিফাইড",horizontalRule:"আনুভূমিক দাগ",removeformat:"বিন্যাস অপসারণ করুন",fullscreen:"সম্পূর্ণ পর্দায় দেখুন",close:"বন্ধ",submit:"প্রেরণ",reset:"বাতিল",required:"আবশ্যক",description:"বর্ননা",title:"শিরোনাম",text:"পাঠ্য",target:"লক্ষ্য"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/sv.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * sv.js
3 | * Swedish translation for Trumbowyg
4 | * http://www.tim-international.net
5 | * ===========================================================
6 | * Author : T. Almroth
7 | * Github : https://github.com/timint
8 | *
9 | * Review : M Hagberg
10 | * Github : https://github.com/pestbarn
11 | */
12 | jQuery.trumbowyg.langs.sv={viewHTML:"Visa HTML",formatting:"Formatering",p:"Paragraf",blockquote:"Citat",code:"Kod",header:"Rubrik",bold:"Fet",italic:"Kursiv",strikethrough:"Genomstruken",underline:"Understruken",strong:"Fet",em:"Kursiv",del:"Rensa formatering",unorderedList:"Punktlista",orderedList:"Numrerad lista",insertImage:"Infoga bild",insertVideo:"Infoga video",link:"Länk",createLink:"Infoga länk",unlink:"Ta bort länk",justifyLeft:"Vänsterjustera",justifyCenter:"Centrera",justifyRight:"Högerjustera",justifyFull:"Marginaljustera",horizontalRule:"Horisontell linje",removeformat:"Ta bort formatering",fullscreen:"Fullskärm",close:"Stäng",submit:"Bekräfta",reset:"Återställ",required:"Obligatorisk",description:"Beskrivning",title:"Titel",text:"Text"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/by.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * by.js
3 | * Belarusian translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Yury Karalkou
7 | */
8 | jQuery.trumbowyg.langs.by={viewHTML:"Паглядзець HTML",undo:"Скасаваць",redo:"Паўтарыць",formatting:"Фарматаванне",p:"Звычайны",blockquote:"Цытата",code:"Код",header:"Загаловак",bold:"Паўтлусты",italic:"Курсіў",strikethrough:"Закрэслены",underline:"Падкрэслены",strong:"Паўтлусты",em:"Курсіў",del:"Закрэслены",superscript:"Верхні індэкс",subscript:"Індэкс",unorderedList:"Звычайны спіс",orderedList:"Нумараваны спіс",insertImage:"Уставіць выяву",insertVideo:"Уставіць відэа",link:"Спасылка",createLink:"Уставіць спасылку",unlink:"Выдаліць спасылку",justifyLeft:"Па леваму боку",justifyCenter:"У цэнтры",justifyRight:"Па праваму боку",justifyFull:"Па шырыні",horizontalRule:"Гарызантальная лінія",removeformat:"Ачысціць фарматаванне",fullscreen:"На ўвесь экран",close:"Зачыніць",submit:"Уставіць",reset:"Скасаваць",required:"Абавязкова",description:"Апісанне",title:"Падказка",text:"Тэкст"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/hu.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * hu.js
3 | * Hungarian translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Peter MATO
7 | * Web: http://fixme.hu
8 | * GitHub: https://github.com/matopeter
9 | */
10 | jQuery.trumbowyg.langs.hu={viewHTML:"HTML nézet",undo:"Visszavon",redo:"Visszállít",formatting:"Stílusok",p:"Bekezdés",blockquote:"Idézet",code:"Kód",header:"Címsor",bold:"Félkövér",italic:"Dőlt",strikethrough:"Áthúzott",underline:"Aláhúzott",strong:"Vastag",em:"Kiemelt",del:"Törölt",unorderedList:"Felsorolás",orderedList:"Számozás",insertImage:"Kép beszúrása",insertVideo:"Video beszúrása",link:"Link",createLink:"Link létrehozása",unlink:"Link eltávolítása",justifyLeft:"Balra igazítás",justifyCenter:"Középre igazítás",justifyRight:"Jobbra igazítás",justifyFull:"Sorkizárt",horizontalRule:"Vízszintes vonal",fullscreen:"Teljes képernyő",close:"Bezár",submit:"Beküldés",reset:"Alaphelyzet",required:"Kötelező",description:"Leírás",title:"Cím",text:"Szöveg",removeformat:"Formázás eltávolítása"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/nl.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * nl.js
3 | * Dutch translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Danny Hiemstra
7 | * Github : https://github.com/dhiemstra
8 | */
9 | jQuery.trumbowyg.langs.nl={viewHTML:"HTML bekijken",undo:"Ongedaan maken",redo:"Opnieuw",formatting:"Opmaak",p:"Paragraaf",blockquote:"Citaat",code:"Code",header:"Kop",bold:"Vet",italic:"Cursief",strikethrough:"Doorhalen",underline:"Onderlijnen",strong:"Sterk",em:"Nadruk",del:"Verwijderd",unorderedList:"Ongenummerde lijst",orderedList:"Genummerde lijst",insertImage:"Afbeelding invoegen",insertVideo:"Video invoegen",link:"Link",createLink:"Link maken",unlink:"Link verwijderen",justifyLeft:"Links uitlijnen",justifyCenter:"Centreren",justifyRight:"Rechts uitlijnen",justifyFull:"Uitvullen",horizontalRule:"Horizontale lijn",removeFormat:"Opmaak verwijderen",fullscreen:"Volledig scherm",close:"Sluiten",submit:"Opslaan",reset:"Annuleren",required:"Verplicht",description:"Omschrijving",title:"Titel",text:"Tekst",target:"Doel",width:"Breedte"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/ru.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * ru.js
3 | * Russian translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Yuri Lya
7 | */
8 | jQuery.trumbowyg.langs.ru={viewHTML:"Посмотреть HTML",undo:"Отменить",redo:"Повторить",formatting:"Форматирование",p:"Обычный",blockquote:"Цитата",code:"Код",header:"Заголовок",bold:"Полужирный",italic:"Курсив",strikethrough:"Зачеркнутый",underline:"Подчеркнутый",strong:"Полужирный",em:"Курсив",del:"Зачеркнутый",superscript:"Надстрочный",subscript:"Подстрочный",unorderedList:"Обычный список",orderedList:"Нумерованный список",insertImage:"Вставить изображение",insertVideo:"Вставить видео",link:"Ссылка",createLink:"Вставить ссылку",unlink:"Удалить ссылку",justifyLeft:"По левому краю",justifyCenter:"По центру",justifyRight:"По правому краю",justifyFull:"По ширине",horizontalRule:"Горизонтальная линия",removeformat:"Очистить форматирование",fullscreen:"Во весь экран",close:"Закрыть",submit:"Вставить",reset:"Отменить",required:"Обязательное",description:"Описание",title:"Подсказка",text:"Текст"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/sq.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * sq.js
3 | * Albanian translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Adalen Vladi
7 | */
8 | jQuery.trumbowyg.langs.sq={viewHTML:"Shfaq HTML",undo:"Prish",redo:"Ribej",formatting:"Formatimi",p:"Paragraf",blockquote:"Citat",code:"Kodi",header:"Koka",bold:"Spikatur",italic:"Pjerret",strikethrough:"Vize ne mes",underline:"Nenvizo",strong:"I trashe",em:"I theksuar",del:"I fshire",superscript:"Indeks i sipërm",subscript:"Indeks i poshtem",unorderedList:"Liste e parenditur",orderedList:"Liste e renditur",insertImage:"Fut Foto",insertVideo:"Fut Video",link:"Link",createLink:"Krijo Link",unlink:"Hiq Link",justifyLeft:"Drejto Majtas",justifyCenter:"Drejto ne Qender",justifyRight:"Drejto Djathtas",justifyFull:"Drejto Vete",horizontalRule:"Vendos rregulloren horizontale",removeformat:"Hiq formatin",fullscreen:"Ekran i plotë",close:"Mbyll",submit:"Konfirmo",reset:"Anullo",required:"I detyrueshem",description:"Pershkrimi",title:"Titulli",text:"Tekst",target:"Objektivi",width:"Gjeresia"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/az.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * az.js
3 | * Azerbaijani translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Qalib Qurbanov
7 | * Github : https://github.com/qalibqurbanov
8 | */
9 | jQuery.trumbowyg.langs.az={viewHTML:"HTML Kodu",formatting:"Formatlama",p:"Abzas",blockquote:"Sitat",code:"Kod",header:"Başlıq",undo:"Geri al",redo:"İrəli al",superscript:"Sözüstü",subscript:"Sözaltı",bold:"Qalın",italic:"İtalik",strikethrough:"Üzeri xəttli",underline:"Altı xəttli",strong:"Qalın",em:"Vurğulu",del:"Üzəri xəttli",unorderedList:"İşarələnmiş siyahı",orderedList:"Nömrələnmiş siyahı",insertImage:"Şəkil yerləşdir",insertVideo:"Video yerləşdir",link:"Link",createLink:"Link yerləşdir",unlink:"Linki sil",justifyLeft:"Sola nizamla",justifyCenter:"Ortaya nizamla",justifyRight:"Sağa nizamla",justifyFull:"Üfüqi nizamla",horizontalRule:"Üfüqi xətt əlavə et",fullscreen:"Tam ekran",close:"Bağla",submit:"Təsdiq et",reset:"Sıfırla",required:"Vacib",description:"Açıqlama",title:"Başlıq",text:"Mətn",removeformat:"Formatlamanı təmizlə"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/id.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * id.js
3 | * Indonesian translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Rezha Julio (kimiamania)
7 | * Twitter : @kimiamania
8 | * Website : http://rezhajulio.web.id
9 | * Github : https://github.com/kimiamania
10 | */
11 | jQuery.trumbowyg.langs.id={viewHTML:"Lihat HTML",formatting:"Penyusunan",p:"Paragraf",blockquote:"Kutipan",code:"Kode",header:"Kepala",bold:"Tebal",italic:"Miring",strikethrough:"Coret",underline:"Garis bawah",strong:"Tebal",em:"Miring",del:"Dicoret",unorderedList:"Daftar tak teratur",orderedList:"Daftar teratur",insertImage:"Sisipkan gambar",insertVideo:"Sisipkan video",link:"Tautan",createLink:"Sisipkan Tautan",unlink:"Singkirkan tautan",justifyLeft:"Rata kiri",justifyCenter:"Rata Tengah",justifyRight:"Rata kanan",justifyFull:"Rata kiri dan kanan",horizontalRule:"Sisipkan garis mendatar",fullscreen:"Layar penuh",close:"Tutup",submit:"Setuju",reset:"Batal",required:"Diperlukan",description:"Deskripsi",title:"Judul",text:"Teks"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/cs.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * cs.js
3 | * Czech translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Jan Svoboda (https://github.com/svoboda-jan)
7 | */
8 | jQuery.trumbowyg.langs.cs={viewHTML:"Zobrazit HTML",redo:"Vpřed",undo:"Zpět",formatting:"Formátování",p:"Odstavec",blockquote:"Citace",code:"Kód",header:"Nadpis",bold:"Tučné",italic:"Kurzíva",strikethrough:"Přeškrtnuté",underline:"Podtržené",strong:"Tučné",em:"Zvýraznit",del:"Přeškrtnuté",superscript:"Horní index",subscript:"Dolní index",unorderedList:"Netříděný seznam",orderedList:"Tříděný seznam",insertImage:"Vložit obrázek",insertVideo:"Vložit video",link:"Odkaz",createLink:"Vložit odkaz",unlink:"Smazat odkaz",justifyLeft:"Zarovnat doleva",justifyCenter:"Zarovnat na střed",justifyRight:"Zarovnat doprava",justifyFull:"Zarovnat do bloku",horizontalRule:"Vložit vodorovnou čáru",removeformat:"Vymazat formátování",fullscreen:"Režim celé obrazovky",close:"Zavřít",submit:"Potvrdit",reset:"Zrušit",required:"Povinné",description:"Popis",title:"Nadpis",text:"Text",target:"Cíl"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/da.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * da.js
3 | * Danish translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Christian Pedersen
7 | * Github : https://github.com/chripede
8 | */
9 | jQuery.trumbowyg.langs.da={viewHTML:"Vis HTML",undo:"Fortryd",redo:"Anuller fortryd",formatting:"Formattering",p:"Afsnit",blockquote:"Citat",code:"Kode",header:"Overskrift",bold:"Fed",italic:"Kursiv",strikethrough:"Gennemstreg",underline:"Understreg",strong:"Vigtig",em:"Fremhæv",del:"Slettet",superscript:"Hævet skrift",subscript:"Sænket skrift",unorderedList:"Uordnet liste",orderedList:"Ordnet liste",insertImage:"Indsæt billede",insertVideo:"Indsæt video",link:"Link",createLink:"Indsæt link",unlink:"Fjern link",justifyLeft:"Venstrestil",justifyCenter:"Centrer",justifyRight:"Højrestil",justifyFull:"Lige margener",horizontalRule:"Horisontal linie",removeformat:"Ryd formattering",fullscreen:"Fuld skærm",close:"Luk",submit:"Bekræft",reset:"Annuller",required:"Påkrævet",description:"Beskrivelse",title:"Titel",text:"Tekst",target:"Mål",width:"Bredde"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/it.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * it.js
3 | * Italian translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Mirko Buffoni
7 | */
8 | jQuery.trumbowyg.langs.it={viewHTML:"Mostra HTML",undo:"Annulla",redo:"Ripeti",formatting:"Formattazione",p:"Paragrafo",blockquote:"Citazione",code:"Codice",header:"Intestazione",bold:"Grassetto",italic:"Italico",strikethrough:"Barrato",underline:"Sottolineato",strong:"Rafforza",em:"Enfatizza",del:"Cancella",unorderedList:"Elenco puntato",orderedList:"Elenco numerato",insertImage:"Inserisci immagine",insertVideo:"Inserisci video",link:"Collegamento",createLink:"Crea un collegamento",unlink:"Elimina collegamento",justifyLeft:"Allinea a sinistra",justifyCenter:"Centra",justifyRight:"Allinea a destra",justifyFull:"Giustifica",horizontalRule:"Inserisci un separatore orizzontale",fullscreen:"Schermo intero",close:"Chiudi",submit:"Invia",reset:"Annulla",required:"Obbligatorio",description:"Descrizione",title:"Titolo",text:"Testo",removeformat:"Rimuovi Formattazione",superscript:"Apice",subscript:"Pedice"};
--------------------------------------------------------------------------------
/spec/dummy/app/models/post.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | class Post < ApplicationRecord
4 | if Gem::Version.new(Rails.version) >= Gem::Version.new('8.0')
5 | enum :state, %i[available unavailable arriving]
6 | else
7 | enum state: %i[available unavailable arriving]
8 | end
9 |
10 | belongs_to :author, inverse_of: :posts, autosave: true
11 |
12 | has_one :author_profile, through: :author, source: :profile
13 |
14 | has_many :post_tags, inverse_of: :post, dependent: :destroy
15 | has_many :tags, through: :post_tags
16 |
17 | validates :title, allow_blank: false, presence: true
18 |
19 | scope :published, -> { where(published: true) }
20 | scope :recents, -> { where('created_at > ?', Date.today - 8.month) }
21 |
22 | def short_title
23 | title.truncate 10
24 | end
25 |
26 | def upper_title
27 | title.upcase
28 | end
29 |
30 | class << self
31 | def ransackable_associations(auth_object = nil)
32 | %w[author author_profile post_tags tags]
33 | end
34 |
35 | def ransackable_attributes(auth_object = nil)
36 | %w[author_id category created_at description dt id position published title updated_at]
37 | end
38 | end
39 | end
40 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/es.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * es.js
3 | * Spanish translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Moisés Márquez
7 | * Email : moises.marquez.g@gmail.com
8 | */
9 | jQuery.trumbowyg.langs.es={viewHTML:"Ver HTML",undo:"Deshacer",redo:"Rehacer",formatting:"Formato",p:"Párrafo",blockquote:"Cita",code:"Código",header:"Título",bold:"Negrita",italic:"Cursiva",strikethrough:"Tachado",underline:"Subrayado",strong:"Negrita",em:"Énfasis",del:"Borrar",superscript:"Sobrescrito",subscript:"Subíndice",unorderedList:"Lista Desordenada",orderedList:"Lista Ordenada",insertImage:"Insertar una imagen",insertVideo:"Insertar un vídeo",link:"Enlace",createLink:"Insertar un enlace",unlink:"Suprimir un enlace",justifyLeft:"Izquierda",justifyCenter:"Centrar",justifyRight:"Derecha",justifyFull:"Justificado",horizontalRule:"Insertar separador horizontal",removeformat:"Eliminar formato",fullscreen:"Pantalla completa",close:"Cerrar",submit:"Enviar",reset:"Cancelar",required:"Obligatorio",description:"Descripción",title:"Título",text:"Texto",target:"Target"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/ar.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * ar.js
3 | * Arabic translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Abo Mokh ahmed (abomokhahmed)
7 | * Github : https://github.com/abomokhahmed
8 | * Reviewed by : Abdellah Chadidi (chadidi)
9 | * Github : https://github.com/chadidi
10 | */
11 | jQuery.trumbowyg.langs.ar={_dir:"rtl",viewHTML:"إعرض-HTML",undo:"تراجع",redo:"إعادة",formatting:"تنسيق",p:"فقرة",blockquote:"اقتباس",code:"كود",header:"رأس",bold:"عريض",italic:"مائل",strikethrough:"مشطوب",underline:"خطّ سفلي",strong:"بارز",em:"تغميق",del:"حذف",superscript:"الأس",subscript:"أس سفلي",unorderedList:"قائمة غير مرتّبة",orderedList:"قائمة مرتّبة",insertImage:"إدراج صورة",insertVideo:"إدراج فيديو",link:"رابط",createLink:"انشاء رابط",unlink:"حذف رابط",justifyLeft:"تصحيح للشمال",justifyCenter:"توسيط",justifyRight:"تصحيح لليمين",justifyFull:"تصحيح لكلا الإتّجاهين",horizontalRule:"إدراج خطّ أفقي",fullscreen:"ملء الشاشة",close:"إغلاق",submit:"إرسال",reset:"إعادة تعيين",required:"إلزامي",description:"وصف",title:"عنوان",text:"نصّ",target:"الهدف"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/sl.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * sl.js
3 | * Slovenian translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author: Matjaz Zavski (https://github.com/matjaz321)
7 | * Mod: Uros Gaber (uros@powercom.si)
8 | */
9 | jQuery.trumbowyg.langs.sl={viewHTML:"Prikaži HTML",undo:"Razveljavi",redo:"Ponovno uveljavi",formatting:"Oblika",p:"Odstavek",blockquote:"Citat",code:"Koda",header:"Glava",bold:"Krepko",italic:"Ležeče",strikethrough:"Prečrtano",underline:"Podčrtano",strong:"Odebljeno",em:"Poudarjeno",del:"Izbrisano",unorderedList:"Neoštevilčen seznam",orderedList:"Oštevilčen seznam",image:"Slika",insertImage:"Vstavi sliko",insertVideo:"Vstavi video",link:"Povezava",createLink:"Vstavi povezavo",unlink:"Odstrani povezavo",justifyLeft:"Poravnava levo",justifyCenter:"Poravnaj na sredino",justifyRight:"Poravnava desno",justifyFull:"Obojestranska poravnava",horizontalRule:"Vstavite vodoravno črto",removeformat:"Odstrani format",fullscreen:"Celozaslonski način",close:"Zapri",submit:"Potrdi",reset:"Prekliči",required:"Zahtevano",description:"Opis",title:"Naslov",text:"Besedilo"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/et.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * et.js
3 | * Estonian translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Mart Leib
7 | * Web: https://voogle.ee
8 | */
9 | jQuery.trumbowyg.langs.et={viewHTML:"HTML vaade",undo:"Võta tagasi",redo:"Tee uuesti",formatting:"Vorming",p:"Lõik",blockquote:"Plokktsitaat",code:"Kood",header:"Pealkiri",bold:"Paks",italic:"Kaldkiri",strikethrough:"Läbikriipsutatud",underline:"Allakriipsutatud",strong:"Tugev rõhutus",em:"Rõhutus",del:"Eemaldatud",superscript:"Ülemine indeks",subscript:"Alumine indeks",unorderedList:"Järjestamata loend",orderedList:"Järjestatud loend",insertImage:"Lisa pilt",insertVideo:"Lisa video",link:"Link",createLink:"Lisa link",unlink:"Eemalda link",justifyLeft:"Joonda vasakule",justifyCenter:"Joonda keskele",justifyRight:"Joonda paremale",justifyFull:"Joonda rööpselt",horizontalRule:"Horisontaaljoon",removeformat:"Eemalda vorming",fullscreen:"Täisekraan",close:"Sulge",submit:"Salvesta",reset:"Tühista",required:"Kohustuslik",description:"Kirjeldus",title:"Pealkiri",text:"Tekst",target:"Sihtmärk",width:"Laius"};
--------------------------------------------------------------------------------
/activeadmin_trumbowyg.gemspec:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | lib = File.expand_path('lib', __dir__)
4 | $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5 | require 'activeadmin/trumbowyg/version'
6 |
7 | Gem::Specification.new do |spec|
8 | spec.name = 'activeadmin_trumbowyg'
9 | spec.version = ActiveAdmin::Trumbowyg::VERSION
10 | spec.summary = 'Trumbowyg Editor for ActiveAdmin'
11 | spec.description = 'An Active Admin plugin to use Trumbowyg Editor'
12 | spec.license = 'MIT'
13 | spec.authors = ['Mattia Roccoberton']
14 | spec.email = 'mat@blocknot.es'
15 | spec.homepage = 'https://github.com/blocknotes/activeadmin_trumbowyg'
16 |
17 | spec.required_ruby_version = '>= 3.0'
18 |
19 | spec.metadata['homepage_uri'] = spec.homepage
20 | spec.metadata['changelog_uri'] = 'https://github.com/blocknotes/activeadmin_trumbowyg/blob/main/CHANGELOG.md'
21 | spec.metadata['source_code_uri'] = spec.homepage
22 |
23 | spec.metadata['rubygems_mfa_required'] = 'true'
24 |
25 | spec.files = Dir['{app,lib}/**/*', 'LICENSE.txt', 'Rakefile', 'README.md']
26 | spec.require_paths = ['lib']
27 |
28 | spec.add_dependency 'activeadmin', '>= 2.9.0'
29 | end
30 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/tr.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * tr.js
3 | * Turkish translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Emrah Bilbay (munzur)
7 | * Github : https://github.com/munzur
8 | *
9 | * Özgür Görgülü (ozgurg)
10 | * Github : https://github.com/ozgurg
11 | */
12 | jQuery.trumbowyg.langs.tr={viewHTML:"HTML Kodu",undo:"Yinele",redo:"Geri al",formatting:"Biçimlendirme",p:"Paragraf",blockquote:"Alıntı",code:"Kod",header:"Başlık",bold:"Kalın",italic:"İtalik",strikethrough:"Üzeri çizgili",underline:"Altı çizgili",strong:"Koyu",em:"Vurgulu",del:"Üzeri çizgili",unorderedList:"Simgeli liste",orderedList:"Numaralı liste",insertImage:"Resim yerleştir",insertVideo:"Video yerleştir",link:"Link",createLink:"Link yerleştir",unlink:"Linki sil",justifyLeft:"Sola hizala",justifyCenter:"Ortaya hizala",justifyRight:"Sağa hizala",justifyFull:"Yasla",horizontalRule:"Yatay satır ekle",fullscreen:"Tam ekran",close:"Kapat",submit:"Onayla",reset:"Sıfırla",required:"Gerekli",description:"Açıklama",title:"Başlık",text:"Metin",removeformat:"Biçimlendirmeyi temizle"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/ro.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * ro.js
3 | * Romanian translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Vladut Radulescu (pacMakaveli)
7 | * Email: pacMakaveli90@gmail.com
8 | * Twitter : @pacMakaveli90
9 | * Website : creative-studio51.co.uk
10 | * Github : https://github.com/pacMakaveli
11 | */
12 | jQuery.trumbowyg.langs.ro={viewHTML:"Vizualizare HTML",formatting:"Format",p:"Paragraf",blockquote:"Citație",code:"Cod",header:"Titlu",bold:"Bold",italic:"Italic",strikethrough:"Tăiat",underline:"Subliniat",strong:"Puternic",em:"Accentuat",del:"Sterge",unorderedList:"Lista dezordonată",orderedList:"Liste ordonată",insertImage:"Adăugare Imagine",insertVideo:"Adăugare Video",link:"Link",createLink:"Crează link",unlink:"Remover link",justifyLeft:"Aliniază stânga",justifyCenter:"Aliniază centru",justifyRight:"Aliniază dreapta",justifyFull:"Justificare",horizontalRule:"Linie orizontală",fullscreen:"Tot ecranul",close:"Închide",submit:"Procesează",reset:"Resetează",required:"Obligatoriu",description:"Descriere",title:"Titlu",text:"Text"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/plugins/emoji/ui/trumbowyg.emoji.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Trumbowyg v2.31.0 - A lightweight WYSIWYG editor
3 | * Trumbowyg plugin stylesheet
4 | * ------------------------
5 | * @link https://alex-d.github.io/Trumbowyg/
6 | * @license MIT
7 | * @author Alexandre Demode (Alex-D)
8 | * Twitter : @AlexandreDemode
9 | * Website : alex-d.fr
10 | */
11 |
12 | .trumbowyg-dropdown-emoji {
13 | width: 265px;
14 | padding: 7px 0 7px 5px;
15 | }
16 |
17 | .trumbowyg-dropdown-emoji svg {
18 | display: none !important;
19 | }
20 |
21 | .trumbowyg-dropdown-emoji button {
22 | display: block;
23 | position: relative;
24 | float: left;
25 | height: 26px;
26 | width: 26px;
27 | padding: 0;
28 | margin: 2px;
29 | line-height: 24px;
30 | text-align: center;
31 | }
32 | .trumbowyg-dropdown-emoji button:hover::after, .trumbowyg-dropdown-emoji button:focus::after {
33 | display: block;
34 | position: absolute;
35 | top: -5px;
36 | left: -5px;
37 | height: 27px;
38 | width: 27px;
39 | background: inherit;
40 | -webkit-box-shadow: #000 0 0 2px;
41 | box-shadow: #000 0 0 2px;
42 | z-index: 10;
43 | background-color: transparent;
44 | }
45 |
46 | .trumbowyg .emoji {
47 | width: 22px;
48 | height: 22px;
49 | display: inline-block;
50 | }
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/pt.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * pt.js
3 | * Portuguese translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Ramiro Varandas Jr (ramirovjr)
7 | * Twitter : @ramirovjnr
8 | * Website : about.me/ramirovjnr
9 | * Github : https://github.com/ramirovjr
10 | */
11 | jQuery.trumbowyg.langs.pt={viewHTML:"Ver HTML",undo:"Desfazer",redo:"Refazer",formatting:"Formatar",p:"Paragráfo",blockquote:"Citação",code:"Código",header:"Título",bold:"Negrito",italic:"Itálico",strikethrough:"Suprimir",underline:"Sublinhado",strong:"Negrito",em:"Ênfase",del:"Apagar",superscript:"Sobrescrito",subscript:"Subscrito",unorderedList:"Lista não ordenada",orderedList:"Lista ordenada",insertImage:"Inserir imagem",insertVideo:"Inserir vídeo",link:"Link",createLink:"Criar um link",unlink:"Remover link",justifyLeft:"Alinhar a esquerda",justifyCenter:"Centralizar",justifyRight:"Alinhar a direita",justifyFull:"Justificar",horizontalRule:"Inserir separador horizontal",removeformat:"Remover formatação",fullscreen:"Tela cheia",close:"Fechar",submit:"Enviar",reset:"Limpar",required:"Obrigatório",description:"Descrição",title:"Título",text:"Texto",target:"Target"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/pt_br.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * pt_br.js
3 | * Portuguese Brazilian translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Alex Gotardi (alexgotardi)
7 | * Twitter : @alexgotardi
8 | * Github : https://github.com/alexgotardi
9 | */
10 | // jshint camelcase:false
11 | jQuery.trumbowyg.langs.pt_br={viewHTML:"Ver HTML",undo:"Desfazer",redo:"Refazer",formatting:"Formatar",p:"Parágrafo",blockquote:"Citação",code:"Código",header:"Título",bold:"Negrito",italic:"Itálico",strikethrough:"Tachado",underline:"Sublinhado",strong:"Negrito",em:"Ênfase",del:"Apagar",superscript:"Sobrescrito",subscript:"Subscrito",unorderedList:"Lista não ordenada",orderedList:"Lista ordenada",insertImage:"Inserir imagem",insertVideo:"Inserir vídeo",link:"Link",createLink:"Criar um link",unlink:"Remover link",justifyLeft:"Alinhar a esquerda",justifyCenter:"Centralizar",justifyRight:"Alinhar a direita",justifyFull:"Justificar",horizontalRule:"Inserir separador horizontal",removeformat:"Remover formatação",fullscreen:"Tela cheia",close:"Fechar",submit:"Enviar",reset:"Limpar",required:"Obrigatório",description:"Descrição",title:"Título",text:"Texto",target:"Alvo"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/de.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * de.js
3 | * German translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Manfred Timm, johangroe
7 | * Github : https://github.com/Manfred62, https://github.com/johangroe
8 | */
9 | jQuery.trumbowyg.langs.de={viewHTML:"HTML anzeigen",undo:"Rückgängig",redo:"Wiederholen",formatting:"Formatierung",p:"Absatz",blockquote:"Zitat",code:"Code",header:"Überschrift",bold:"Fett",italic:"Kursiv",strikethrough:"Durchgestrichen",underline:"Unterstrichen",strong:"Wichtig",em:"Betont",del:"Gelöscht",superscript:"Hochgestellt",subscript:"Tiefgestellt",unorderedList:"Ungeordnete Liste",orderedList:"Geordnete Liste",image:"Bild",insertImage:"Bild einfügen",insertVideo:"Video einfügen",link:"Link",createLink:"Link einfügen",unlink:"Link entfernen",_self:"Gleicher Tab (Standard)",_blank:"Neuer Tab",justifyLeft:"Links ausrichten",justifyCenter:"Zentrieren",justifyRight:"Rechts ausrichten",justifyFull:"Blocksatz",horizontalRule:"Horizontale Linie einfügen",removeformat:"Formatierung entfernen",fullscreen:"Vollbild",close:"Schließen",submit:"Bestätigen",reset:"Abbrechen",required:"Erforderlich",description:"Beschreibung",title:"Titel",text:"Text"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/plugins/pasteembed/trumbowyg.pasteembed.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * trumbowyg.pasteembed.js v1.0
3 | * Url paste to iframe with noembed. Plugin for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Max Seelig
7 | * Facebook : https://facebook.com/maxse
8 | * Website : https://www.maxmade.nl/
9 | */
10 | !function(e){"use strict";var t={enabled:!0,endpoint:"https://noembed.com/embed?nowrap=on"};e.extend(!0,e.trumbowyg,{plugins:{pasteEmbed:{init:function(n){n.o.plugins.pasteEmbed=e.extend(!0,{},t,n.o.plugins.pasteEmbed||{}),Array.isArray(n.o.plugins.pasteEmbed.endpoints)&&(n.o.plugins.pasteEmbed.endpoint=n.o.plugins.pasteEmbed.endpoints[0]),n.o.plugins.pasteEmbed.enabled&&n.pasteHandlers.push((function(t){try{var a=(t.originalEvent||t).clipboardData.getData("Text"),s=n.o.plugins.pasteEmbed.endpoint;if(!a.startsWith("http"))return;t.stopPropagation(),t.preventDefault();var i=new URL(s);i.searchParams.append("url",a.trim()),fetch(i,{method:"GET",cache:"no-cache",signal:AbortSignal.timeout(2e3)}).then((e=>e.json().then((e=>e.html)))).catch((()=>{})).then((t=>{void 0===t&&(t=e("",{href:a,text:a})[0].outerHTML),n.execCmd("insertHTML",t)}))}catch(e){}}))}}}})}(jQuery);
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/el.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * el.js
3 | * Greek translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Merianos Nikos
7 | * Twitter : @_webresources
8 | * Website : http://www.wp-lion.com
9 | * LinkedIn: https://gr.linkedin.com/in/merianosnikos
10 | * Behance: https://www.behance.net/web_design_blog
11 | */
12 | jQuery.trumbowyg.langs.el={viewHTML:"Προβολή κώδικα HTML",formatting:"Μορφοποίηση",p:"Παράγραφος",blockquote:"Παράθεση",code:"Κώδικας",header:"Επικεφαλίδα",bold:"Έντονα",italic:"Πλάγια",strikethrough:"Διαγραφή",underline:"Υπογράμμιση",strong:"Έντονα",em:"Πλάγια",del:"Διαγραφή",unorderedList:"Αταξινόμητη λίστα",orderedList:"Ταξινομημένη λίστα",insertImage:"Εισαγωγή εικόνας",insertVideo:"Εισαγωγή βίντεο",link:"Σύνδεσμος",createLink:"Δημιουργία συνδέσμου",unlink:"Διαγραφή συνδέσμου",justifyLeft:"Στοίχιση αριστερά",justifyCenter:"Στοίχιση στο κέντρο",justifyRight:"Στοίχιση δεξιά",justifyFull:"Πλήρης στοίχιση",horizontalRule:"Οριζόντια γραμμή",removeformat:"Καθαρισμός μορφοποίησης",fullscreen:"Πλήρης οθόνη",close:"Κλείσιμο",submit:"Υποβολή",reset:"Επαναφορά",required:"Απαραίτητο",description:"Περιγραφή",title:"Τίτλος",text:"Κείμενο"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/plugins/mention/trumbowyg.mention.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * trumbowyg.mention.js v0.1
3 | * Mention plugin for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Viper
7 | * Github: https://github.com/Globulopolis
8 | * Website: http://киноархив.com
9 | */
10 | !function(n){"use strict";var t={source:[],formatDropdownItem:function(n){return n.login},formatResult:function(n){return"@"+n.login+" "}};function e(t,e){var o=[];return n.each(t,(function(n,t){var i="mention-"+n,m={hasIcon:!1,text:e.o.plugins.mention.formatDropdownItem(t),fn:function(){return e.execCmd("insertHTML",e.o.plugins.mention.formatResult(t)),!0}};e.addBtnDef(i,m),o.push(i)})),o}n.extend(!0,n.trumbowyg,{langs:{en:{mention:"Mention"},az:{mention:"Bildirmək"},by:{mention:"Згадаць"},da:{mention:"Nævn"},de:{mention:"Erwähnung"},et:{mention:"Maini"},fr:{mention:"Mentionner"},hu:{mention:"Említ"},ko:{mention:"언급"},pt_br:{mention:"Menção"},ru:{mention:"Упомянуть"},sl:{mention:"Omeni"},tr:{mention:"Bahset"},zh_tw:{mention:"標記"}},plugins:{mention:{init:function(o){o.o.plugins.mention=n.extend(!0,{},t,o.o.plugins.mention||{});var i={dropdown:e(o.o.plugins.mention.source,o)};o.addBtnDef("mention",i)}}}})}(jQuery);
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/plugins/indent/trumbowyg.indent.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * trumbowyg.indent.js v1.0
3 | * Indent or Outdent plugin for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Fabacks
7 | * Website : https://github.com/Fabacks
8 | */
9 | !function(n){"use strict";n.extend(!0,n.trumbowyg,{langs:{en:{indent:"Indent",outdent:"Outdent"},az:{indent:"Girinti",outdent:"Çıxıntı"},by:{indent:"Водступ",outdent:"Выступ"},de:{indent:"Einzug vergrößern",outdent:"Einzug verkleinern"},et:{indent:"Taande suurendamine",outdent:"Taande vähendamine"},fr:{indent:"Augmenter le retrait",outdent:"Diminuer le retrait"},pt_br:{indent:"Aumentar Recuo",outdent:"Diminuir Recuo"},ru:{indent:"Отступ",outdent:"Выступ"},sl:{indent:"Povečaj zamik",outdent:"Zmanjšaj zamik"},tr:{indent:"Girinti",outdent:"Çıkıntı"}}}),n.extend(!0,n.trumbowyg,{plugins:{paragraph:{init:function(n){var t={fn:"indent",title:n.lang.indent,isSupported:function(){return!!document.queryCommandSupported&&!!document.queryCommandSupported("indent")},ico:"indent"},e={fn:"outdent",title:n.lang.outdent,isSupported:function(){return!!document.queryCommandSupported&&!!document.queryCommandSupported("outdent")},ico:"outdent"};n.addBtnDef("indent",t),n.addBtnDef("outdent",e)}}}})}(jQuery);
--------------------------------------------------------------------------------
/spec/dummy/app/admin/posts.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | ActiveAdmin.register Post do
4 | permit_params :author_id, :title, :summary, :description, :category, :dt, :position, :published, tag_ids: []
5 |
6 | remove_filter :state, :summary
7 |
8 | index do
9 | selectable_column
10 | id_column
11 | column :title
12 | column :author
13 | column :published
14 | column :created_at
15 | actions
16 | end
17 |
18 | show do
19 | attributes_table do
20 | row :author
21 | row :title
22 | row :summary
23 | row :description
24 | row :category
25 | row :dt
26 | row :position
27 | row :published
28 | row :tags
29 | row :created_at
30 | row :updated_at
31 | end
32 | active_admin_comments
33 | end
34 |
35 | form do |f|
36 | buttons = %w[strong em underline link justifyRight]
37 |
38 | f.inputs 'Post' do
39 | f.input :author
40 | f.input :title
41 | f.input :summary, as: :trumbowyg # using default options
42 | f.input :description, as: :trumbowyg, input_html: { data: { options: { btns: buttons } } }
43 | f.input :category
44 | f.input :dt
45 | f.input :position
46 | f.input :published
47 | end
48 |
49 | f.inputs 'Tags' do
50 | f.input :tags
51 | end
52 |
53 | f.actions
54 | end
55 | end
56 |
--------------------------------------------------------------------------------
/spec/dummy/config/initializers/content_security_policy.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Define an application-wide content security policy
4 | # For further information see the following documentation
5 | # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
6 |
7 | # Rails.application.config.content_security_policy do |policy|
8 | # policy.default_src :self, :https
9 | # policy.font_src :self, :https, :data
10 | # policy.img_src :self, :https, :data
11 | # policy.object_src :none
12 | # policy.script_src :self, :https
13 | # policy.style_src :self, :https
14 |
15 | # # Specify URI for violation reports
16 | # # policy.report_uri "/csp-violation-report-endpoint"
17 | # end
18 |
19 | # If you are using UJS then enable automatic nonce generation
20 | # Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) }
21 |
22 | # Set the nonce only to specific directives
23 | # Rails.application.config.content_security_policy_nonce_directives = %w(script-src)
24 |
25 | # Report CSP violations to a specified URI
26 | # For further information see the following documentation:
27 | # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
28 | # Rails.application.config.content_security_policy_report_only = true
29 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/zh_cn.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * zh_cn.js
3 | * Simplified Chinese translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Liu Kai (akai)
7 | * Twitter : @akai404
8 | * Github : https://github.com/akai
9 | */
10 |
11 | // jshint camelcase:false
12 | jQuery.trumbowyg.langs.zh_cn = {
13 | viewHTML: '源代码',
14 |
15 | formatting: '格式',
16 | p: '段落',
17 | blockquote: '引用',
18 | code: '代码',
19 | header: '标题',
20 |
21 | bold: '加粗',
22 | italic: '斜体',
23 | strikethrough: '删除线',
24 | underline: '下划线',
25 |
26 | strong: '加粗',
27 | em: '斜体',
28 | del: '删除线',
29 |
30 | unorderedList: '无序列表',
31 | orderedList: '有序列表',
32 |
33 | insertImage: '插入图片',
34 | insertVideo: '插入视频',
35 | link: '超链接',
36 | createLink: '插入链接',
37 | unlink: '取消链接',
38 |
39 | justifyLeft: '居左对齐',
40 | justifyCenter: '居中对齐',
41 | justifyRight: '居右对齐',
42 | justifyFull: '两端对齐',
43 |
44 | horizontalRule: '插入分隔线',
45 |
46 | fullscreen: '全屏',
47 |
48 | close: '关闭',
49 |
50 | submit: '确定',
51 | reset: '取消',
52 |
53 | required: '必需的',
54 | description: '描述',
55 | title: '标题',
56 | text: '文字'
57 | };
58 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/plugins/emoji/ui/sass/trumbowyg.emoji.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * Trumbowyg v2.31.0 - A lightweight WYSIWYG editor
3 | * Trumbowyg plugin stylesheet
4 | * ------------------------
5 | * @link https://alex-d.github.io/Trumbowyg/
6 | * @license MIT
7 | * @author Alexandre Demode (Alex-D)
8 | * Twitter : @AlexandreDemode
9 | * Website : alex-d.fr
10 | */
11 |
12 | .trumbowyg-dropdown-emoji {
13 | width: 265px;
14 | padding: 7px 0 7px 5px;
15 | }
16 |
17 | .trumbowyg-dropdown-emoji svg {
18 | display: none !important;
19 | }
20 |
21 | .trumbowyg-dropdown-emoji button {
22 | display: block;
23 | position: relative;
24 | float: left;
25 | height: 26px;
26 | width: 26px;
27 | padding: 0;
28 | margin: 2px;
29 | line-height: 24px;
30 | text-align: center;
31 |
32 | &:hover,
33 | &:focus {
34 | &::after {
35 | display: block;
36 | position: absolute;
37 | top: -5px;
38 | left: -5px;
39 | height: 27px;
40 | width: 27px;
41 | background: inherit;
42 | box-shadow: #000 0 0 2px;
43 | z-index: 10;
44 | background-color: transparent;
45 | }
46 | }
47 | }
48 |
49 | .trumbowyg .emoji {
50 | width: 22px;
51 | height: 22px;
52 | display: inline-block;
53 | }
54 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/fr.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * fr.js
3 | * French translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Alexandre Demode (Alex-D)
7 | * Twitter : @AlexandreDemode
8 | * Website : alex-d.fr
9 | * Reviewed by : Abdou Developer (test20091)
10 | * Github : https://github.com/test20091
11 | */
12 | jQuery.trumbowyg.langs.fr={viewHTML:"Voir le HTML",undo:"Annuler",redo:"Refaire",formatting:"Format",p:"Paragraphe",blockquote:"Citation",code:"Code",header:"Titre",bold:"Gras",italic:"Italique",strikethrough:"Barré",underline:"Souligné",strong:"Fort",em:"Emphase",del:"Supprimé",superscript:"Exposant",subscript:"Indice",unorderedList:"Liste à puces",orderedList:"Liste ordonnée",insertImage:"Insérer une image",insertVideo:"Insérer une video",link:"Lien",createLink:"Insérer un lien",unlink:"Supprimer le lien",_self:"Même onglet (par défaut)",_blank:"Nouvel onglet",justifyLeft:"Aligner à gauche",justifyCenter:"Centrer",justifyRight:"Aligner à droite",justifyFull:"Justifier",horizontalRule:"Insérer un séparateur horizontal",removeformat:"Supprimer formatage",fullscreen:"Plein écran",close:"Fermer",submit:"Valider",reset:"Annuler",required:"Obligatoire",description:"Description",title:"Titre",text:"Texte",target:"Cible"};
--------------------------------------------------------------------------------
/spec/dummy/db/seeds.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | (11..16).each do |i|
4 | Tag.find_or_create_by!(name: "Tag #{i}")
5 | end
6 |
7 | (11..20).each do |i|
8 | age = 21 + 3 * (i - 10)
9 | attrs = { name: "Author #{i}", age: age, email: "some@email#{i}.com" }
10 | Author.find_or_create_by!(name: "Author #{i}") do |author|
11 | author.assign_attributes(attrs)
12 | author.profile = Profile.new(description: "Profile description for Author #{i}") if (i % 3).zero?
13 | end
14 | end
15 |
16 | authors = Author.pluck(:id)
17 | tags = Tag.where.not(name: 'A test tag').pluck(:id)
18 | (11..40).each do |i|
19 | attrs = {
20 | title: "Post #{i}",
21 | author_id: authors.sample,
22 | position: rand(100),
23 | summary: "Summary for post #{i}
",
24 | description: "Some bold Some italic Some underline [#{i}]
",
25 | created_at: Time.now - rand(3600).seconds
26 | }
27 | attrs[:category] = 'news' if (i % 4).zero?
28 | attrs[:dt] = Time.now - rand(30).days if (i % 3).zero?
29 |
30 | Post.find_or_create_by!(title: "Post #{i}") do |post|
31 | post.assign_attributes(attrs)
32 | post.tags = Tag.where(id: tags.sample(2)) if (i % 2).zero?
33 | end
34 | end
35 |
36 | Author.find_or_create_by!(name: 'A test author', email: 'aaa@bbb.ccc', age: 30)
37 | Tag.find_or_create_by!(name: 'A test tag')
38 |
39 | puts '> Seeds: done.'
40 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/nb.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * nb.js
3 | * Norwegian Bokmål translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Jon Severin Eivik Jakobsen
7 | * Github : https://github.com/jsejakobsen
8 | *
9 | * Mod by: Gunnar Tjomlid
10 | * Github : https://github.com/civix74
11 | * Twitter : @civix
12 | * Website : https://about.me/civix
13 | */
14 | // jshint camelcase:false
15 | jQuery.trumbowyg.langs.nb={viewHTML:"Vis HTML",undo:"Angre",redo:"Gjør om",formatting:"Formater",p:"Avsnitt",blockquote:"Sitat",code:"Kode",header:"Overskrift",bold:"Fet",italic:"Kursiv",strikethrough:"Gjennomstreking",underline:"Understreking",strong:"Uthevet",em:"Kursiv",del:"Slettet",superscript:"Hevet",subscript:"Senket",unorderedList:"Punktliste",orderedList:"Nummerert liste",insertImage:"Sett inn bilde",insertVideo:"Sett inn video",link:"Lenke",createLink:"Sett inn lenke",unlink:"Fjern lenke",justifyLeft:"Venstrejuster",justifyCenter:"Midtstill",justifyRight:"Høyrejuster",justifyFull:"Blokkjuster",horizontalRule:"Horisontal linje",removeformat:"Fjern formatering",fullscreen:"Fullskjerm",close:"Lukk",submit:"Bekreft",reset:"Avbryt",required:"Påkrevd",description:"Beskrivelse",title:"Tittel",text:"Tekst",target:"Mål",width:"Bredde"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/th.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * th.js
3 | * Thai translation for Trumbowyg
4 | * https://github.com/ionsoft/Trumbowyg
5 | * ===========================================================
6 | * Author : Gonatee Klanktong
7 | * Github : https://github.com/gonateek
8 | */
9 |
10 | jQuery.trumbowyg.langs.th = {
11 | viewHTML: 'ดู HTML',
12 |
13 | formatting: 'จัดรูปแบบ',
14 | p: 'ย่อหน้า',
15 | blockquote: 'อ้างอิง',
16 | code: 'โค๊ด',
17 | header: 'ส่วนหัว',
18 |
19 | bold: 'หนา',
20 | italic: 'เอียง',
21 | strikethrough: 'ขีดทับ',
22 | underline: 'เส้นใต้',
23 |
24 | strong: 'สำคัญ',
25 | em: 'เน้น',
26 | del: 'ลบ',
27 |
28 | unorderedList: 'รายการ',
29 | orderedList: 'รายการ(ตัวเลข)',
30 |
31 | insertImage: 'ใส่รูป',
32 | insertVideo: 'ใส่วิดีโอ',
33 | link: 'ลิงค์',
34 | createLink: 'สร้างลิงค์',
35 | unlink: 'ยกเลิกลิงค์',
36 |
37 | justifyLeft: 'ชิดซ้าย',
38 | justifyCenter: 'กลาง',
39 | justifyRight: 'ชิดขวา',
40 | justifyFull: 'เต็มบรรทัด',
41 |
42 | horizontalRule: 'เส้นแนวนอน',
43 |
44 | fullscreen: 'เต็มหน้าจอ',
45 |
46 | close: 'ปิด',
47 |
48 | submit: 'ตกลง',
49 | reset: 'เริ่มใหม่',
50 |
51 | required: 'จำเป็น',
52 | description: 'คำอธิบาย',
53 | title: 'หัวเรื่อง',
54 | text: 'ข้อความ'
55 | };
56 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/activeadmin/_trumbowyg_input.scss:
--------------------------------------------------------------------------------
1 | body.active_admin {
2 | .trumbowyg-box {
3 | border: 1px solid #c9d0d6;
4 | border-radius: 3px;
5 | display: inline-block;
6 | margin-top: 0;
7 | margin-bottom: 0;
8 | min-height: initial;
9 | width: calc(80% - 2px);
10 |
11 | button {
12 | background: transparent;
13 | border-radius: 0;
14 | box-shadow: none;
15 | color: #222;
16 | text-shadow: none;
17 | }
18 |
19 | textarea {
20 | border: 0 none;
21 | display: block;
22 | }
23 |
24 | >.trumbowyg-editor-box {
25 | background-color: #fff;
26 | min-height: 200px;
27 |
28 | li {
29 | margin: initial;
30 | padding: initial;
31 | }
32 |
33 | ol {
34 | list-style-type: decimal;
35 | }
36 |
37 | p {
38 | margin-bottom: 1em;
39 | }
40 |
41 | ul {
42 | list-style-type: disc;
43 | }
44 |
45 | ul, ol {
46 | margin: 0 1.5em 1.5em 0;
47 | padding-left: 1.5em;
48 | }
49 | }
50 |
51 | .trumbowyg-button-pane {
52 | background: transparent;
53 | border-bottom: 0 none;
54 | }
55 | }
56 |
57 | .trumbowyg-modal {
58 | .trumbowyg-modal-button {
59 | line-height: initial;
60 | text-shadow: none;
61 | }
62 | }
63 |
64 | .field_with_errors >.trumbowyg-box {
65 | border: 1px solid #932419;
66 | }
67 | }
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/plugins/specialchars/ui/trumbowyg.specialchars.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Trumbowyg v2.31.0 - A lightweight WYSIWYG editor
3 | * Trumbowyg plugin stylesheet
4 | * ------------------------
5 | * @link https://alex-d.github.io/Trumbowyg/
6 | * @license MIT
7 | * @author Alexandre Demode (Alex-D)
8 | * Twitter : @AlexandreDemode
9 | * Website : alex-d.fr
10 | */
11 |
12 | .trumbowyg-symbol-\ -dropdown-button {
13 | display: none !important;
14 | }
15 |
16 | .trumbowyg-symbol-\ -dropdown-button + button {
17 | clear: both;
18 | }
19 |
20 | .trumbowyg-dropdown-specialChars {
21 | width: 248px;
22 | padding: 5px 3px 3px;
23 | }
24 |
25 | .trumbowyg-dropdown-specialChars button {
26 | display: block;
27 | position: relative;
28 | float: left;
29 | height: 26px;
30 | width: 26px;
31 | padding: 0;
32 | margin: 2px;
33 | line-height: 24px;
34 | text-align: center;
35 | }
36 | .trumbowyg-dropdown-specialChars button:hover::after, .trumbowyg-dropdown-specialChars button:focus::after {
37 | display: block;
38 | position: absolute;
39 | top: -5px;
40 | left: -5px;
41 | height: 27px;
42 | width: 27px;
43 | background: inherit;
44 | -webkit-box-shadow: #000 0 0 2px;
45 | box-shadow: #000 0 0 2px;
46 | z-index: 10;
47 | background-color: transparent;
48 | }
49 |
50 | .trumbowyg .specialChars {
51 | width: 22px;
52 | height: 22px;
53 | display: inline-block;
54 | }
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/ca.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * ca.js
3 | * Catalan translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Authors : Àlfons Sánchez (alsanan)
7 | * Twitter : @alsanan
8 | * Website : about.me/alsanan
9 | * Github : https://github.com/alsanan
10 | *
11 | * Carles Martínez
12 | * Website : calaix.net
13 | */
14 | jQuery.trumbowyg.langs.ca={viewHTML:"Veure HTML",undo:"Desfés",redo:"Refés",formatting:"Format",p:"Paragraf",blockquote:"Citació",code:"Codi",header:"Títol",bold:"Negreta",italic:"Cursiva",strikethrough:"Ratllat",underline:"Subratllat",strong:"Negreta",em:"Cursiva",del:"Apagar",superscript:"Superíndex",subscript:"Subíndex",unorderedList:"Llista desordenada",orderedList:"Llista ordenada",insertImage:"Inserir imatge",insertVideo:"Inserir vídeo",link:"Enllaç",createLink:"Crear un enllaç",unlink:"Eliminar enllaç",target:"Obertura",_self:"Mateixa pestanya",_blank:"Nova pestanya",justifyLeft:"Alinear a esquerra",justifyCenter:"Centrar",justifyRight:"Alinear a dreta",justifyFull:"Justificar",horizontalRule:"Inserir separador horitzontal",removeformat:"Eliminar format",fullscreen:"Pantalla completa",close:"Tancar",submit:"Enviar",reset:"Cancel·lar",required:"Obligatori",description:"Descripció",title:"Títol",text:"Text",width:"Amplada"};
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/he.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * he.js
3 | * Hebrew translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Udi Doron (udidoron)
7 | * Github : https://github.com/udidoron
8 | */
9 |
10 | jQuery.trumbowyg.langs.he = {
11 | _dir: 'rtl',
12 |
13 | viewHTML: 'צפה ב-HTML',
14 |
15 | formatting: 'פורמט',
16 | p: 'פסקה',
17 | blockquote: 'ציטוט',
18 | code: 'קוד',
19 | header: 'ראשית',
20 |
21 | bold: 'מודגש',
22 | italic: 'נטוי',
23 | strikethrough: 'קו חוצה',
24 | underline: 'קו תחתון',
25 |
26 | strong: 'בולט',
27 | em: 'הדגשה',
28 | del: 'נמחק',
29 |
30 | unorderedList: 'רשימה ללא סדר',
31 | orderedList: 'רשימה מסודרת',
32 |
33 | insertImage: 'הכנס תמונה',
34 | insertVideo: 'הכנס סרטון',
35 | link: 'קישור',
36 | createLink: 'צור קישור',
37 | unlink: 'הסר קישור',
38 |
39 | justifyLeft: 'ישר לשמאל',
40 | justifyCenter: 'מרכז',
41 | justifyRight: 'ישר לימין',
42 | justifyFull: 'ישר לשני הצדדים',
43 |
44 | horizontalRule: 'הכנס קו אופקי',
45 |
46 | fullscreen: 'מסך מלא',
47 |
48 | close: 'סגור',
49 |
50 | submit: 'שלח',
51 | reset: 'אתחל מחדש',
52 |
53 | required: 'נחוץ',
54 | description: 'תיאור',
55 | title: 'כותרת',
56 | text: 'טקסט'
57 | };
58 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/plugins/insertaudio/trumbowyg.insertaudio.min.js:
--------------------------------------------------------------------------------
1 | /*/* ===========================================================
2 | * trumbowyg.insertaudio.js v1.0
3 | * InsertAudio plugin for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Adam Hess (AdamHess)
7 | */
8 | !function(e){"use strict";var i={src:{label:"URL",required:!0},autoplay:{label:"AutoPlay",required:!1,type:"checkbox"},muted:{label:"Muted",required:!1,type:"checkbox"},preload:{label:"preload options",required:!1}};e.extend(!0,e.trumbowyg,{langs:{en:{insertAudio:"Insert Audio"},az:{insertAudio:"Səs yerləşdir"},by:{insertAudio:"Уставіць аўдыё"},ca:{insertAudio:"Inserir Audio"},da:{insertAudio:"Indsæt lyd"},de:{insertAudio:"Audio einfügen"},es:{insertAudio:"Insertar Audio"},et:{insertAudio:"Lisa helifail"},fr:{insertAudio:"Insérer un son"},hu:{insertAudio:"Audio beszúrás"},ja:{insertAudio:"音声の挿入"},ko:{insertAudio:"소리 넣기"},pt_br:{insertAudio:"Inserir áudio"},ru:{insertAudio:"Вставить аудио"},sl:{insertAudio:"Vstavi zvočno datoteko"},tr:{insertAudio:"Ses Ekle"}},plugins:{insertAudio:{init:function(r){var n={fn:function(){r.openModalInsert(r.lang.insertAudio,i,(function(i){var n="")[0];return r.range.deleteContents(),r.range.insertNode(o),!0}))}};r.addBtnDef("insertAudio",n)}}}})}(jQuery);
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/bg.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * bg.js
3 | * Bulgarian translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Aleksandar Dimitrov
7 | */
8 |
9 | jQuery.trumbowyg.langs.bg = {
10 | viewHTML: 'Прегледай HTML',
11 |
12 | formatting: 'Форматиране',
13 | p: 'Параграф',
14 | blockquote: 'Цитат',
15 | code: 'Код',
16 | header: 'Заглавие',
17 |
18 | bold: 'Удебелен',
19 | italic: 'Наклонен',
20 | strikethrough: 'Зачеркнат',
21 | underline: 'Подчертан',
22 |
23 | strong: 'Удебелен',
24 | em: 'Наклонен',
25 | del: 'Зачеркнат',
26 |
27 | unorderedList: 'Обикновен списък',
28 | orderedList: 'Номериран списък',
29 |
30 | insertImage: 'Добави изображение',
31 | insertVideo: 'Добави видео',
32 | link: 'Връзка',
33 | createLink: 'Създай връзка',
34 | unlink: 'Премахни връзката',
35 |
36 | justifyLeft: 'Подравни от ляво',
37 | justifyCenter: 'Центрирай',
38 | justifyRight: 'Подравни от дясно',
39 | justifyFull: 'Подравни по ширина',
40 |
41 | horizontalRule: 'Хоризонтална линия',
42 |
43 | fullscreen: 'На цял екран',
44 |
45 | close: 'Затвори',
46 |
47 | submit: 'Впиши',
48 | reset: 'Отмени',
49 |
50 | required: 'Задължително',
51 | description: 'Описание',
52 | title: 'Заглавие',
53 | text: 'Текст'
54 | };
55 |
--------------------------------------------------------------------------------
/examples/upload_plugin_using_activestorage/app/admin/posts.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | ActiveAdmin.register Post do
4 | permit_params :title, :published, :description
5 |
6 | member_action :upload, method: [:post] do
7 | result = { success: resource.images.attach(params[:file_upload]) }
8 | result[:file] = url_for(resource.images.last) if result[:success]
9 | render json: result
10 | end
11 |
12 | index do
13 | selectable_column
14 | id_column
15 | column :title
16 | column :published
17 | column :created_at
18 | actions
19 | end
20 |
21 | show do
22 | attributes_table do
23 | row :title
24 | row :published
25 | row :description
26 | row :images do |resurce|
27 | resurce.images.each do |image|
28 | div do
29 | link_to image.filename, image, target: '_blank', rel: 'noopener'
30 | end
31 | end
32 | nil
33 | end
34 | end
35 | active_admin_comments
36 | end
37 |
38 | form do |f|
39 | options = {
40 | btns: [['bold', 'italic'], ['link'], ['upload']],
41 | plugins: { upload: { serverPath: upload_admin_post_path(resource.id), fileFieldName: 'file_upload' } }
42 | }
43 | f.inputs 'Post' do
44 | f.input :title
45 | f.input :published
46 | unless resource.new_record?
47 | f.input :description, as: :trumbowyg, input_html: { data: { options: options } }
48 | end
49 | end
50 | f.actions
51 | end
52 | end
53 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/my.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * my.js
3 | * Malaysian translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : JohnPozy
7 | */
8 |
9 | jQuery.trumbowyg.langs.id = {
10 | viewHTML: 'Lihat HTML',
11 |
12 | formatting: 'Pemformatan',
13 | p: 'Perenggan',
14 | blockquote: 'Blockquote',
15 | code: 'Kod',
16 | header: 'Pengepala',
17 |
18 | bold: 'Tebal',
19 | italic: 'Condong',
20 | strikethrough: 'Garis batal',
21 | underline: 'Garis bawah',
22 |
23 | strong: 'Kuat',
24 | em: 'Condong',
25 | del: 'Hapus',
26 |
27 | unorderedList: 'Senarai tidak tertib',
28 | orderedList: 'Senarai tertib',
29 |
30 | insertImage: 'Masukkan imej',
31 | insertVideo: 'Masukkan video',
32 | link: 'Pautan',
33 | createLink: 'Cipta pautan',
34 | unlink: 'Hapus pautan',
35 |
36 | justifyLeft: 'Mengimbangkan ke kiri',
37 | justifyCenter: 'Mengimbangkan ke tengah',
38 | justifyRight: 'Mengimbangkan ke kanan',
39 | justifyFull: 'Mengimbangkan ke kiri dan kanan',
40 |
41 | horizontalRule: 'Masukkan garis mendatar',
42 |
43 | fullscreen: 'Skrin penuh',
44 |
45 | close: 'Tutup',
46 |
47 | submit: 'Hantar',
48 | reset: 'Batal',
49 |
50 | required: 'Diperlukan',
51 | description: 'Perihal',
52 | title: 'Tajuk',
53 | text: 'Teks'
54 | };
55 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/sk.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * sk.js
3 | * Slovak translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : VeeeneX (https://github.com/VeeeneX)
7 | */
8 |
9 | jQuery.trumbowyg.langs.sk = {
10 | viewHTML: 'Zobraziť HTML',
11 |
12 | formatting: 'Formátovanie',
13 | p: 'Paragraf',
14 | blockquote: 'Citácia',
15 | code: 'Kód',
16 | header: 'Nadpis',
17 |
18 | bold: 'Tučné',
19 | italic: 'Kurzíva',
20 | strikethrough: 'Preškrtnuté',
21 | underline: 'Podčiarknuté',
22 |
23 | strong: 'Tučné',
24 | em: 'Zvýrazniť',
25 | del: 'Zmazať',
26 |
27 | unorderedList: 'Netriedený zoznam',
28 | orderedList: 'Triedený zoznam',
29 |
30 | insertImage: 'Vložiť obrázok',
31 | insertVideo: 'Vložiť video',
32 | link: 'Odkaz',
33 | createLink: 'Vložiť odkaz',
34 | unlink: 'Zmazať odkaz',
35 |
36 | justifyLeft: 'Zarovnať doľava',
37 | justifyCenter: 'Zarovnať na stred',
38 | justifyRight: 'Zarovnať doprava',
39 | justifyFull: 'Zarovnať do bloku',
40 |
41 | horizontalRule: 'Vložit vodorovnú čiaru',
42 |
43 | fullscreen: 'Režim celej obrazovky',
44 |
45 | close: 'Zavrieť',
46 |
47 | submit: 'Potvrdiť',
48 | reset: 'Zrušiť',
49 |
50 | required: 'Povinné',
51 | description: 'Popis',
52 | title: 'Nadpis',
53 | text: 'Text'
54 | };
55 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/ua.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * ua.js
3 | * Ukrainian translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Igor Buksha
7 | */
8 |
9 | jQuery.trumbowyg.langs.ua = {
10 | viewHTML: 'Подивитись HTML',
11 |
12 | formatting: 'Форматування',
13 | p: 'Звичайний',
14 | blockquote: 'Витяг',
15 | code: 'Код',
16 | header: 'Заголовок',
17 |
18 | bold: 'Напівжирний',
19 | italic: 'Курсив',
20 | strikethrough: 'Закреслений',
21 | underline: 'Підкреслений',
22 |
23 | strong: 'Напівжирний',
24 | em: 'Курсив',
25 | del: 'Закреслений',
26 |
27 | unorderedList: 'Звичайний список',
28 | orderedList: 'Нумерований список',
29 |
30 | insertImage: 'Вставити зображення',
31 | insertVideo: 'Вставити відео',
32 | link: 'Посилання',
33 | createLink: 'Вставити посилання',
34 | unlink: 'Видалити посилання',
35 |
36 | justifyLeft: 'По лівому краю',
37 | justifyCenter: 'В центрі',
38 | justifyRight: 'По правому краю',
39 | justifyFull: 'По ширині',
40 |
41 | horizontalRule: 'Горизонтальна лінія',
42 |
43 | fullscreen: 'На весь екран',
44 |
45 | close: 'Закрити',
46 |
47 | submit: 'Вставити',
48 | reset: 'Скасувати',
49 |
50 | required: 'Обов\'язкове',
51 | description: 'Опис',
52 | title: 'Підказка',
53 | text: 'Текст'
54 | };
55 |
--------------------------------------------------------------------------------
/spec/dummy/app/admin/authors.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | ActiveAdmin.register Author do
4 | permit_params :name,
5 | :email,
6 | :age,
7 | :avatar,
8 | profile_attributes: %i[id description _destroy],
9 | posts_attributes: %i[id title description]
10 |
11 | index do
12 | selectable_column
13 | id_column
14 | column :name
15 | column :email
16 | column :created_at
17 | actions
18 | end
19 |
20 | filter :name
21 | filter :created_at
22 |
23 | show do
24 | attributes_table do
25 | row :name
26 | row :email
27 | row :age
28 | row :avatar do |record|
29 | image_tag url_for(record.avatar), style: 'max-width:800px;max-height:500px' if record.avatar.attached?
30 | end
31 | row :created_at
32 | row :updated_at
33 | row :profile
34 | row :posts
35 | end
36 | active_admin_comments
37 | end
38 |
39 | form do |f|
40 | f.inputs do
41 | f.input :name
42 | f.input :email
43 | f.input :age
44 | f.input :avatar,
45 | as: :file,
46 | hint: (object.avatar.attached? ? "Current: #{object.avatar.filename}" : nil)
47 | end
48 | f.has_many :profile, allow_destroy: true do |ff|
49 | ff.input :description
50 | end
51 | f.has_many :posts do |fp|
52 | fp.input :title
53 | fp.input :description, as: :trumbowyg
54 | end
55 | f.actions
56 | end
57 | end
58 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/ja.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * ja.js
3 | * Japanese translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Kouta Fukuhara (foo9)
7 | * Twitter : @foo9
8 | * Website : https://github.com/foo9
9 | */
10 |
11 | jQuery.trumbowyg.langs.ja = {
12 | viewHTML: 'HTML表示',
13 |
14 | undo: '元に戻す',
15 | redo: 'やり直す',
16 |
17 | formatting: 'フォーマット',
18 | p: '段落',
19 | blockquote: '引用',
20 | code: 'コード',
21 | header: '見出し',
22 |
23 | bold: '太字',
24 | italic: '斜体',
25 | strikethrough: '取り消し線',
26 | underline: '下線',
27 |
28 | strong: '太字',
29 | em: '斜体',
30 | del: '取り消し線',
31 |
32 | superscript: '上付き文字',
33 | subscript: '下付き文字',
34 |
35 | unorderedList: '順序なしリスト',
36 | orderedList: '順序ありリスト',
37 |
38 | insertImage: '画像の挿入',
39 | link: 'リンク',
40 | createLink: 'リンクの作成',
41 | unlink: 'リンクの削除',
42 |
43 | justifyLeft: '左揃え',
44 | justifyCenter: '中央揃え',
45 | justifyRight: '右揃え',
46 | justifyFull: '両端揃え',
47 |
48 | horizontalRule: '横罫線',
49 | removeformat: 'フォーマットの削除',
50 |
51 | fullscreen: '全画面表示',
52 |
53 | close: '閉じる',
54 |
55 | submit: '送信',
56 | reset: 'キャンセル',
57 |
58 | required: '必須',
59 | description: '説明',
60 | title: 'タイトル',
61 | text: 'テキスト',
62 | target: 'ターゲット'
63 | };
64 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/plugins/specialchars/ui/sass/trumbowyg.specialchars.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * Trumbowyg v2.31.0 - A lightweight WYSIWYG editor
3 | * Trumbowyg plugin stylesheet
4 | * ------------------------
5 | * @link https://alex-d.github.io/Trumbowyg/
6 | * @license MIT
7 | * @author Alexandre Demode (Alex-D)
8 | * Twitter : @AlexandreDemode
9 | * Website : alex-d.fr
10 | */
11 |
12 | .trumbowyg-symbol-\ -dropdown-button {
13 | display: none !important;
14 | }
15 | .trumbowyg-symbol-\ -dropdown-button + button {
16 | clear: both;
17 | }
18 |
19 | .trumbowyg-dropdown-specialChars {
20 | width: 248px;
21 | padding: 5px 3px 3px;
22 | }
23 |
24 | .trumbowyg-dropdown-specialChars button {
25 | display: block;
26 | position: relative;
27 | float: left;
28 | height: 26px;
29 | width: 26px;
30 | padding: 0;
31 | margin: 2px;
32 | line-height: 24px;
33 | text-align: center;
34 |
35 | &:hover,
36 | &:focus {
37 | &::after {
38 | display: block;
39 | position: absolute;
40 | top: -5px;
41 | left: -5px;
42 | height: 27px;
43 | width: 27px;
44 | background: inherit;
45 | box-shadow: #000 0 0 2px;
46 | z-index: 10;
47 | background-color: transparent;
48 | }
49 | }
50 | }
51 |
52 | .trumbowyg .specialChars {
53 | width: 22px;
54 | height: 22px;
55 | display: inline-block;
56 | }
57 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/ph.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * ph.js
3 | * Filipino translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : @leogono
7 | */
8 |
9 | jQuery.trumbowyg.langs.ph = {
10 | viewHTML: 'Tumingin sa HTML',
11 |
12 | formatting: 'Formatting',
13 | p: 'Talata',
14 | blockquote: 'Blockquote',
15 | code: 'Kowd',
16 | header: 'Header',
17 |
18 | bold: 'Makapal',
19 | italic: 'Hilig',
20 | strikethrough: 'Strikethrough',
21 | underline: 'Salungguhit',
22 |
23 | strong: 'Malakas',
24 | em: 'Hilig',
25 | del: 'Tinanggal',
26 |
27 | unorderedList: 'Hindi nakahanay na listahan',
28 | orderedList: 'Nakahanay na listahan',
29 |
30 | insertImage: 'Ilagay ang larawan',
31 | insertVideo: 'Ilagay ang video',
32 | link: 'Koneksyon',
33 | createLink: 'Iugnay',
34 | unlink: 'Tanggalin ang koneksyon',
35 |
36 | justifyLeft: 'Ihanay sa kaliwa',
37 | justifyCenter: 'Ihanay sa gitna',
38 | justifyRight: 'Ihanay sa kanan',
39 | justifyFull: 'Ihanay sa kaliwa at kanan',
40 |
41 | horizontalRule: 'Pahalang na linya',
42 |
43 | fullscreen: 'Fullscreen',
44 |
45 | close: 'Isara',
46 |
47 | submit: 'Ipasa',
48 | reset: 'I-reset',
49 |
50 | required: 'Kailangan',
51 | description: 'Paglalarawan',
52 | title: 'Pamagat',
53 | text: 'Teksto'
54 | };
55 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/rs.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * rs.js
3 | * Serbian (Cyrlic) translation for Trumbowyg
4 | * https://www.github.com/johonunu
5 | * ===========================================================
6 | * Author : Nikola Trifunovic (https://www.github.com/johonunu)
7 | */
8 |
9 | jQuery.trumbowyg.langs.rs = {
10 | viewHTML: 'Погледај HTML кóд',
11 |
12 | formatting: 'Форматирање',
13 | p: 'Параграф',
14 | blockquote: 'Цитат',
15 | code: 'Кóд',
16 | header: 'Наслов',
17 |
18 | bold: 'Подебљано',
19 | italic: 'Курзив',
20 | strikethrough: 'Прецртано',
21 | underline: 'Подвучено',
22 |
23 | strong: 'Подебљано',
24 | em: 'Истакнуто',
25 | del: 'Обрисано',
26 |
27 | unorderedList: 'Ненабројива листа',
28 | orderedList: 'Набројива листа',
29 | insertImage: 'Унеси слику',
30 | insertVideo: 'Унеси видео',
31 | link: 'Линк',
32 | createLink: 'Унеси линк',
33 | unlink: 'Уклони линк',
34 |
35 | justifyLeft: 'Лево равнање',
36 | justifyCenter: 'Централно равнање',
37 | justifyRight: 'Десно равнање',
38 | justifyFull: 'Обострано равнање',
39 |
40 | horizontalRule: 'Хоризонтална линија',
41 |
42 | fullscreen: 'Режим читавог екрана',
43 |
44 | close: 'Затвори',
45 |
46 | submit: 'Унеси',
47 | reset: 'Откажи',
48 |
49 | required: 'Обавезно поље',
50 | description: 'Опис',
51 | title: 'Наслов',
52 | text: 'Текст'
53 | };
54 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/pl.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * pl.js
3 | * Polish translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Paweł Abramowicz
7 | * Github : https://github.com/pawelabrams
8 | */
9 |
10 | jQuery.trumbowyg.langs.pl = {
11 | viewHTML: 'Pokaż HTML',
12 |
13 | formatting: 'Format',
14 | p: 'Akapit',
15 | blockquote: 'Cytat',
16 | code: 'Kod',
17 | header: 'Nagłówek',
18 |
19 | bold: 'Pogrubienie',
20 | italic: 'Pochylenie',
21 | strikethrough: 'Przekreślenie',
22 | underline: 'Podkreślenie',
23 |
24 | strong: 'Wytłuszczenie',
25 | em: 'Uwydatnienie',
26 | del: 'Usunięte',
27 |
28 | unorderedList: 'Lista nieuporządkowana',
29 | orderedList: 'Lista uporządkowana',
30 |
31 | insertImage: 'Wstaw obraz',
32 | insertVideo: 'Wstaw film',
33 | link: 'Link',
34 | createLink: 'Wstaw link',
35 | unlink: 'Usuń link',
36 |
37 | justifyLeft: 'Wyrównaj do lewej',
38 | justifyCenter: 'Wyśrodkuj',
39 | justifyRight: 'Wyrównaj do prawej',
40 | justifyFull: 'Wyjustuj',
41 |
42 | horizontalRule: 'Odkreśl linią',
43 |
44 | fullscreen: 'Pełny ekran',
45 |
46 | close: 'Zamknij',
47 |
48 | submit: 'Zastosuj',
49 | reset: 'Przywróć',
50 |
51 | required: 'Wymagane',
52 | description: 'Opis',
53 | title: 'Tytuł',
54 | text: 'Tekst'
55 | };
56 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/fa.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * fa.js
3 | * Persian translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Kiarash Soleimanzadeh
7 | * Github : https://github.com/kiyarash
8 | * Email : kiarash.s@hotmail.com
9 | */
10 |
11 | jQuery.trumbowyg.langs.fa = {
12 | _dir: 'rtl',
13 |
14 | viewHTML: 'نمایش کد اچ تی ام ال',
15 |
16 | formatting: 'قالب بندی',
17 | p: 'پاراگراف',
18 | blockquote: 'نقل قول',
19 | code: 'کد',
20 | header: 'سر تیتر',
21 |
22 | bold: 'ضخیم',
23 | italic: 'مورب',
24 | strikethrough: 'میان خط دار',
25 | underline: 'زیر خط دار',
26 |
27 | strong: 'برجسته',
28 | em: 'مورب',
29 | del: 'حذف شده',
30 |
31 | unorderedList: 'لیست نامرتب',
32 | orderedList: 'لیست مرتب',
33 |
34 | insertImage: 'درج تصویر',
35 | insertVideo: 'درج ویدئو',
36 | link: 'لینک',
37 | createLink: 'درج لینک',
38 | unlink: 'حذف لینک',
39 |
40 | justifyLeft: 'تراز به چپ',
41 | justifyCenter: 'تراز به وسط',
42 | justifyRight: 'تراز به راست',
43 | justifyFull: 'تراز به چپ و راست',
44 |
45 | horizontalRule: 'درج خط افقی',
46 |
47 | fullscreen: 'تمام صفحه',
48 |
49 | close: 'بستن',
50 |
51 | submit: 'تائید',
52 | reset: 'انصراف',
53 |
54 | required: 'اجباری',
55 | description: 'توضیحات',
56 | title: 'عنوان',
57 | text: 'متن'
58 | };
59 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/hr.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * hr.js
3 | * Croatian translation for Trumbowyg
4 | * https://www.github.com/Buda9
5 | * ===========================================================
6 | * Author : Davor Budimir (https://www.github.com/Buda9)
7 | */
8 |
9 | // jshint camelcase:false
10 | jQuery.trumbowyg.langs.hr = {
11 | viewHTML: 'Poglеdaj HTML kód',
12 |
13 | formatting: 'Formatiranjе',
14 | p: 'Odlomak',
15 | blockquote: 'Citat',
16 | code: 'Kód',
17 | header: 'Zaglavlje',
18 |
19 | bold: 'Podеbljano',
20 | italic: 'Nakošeno',
21 | strikethrough: 'Prеcrtano',
22 | underline: 'Podvučеno',
23 |
24 | strong: 'Podеbljano',
25 | em: 'Istaknuto',
26 | del: 'Obrisano',
27 |
28 | unorderedList: 'Neuređen popis',
29 | orderedList: 'Uređen popis',
30 | insertImage: 'Dodaj sliku',
31 | insertVideo: 'Dodaj vidеo',
32 | link: 'Povezica',
33 | createLink: 'Dodaj povezicu',
34 | unlink: 'Ukloni povezicu',
35 |
36 | justifyLeft: 'Lijеvo poravnanjе',
37 | justifyCenter: 'Središnje poravnanjе',
38 | justifyRight: 'Dеsno poravnanjе',
39 | justifyFull: 'Obostrano poravnanjе',
40 |
41 | horizontalRule: 'Horizontalna crta',
42 |
43 | fullscreen: 'Puni zaslon',
44 |
45 | close: 'Zatvori',
46 |
47 | submit: 'Unеsi',
48 | reset: 'Otkaži',
49 |
50 | required: 'Obavеzno poljе',
51 | description: 'Opis',
52 | title: 'Naslov',
53 | text: 'Tеkst'
54 | };
55 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/vi.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * vi.js
3 | * Vietnamese translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : heocoi
7 | * Github: https://github.com/heocoi
8 | */
9 |
10 | jQuery.trumbowyg.langs.vi = {
11 | viewHTML: 'Hiển thị HTML',
12 |
13 | formatting: 'Định dạng',
14 | p: 'Đoạn',
15 | blockquote: 'Trích dẫn',
16 | code: 'Code',
17 | header: 'Đầu trang',
18 |
19 | bold: 'In đậm',
20 | italic: 'In nghiêng',
21 | strikethrough: 'Gạch ngang',
22 | underline: 'Gạch chân',
23 |
24 | strong: 'In đậm',
25 | em: 'In nghiêng',
26 | del: 'Gạch ngang',
27 |
28 | unorderedList: 'Danh sách không thứ tự',
29 | orderedList: 'Danh sách có thứ tự',
30 |
31 | insertImage: 'Chèn hình ảnh',
32 | insertVideo: 'Chèn video',
33 | link: 'Đường dẫn',
34 | createLink: 'Tạo đường dẫn',
35 | unlink: 'Hủy đường dẫn',
36 |
37 | justifyLeft: 'Canh lề trái',
38 | justifyCenter: 'Canh giữa',
39 | justifyRight: 'Canh lề phải',
40 | justifyFull: 'Canh đều',
41 |
42 | horizontalRule: 'Thêm đường kẻ ngang',
43 |
44 | fullscreen: 'Toàn màn hình',
45 |
46 | close: 'Đóng',
47 |
48 | submit: 'Đồng ý',
49 | reset: 'Hủy bỏ',
50 |
51 | required: 'Bắt buộc',
52 | description: 'Mô tả',
53 | title: 'Tiêu đề',
54 | text: 'Nội dung',
55 | target: 'Đối tượng'
56 | };
57 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/plugins/specialchars/trumbowyg.specialchars.min.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * trumbowyg.specialchars.js v0.99
3 | * Unicode characters picker plugin for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Renaud Hoyoux (geektortoise)
7 | */
8 | !function(a){"use strict";var s={symbolList:["0024","20AC","00A3","00A2","00A5","00A4","2030",null,"00A9","00AE","2122",null,"00A7","00B6","00C6","00E6","0152","0153",null,"2022","25CF","2023","25B6","2B29","25C6",null,"00B1","00D7","00F7","21D2","21D4","220F","2211","2243","2264","2265"]};function e(s){var e=[];return a.each(s.o.plugins.specialchars.symbolList,(function(a,r){var i="symbol-"+(r=null===r?" ":""+r).replace(/:/g,""),l={text:r,hasIcon:!1,fn:function(){var a=String.fromCodePoint(parseInt(r.replace("","0")));return s.execCmd("insertText",a),!0}};s.addBtnDef(i,l),e.push(i)})),e}a.extend(!0,a.trumbowyg,{langs:{en:{specialChars:"Special characters"},az:{specialChars:"Xüsusi simvollar"},by:{specialChars:"Спецыяльныя сімвалы"},de:{specialChars:"Spezialzeichen"},et:{specialChars:"Erimärgid"},fr:{specialChars:"Caractères spéciaux"},hu:{specialChars:"Speciális karakterek"},ko:{specialChars:"특수문자"},ru:{specialChars:"Специальные символы"},sl:{specialChars:"Posebni znaki"},tr:{specialChars:"Özel karakterler"}},plugins:{specialchars:{init:function(a){a.o.plugins.specialchars=a.o.plugins.specialchars||s;var r={dropdown:e(a)};a.addBtnDef("specialChars",r)}}}})}(jQuery);
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/fi.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * fi.js
3 | * Finnish translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Teppo Koivula (teppokoivula)
7 | * Github : https://github.com/teppokoivula
8 | */
9 |
10 | jQuery.trumbowyg.langs.fi = {
11 | viewHTML: 'Näytä HTML',
12 |
13 | undo: 'Kumoa',
14 | redo: 'Tee uudelleen',
15 |
16 | formatting: 'Muotoilu',
17 | p: 'Kappale',
18 | blockquote: 'Lainaus',
19 | code: 'Koodi',
20 | header: 'Otsikko',
21 |
22 | bold: 'Lihavointi',
23 | italic: 'Kursivointi',
24 | strikethrough: 'Yliviivaus',
25 | underline: 'Allevivaus',
26 |
27 | strong: 'Vahvennus',
28 | em: 'Painotus',
29 | del: 'Poistettu',
30 |
31 | unorderedList: 'Luettelo',
32 | orderedList: 'Numeroitu luettelo',
33 |
34 | insertImage: 'Lisää kuva',
35 | insertVideo: 'Lisää video',
36 | link: 'Linkki',
37 | createLink: 'Luo linkki',
38 | unlink: 'Poista linkki',
39 |
40 | justifyLeft: 'Tasaa vasemmalle',
41 | justifyCenter: 'Keskitä',
42 | justifyRight: 'Tasaa oikealle',
43 | justifyFull: 'Tasaa',
44 |
45 | horizontalRule: 'Vaakaviiva',
46 |
47 | fullscreen: 'Kokoruutu',
48 |
49 | close: 'Sulje',
50 |
51 | submit: 'Lisää',
52 | reset: 'Palauta',
53 |
54 | required: 'Pakollinen',
55 | description: 'Kuvaus',
56 | title: 'Otsikko',
57 | text: 'Teksti'
58 | };
59 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/rs_latin.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * rs_latin.js
3 | * Serbian (Latin) translation for Trumbowyg
4 | * https://www.github.com/johonunu
5 | * ===========================================================
6 | * Author : Nikola Trifunovic (https://www.github.com/johonunu)
7 | */
8 |
9 | // jshint camelcase:false
10 | jQuery.trumbowyg.langs.rs_latin = {
11 | viewHTML: 'Poglеdaj HTML kód',
12 |
13 | formatting: 'Formatiranjе',
14 | p: 'Paragraf',
15 | blockquote: 'Citat',
16 | code: 'Kód',
17 | header: 'Naslov',
18 |
19 | bold: 'Podеbljano',
20 | italic: 'Kurziv',
21 | strikethrough: 'Prеcrtano',
22 | underline: 'Podvučеno',
23 |
24 | strong: 'Podеbljano',
25 | em: 'Istaknuto',
26 | del: 'Obrisano',
27 |
28 | unorderedList: 'Nеnabrojiva lista',
29 | orderedList: 'Nabrojiva lista',
30 | insertImage: 'Unеsi sliku',
31 | insertVideo: 'Unеsi vidеo',
32 | link: 'Link',
33 | createLink: 'Unеsi link',
34 | unlink: 'Ukloni link',
35 |
36 | justifyLeft: 'Lеvo ravnanjе',
37 | justifyCenter: 'Cеntralno ravnanjе',
38 | justifyRight: 'Dеsno ravnanjе',
39 | justifyFull: 'Obostrano ravnanjе',
40 |
41 | horizontalRule: 'Horizontalna linija',
42 |
43 | fullscreen: 'Rеžim čitavog еkrana',
44 |
45 | close: 'Zatvori',
46 |
47 | submit: 'Unеsi',
48 | reset: 'Otkaži',
49 |
50 | required: 'Obavеzno poljе',
51 | description: 'Opis',
52 | title: 'Naslov',
53 | text: 'Tеkst'
54 | };
55 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | include extra/.env
2 |
3 | help:
4 | @echo -e "${COMPOSE_PROJECT_NAME} - Main project commands:\n\
5 | make up # starts the dev services (optional env vars: RUBY / RAILS / ACTIVEADMIN)\n\
6 | make specs # run the tests (after up)\n\
7 | make lint # run the linters (after up)\n\
8 | make server # run the server (after up)\n\
9 | make shell # open a shell (after up)\n\
10 | make down # cleanup (after up)\n\
11 | Example: RUBY=3.2 RAILS=7.1 ACTIVEADMIN=3.2.0 make up"
12 |
13 | # System commands
14 |
15 | build:
16 | @rm -f Gemfile.lock spec/dummy/db/*.sqlite3 spec/dummy/db/schema-dev.rb
17 | @docker compose -f extra/docker-compose.yml build
18 |
19 | db_reset:
20 | @docker compose -f extra/docker-compose.yml run --rm app bin/rails db:create db:migrate db:test:prepare
21 |
22 | up: build db_reset
23 | @docker compose -f extra/docker-compose.yml up
24 |
25 | shell:
26 | @docker compose -f extra/docker-compose.yml exec app bash
27 |
28 | down:
29 | @docker compose -f extra/docker-compose.yml down --volumes --rmi local --remove-orphans
30 |
31 | # App commands
32 |
33 | seed:
34 | @docker compose -f extra/docker-compose.yml exec app bin/rails db:seed
35 |
36 | console: seed
37 | @docker compose -f extra/docker-compose.yml exec app bin/rails console
38 |
39 | lint:
40 | @docker compose -f extra/docker-compose.yml exec app bin/rubocop
41 |
42 | server: seed
43 | @docker compose -f extra/docker-compose.yml exec app bin/rails server -b 0.0.0.0 -p ${SERVER_PORT}
44 |
45 | specs:
46 | @docker compose -f extra/docker-compose.yml exec app bin/rspec --fail-fast
47 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/es_ar.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * es_ar.js
3 | * Spanish (Argentina) translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Félix Vera
7 | * Email : felix.vera@gmail.com
8 | */
9 |
10 | // jshint camelcase:false
11 | jQuery.trumbowyg.langs.es_ar = {
12 | viewHTML: 'Ver HTML',
13 |
14 | formatting: 'Formato',
15 | p: 'Párrafo',
16 | blockquote: 'Cita',
17 | code: 'Código',
18 | header: 'Título',
19 |
20 | bold: 'Negrita',
21 | italic: 'Itálica',
22 | strikethrough: 'Tachado',
23 | underline: 'Subrayado',
24 |
25 | strong: 'Fuere',
26 | em: 'Énfasis',
27 | del: 'Borrar',
28 |
29 | unorderedList: 'Lista Desordenada',
30 | orderedList: 'Lista Ordenada',
31 |
32 | insertImage: 'Insertar una imagen',
33 | insertVideo: 'Insertar un video',
34 | link: 'Vínculo',
35 | createLink: 'Insertar un vínculo',
36 | unlink: 'Suprimir un vínculo',
37 |
38 | justifyLeft: 'Alinear a la Izquierda',
39 | justifyCenter: 'Centrar',
40 | justifyRight: 'Alinear a la Derecha',
41 | justifyFull: 'Justificado',
42 |
43 | horizontalRule: 'Insertar separado Horizontal',
44 |
45 | fullscreen: 'Pantalla Completa',
46 |
47 | close: 'Cerrar',
48 |
49 | submit: 'Enviar',
50 | reset: 'Cancelar',
51 |
52 | required: 'Obligatorio',
53 | description: 'Descripción',
54 | title: 'Título',
55 | text: 'Texto'
56 | };
57 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/zh_tw.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * zh_tw.js
3 | * Traditional Chinese translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Peter Dave Hello (PeterDaveHello)
7 | * Twitter : @PeterDaveHello
8 | * Github : https://github.com/PeterDaveHello
9 | */
10 |
11 | // jshint camelcase:false
12 | jQuery.trumbowyg.langs.zh_tw = {
13 | viewHTML: '原始碼',
14 |
15 | undo: '復原',
16 | redo: '重做',
17 |
18 | formatting: '格式',
19 | p: '段落',
20 | blockquote: '引用',
21 | code: '代碼',
22 | header: '標題',
23 |
24 | bold: '加粗',
25 | italic: '斜體',
26 | strikethrough: '刪除線',
27 | underline: '底線',
28 |
29 | strong: '粗體',
30 | em: '斜體',
31 | del: '刪除線',
32 |
33 | superscript: '上標',
34 | subscript: '下標',
35 |
36 | unorderedList: '無序列表',
37 | orderedList: '有序列表',
38 |
39 | insertImage: '插入圖片',
40 | insertVideo: '插入影片',
41 | link: '超連結',
42 | createLink: '插入連結',
43 | unlink: '取消連結',
44 |
45 | justifyLeft: '靠左對齊',
46 | justifyCenter: '置中對齊',
47 | justifyRight: '靠右對齊',
48 | justifyFull: '左右對齊',
49 |
50 | horizontalRule: '插入分隔線',
51 | removeformat: '移除格式',
52 |
53 | fullscreen: '全螢幕',
54 |
55 | close: '關閉',
56 |
57 | submit: '確定',
58 | reset: '取消',
59 |
60 | required: '必需的',
61 | description: '描述',
62 | title: '標題',
63 | text: '文字',
64 | target: '目標',
65 | width: '寬度'
66 | };
67 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/mn.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * mn.js
3 | * Mongolian translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Ganbayar.B (ganbayar13)
7 | */
8 |
9 | jQuery.trumbowyg.langs.mn = {
10 | viewHTML: 'HTML харах',
11 | undo: 'Буцаах',
12 | redo: 'Дахих',
13 | formatting: 'Формат',
14 | p: 'Догол мөр',
15 | blockquote: 'Ишлэл',
16 | code: 'Код',
17 | header: 'Гарчиг',
18 | bold: 'Тод',
19 | italic: 'Налуу',
20 | strikethrough: 'Дундуур зураас',
21 | underline: 'Доогуур зураас',
22 | strong: 'Тод',
23 | em: 'Налуу',
24 | del: 'Дундуур зураас',
25 | superscript: 'Дээд индекс',
26 | subscript: 'Доод индекс',
27 | unorderedList: 'Дугаарлаагүй жагсаалт',
28 | orderedList: 'Дугаарласан жагсаалт',
29 | insertImage: 'Зураг оруулах',
30 | insertVideo: 'Видео оруулах',
31 | link: 'Холбоос',
32 | createLink: 'Холбоос үүсгэх',
33 | unlink: 'Холбоос цуцлах',
34 | justifyLeft: 'Зүүн тийш шахах',
35 | justifyCenter: 'Голлуулах',
36 | justifyRight: 'Баруун Баруун тийш шахах',
37 | justifyFull: 'Тэгшитгэх',
38 | horizontalRule: 'Хөндлөн шугам',
39 | removeformat: 'Формат арилгах',
40 | fullscreen: 'Дэлгэц дүүргэх',
41 | close: 'Хаах',
42 | submit: 'Оруулах',
43 | reset: 'Цуцлах',
44 | required: 'Шаардлагатай',
45 | description: 'Тайлбар',
46 | title: 'Гарчиг',
47 | text: 'Текст',
48 | target: 'Бай'
49 | };
50 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/sv.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * sv.js
3 | * Swedish translation for Trumbowyg
4 | * http://www.tim-international.net
5 | * ===========================================================
6 | * Author : T. Almroth
7 | * Github : https://github.com/timint
8 | *
9 | * Review : M Hagberg
10 | * Github : https://github.com/pestbarn
11 | */
12 |
13 | jQuery.trumbowyg.langs.sv = {
14 | viewHTML: 'Visa HTML',
15 |
16 | formatting: 'Formatering',
17 | p: 'Paragraf',
18 | blockquote: 'Citat',
19 | code: 'Kod',
20 | header: 'Rubrik',
21 |
22 | bold: 'Fet',
23 | italic: 'Kursiv',
24 | strikethrough: 'Genomstruken',
25 | underline: 'Understruken',
26 |
27 | strong: 'Fet',
28 | em: 'Kursiv',
29 | del: 'Rensa formatering',
30 |
31 | unorderedList: 'Punktlista',
32 | orderedList: 'Numrerad lista',
33 |
34 | insertImage: 'Infoga bild',
35 | insertVideo: 'Infoga video',
36 | link: 'Länk',
37 | createLink: 'Infoga länk',
38 | unlink: 'Ta bort länk',
39 |
40 | justifyLeft: 'Vänsterjustera',
41 | justifyCenter: 'Centrera',
42 | justifyRight: 'Högerjustera',
43 | justifyFull: 'Marginaljustera',
44 |
45 | horizontalRule: 'Horisontell linje',
46 | removeformat: 'Ta bort formatering',
47 |
48 | fullscreen: 'Fullskärm',
49 |
50 | close: 'Stäng',
51 |
52 | submit: 'Bekräfta',
53 | reset: 'Återställ',
54 |
55 | required: 'Obligatorisk',
56 | description: 'Beskrivning',
57 | title: 'Titel',
58 | text: 'Text'
59 | };
60 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/id.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * id.js
3 | * Indonesian translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Rezha Julio (kimiamania)
7 | * Twitter : @kimiamania
8 | * Website : http://rezhajulio.web.id
9 | * Github : https://github.com/kimiamania
10 | */
11 |
12 | jQuery.trumbowyg.langs.id = {
13 | viewHTML: 'Lihat HTML',
14 |
15 | formatting: 'Penyusunan',
16 | p: 'Paragraf',
17 | blockquote: 'Kutipan',
18 | code: 'Kode',
19 | header: 'Kepala',
20 |
21 | bold: 'Tebal',
22 | italic: 'Miring',
23 | strikethrough: 'Coret',
24 | underline: 'Garis bawah',
25 |
26 | strong: 'Tebal',
27 | em: 'Miring',
28 | del: 'Dicoret',
29 |
30 | unorderedList: 'Daftar tak teratur',
31 | orderedList: 'Daftar teratur',
32 |
33 | insertImage: 'Sisipkan gambar',
34 | insertVideo: 'Sisipkan video',
35 | link: 'Tautan',
36 | createLink: 'Sisipkan Tautan',
37 | unlink: 'Singkirkan tautan',
38 |
39 | justifyLeft: 'Rata kiri',
40 | justifyCenter: 'Rata Tengah',
41 | justifyRight: 'Rata kanan',
42 | justifyFull: 'Rata kiri dan kanan',
43 |
44 | horizontalRule: 'Sisipkan garis mendatar',
45 |
46 | fullscreen: 'Layar penuh',
47 |
48 | close: 'Tutup',
49 |
50 | submit: 'Setuju',
51 | reset: 'Batal',
52 |
53 | required: 'Diperlukan',
54 | description: 'Deskripsi',
55 | title: 'Judul',
56 | text: 'Teks'
57 | };
58 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/ko.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * ko.js
3 | * Korean translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : SeungWoo Chae (SDuck4)
7 | * Github : https://github.com/SDuck4
8 | * Victor Chanil Park (opdev1004)
9 | * Github : https://github.com/opdev1004
10 | */
11 |
12 | jQuery.trumbowyg.langs.ko = {
13 | viewHTML: 'HTML 보기',
14 |
15 | undo: '되돌리기',
16 | redo: '다시 실행',
17 |
18 | formatting: '스타일',
19 | p: '본문',
20 | blockquote: '인용문',
21 | code: '코드',
22 | header: '제목',
23 |
24 | bold: '진하게',
25 | italic: '기울임',
26 | strikethrough: '취소선',
27 | underline: '밑줄',
28 |
29 | strong: '중요',
30 | em: '강조',
31 | del: '삭제',
32 |
33 | superscript: '위 첨자',
34 | subscript: '아래 첨자',
35 |
36 | unorderedList: '기호 목록',
37 | orderedList: '번호 목록',
38 |
39 | insertImage: '이미지 넣기',
40 | insertVideo: '비디오 넣기',
41 | link: '링크',
42 | createLink: '링크 넣기',
43 | unlink: '링크 지우기',
44 |
45 | justifyLeft: '왼쪽 정렬',
46 | justifyCenter: '가운데 정렬',
47 | justifyRight: '오른쪽 정렬',
48 | justifyFull: '양쪽 정렬',
49 |
50 | horizontalRule: '구분선 넣기',
51 | removeformat: '글꼴 효과 지우기',
52 |
53 | fullscreen: '전체 화면',
54 |
55 | close: '닫기',
56 |
57 | submit: '확인',
58 | reset: '취소',
59 |
60 | required: '필수 입력',
61 | description: '설명',
62 | title: '툴팁',
63 | text: '내용',
64 | target: '타겟',
65 | width: '너비'
66 | };
67 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/lt.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * lt.js
3 | * Lithuanian translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Justas Brazauskas
7 | */
8 |
9 | jQuery.trumbowyg.langs.lt = {
10 | viewHTML: 'Žiūrėti HTML',
11 |
12 | formatting: 'Formatuoti',
13 | p: 'Paragrafas',
14 | blockquote: 'Citata',
15 | code: 'Kodas',
16 | header: 'Antraštė',
17 |
18 | bold: 'Paryškinti',
19 | italic: 'Kursyvuoti',
20 | strikethrough: 'Perbraukti',
21 | underline: 'Pabrėžti',
22 |
23 | strong: 'Paryškinti',
24 | em: 'Pabrėžti',
25 | del: 'Trinti',
26 |
27 | unorderedList: 'Sąrašas',
28 | orderedList: 'Numeruotas sąrašas',
29 |
30 | insertImage: 'Pridėti vaizdą',
31 | insertVideo: 'Pridėti video',
32 | link: 'Nuoroda',
33 | createLink: 'Kurti nuorodą',
34 | unlink: 'Ištrinti nuorodą',
35 |
36 | justifyLeft: 'Lyginti kairėn',
37 | justifyCenter: 'Lygiuoti Centre',
38 | justifyRight: 'Lyginti dešinėn',
39 | justifyFull: 'Centruoti',
40 |
41 | horizontalRule: 'Horizontali linija',
42 |
43 | fullscreen: 'Pilnas ekranas',
44 |
45 | close: 'Uždaryti',
46 |
47 | submit: 'Siųsti',
48 | reset: 'Atšaukti',
49 |
50 | required: 'Privaloma',
51 | description: 'Aprašymas',
52 | title: 'Pavadinimas',
53 | text: 'Tekstas',
54 |
55 | removeformat: 'Pašalinti formatavimą',
56 |
57 | superscript: 'Viršutinis indeksas',
58 | subscript: 'Apatinis indeksas'
59 | };
60 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/hu.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * hu.js
3 | * Hungarian translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Peter MATO
7 | * Web: http://fixme.hu
8 | * GitHub: https://github.com/matopeter
9 | */
10 |
11 | jQuery.trumbowyg.langs.hu = {
12 | viewHTML: 'HTML nézet',
13 |
14 | undo: 'Visszavon',
15 | redo: 'Visszállít',
16 |
17 | formatting: 'Stílusok',
18 |
19 | p: 'Bekezdés',
20 | blockquote: 'Idézet',
21 | code: 'Kód',
22 | header: 'Címsor',
23 |
24 | bold: 'Félkövér',
25 | italic: 'Dőlt',
26 | strikethrough: 'Áthúzott',
27 | underline: 'Aláhúzott',
28 |
29 | strong: 'Vastag',
30 | em: 'Kiemelt',
31 | del: 'Törölt',
32 |
33 | unorderedList: 'Felsorolás',
34 | orderedList: 'Számozás',
35 |
36 | insertImage: 'Kép beszúrása',
37 | insertVideo: 'Video beszúrása',
38 | link: 'Link',
39 | createLink: 'Link létrehozása',
40 | unlink: 'Link eltávolítása',
41 |
42 | justifyLeft: 'Balra igazítás',
43 | justifyCenter: 'Középre igazítás',
44 | justifyRight: 'Jobbra igazítás',
45 | justifyFull: 'Sorkizárt',
46 |
47 | horizontalRule: 'Vízszintes vonal',
48 |
49 | fullscreen: 'Teljes képernyő',
50 | close: 'Bezár',
51 |
52 | submit: 'Beküldés',
53 | reset: 'Alaphelyzet',
54 |
55 | required: 'Kötelező',
56 | description: 'Leírás',
57 | title: 'Cím',
58 | text: 'Szöveg',
59 |
60 | removeformat: 'Formázás eltávolítása'
61 | };
62 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Trumbowyg Editor for ActiveAdmin
2 |
3 | An Active Admin plugin to use Trumbowyg Editor.
4 |
5 | ## v1.2.0 - 2025-04-13
6 |
7 | - Update Trumbowyg to version 2.31.0
8 | - Internal: improve tests
9 | - Internal: update dev setup
10 | - Internal: update CI configuration
11 |
12 | ## v1.1.0 - 2024-02-18
13 |
14 | - Set minimum Ruby version to 3.0.0
15 | - Set minimum ActiveAdmin version to 2.9.0
16 | - Update CI configuration
17 |
18 | ## v1.0.0 - 2022-04-19
19 |
20 | - Set minimum Ruby version to 2.6.0
21 | - Remove `sassc` dependency
22 | - Enable Ruby 3.0 specs support
23 | - Enable Rails 7.0 specs support
24 | - Internal improvements
25 |
26 | ## v0.2.16 - 2021-07-28
27 |
28 | - Update Trumbowyg v2.25.1 (=> fix issue #17)
29 |
30 | ## v0.2.14 - 2021-07-15
31 |
32 | - Update Trumbowyg to version 2.25.0
33 | - Move some libs in the Gemfile
34 | - Internal changes for the CI workflows using GitHub Actions
35 |
36 | ## v0.2.12 - 2021-04-09
37 |
38 | - Update Trumbowyg to version 2.23.0
39 |
40 | ## v0.2.10 - 2021-03-19
41 |
42 | - Fix editor loading with Turbolinks
43 | - Specs improvements
44 |
45 | ## v0.2.8 - 2020-09-10
46 |
47 | - CSS: reset only spacing for li elements in the editor
48 | - JS: enable strict directive
49 | - Minor specs improvement
50 |
51 | ## v0.2.6 - 2020-09-08
52 |
53 | - JS refactoring
54 | - README and examples improvements
55 |
56 | ## v0.2.4 - 2020-09-02
57 |
58 | - Change styles file to SCSS + minor improvements
59 | - Add specs for editor in nested resources
60 | - Add Rubocop
61 |
62 | ## v0.2.0 - 2020-09-01
63 |
64 | - Support ActiveAdmin 2.x
65 | - Update Trumbowyg to version 2.21.0
66 | - Add minimum specs (using RSpec)
67 |
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | source 'https://rubygems.org'
4 |
5 | def eval_version(dependency, version)
6 | return [dependency] if version.empty?
7 |
8 | version.count('.') < 2 ? [dependency, "~> #{version}.0"] : [dependency, version]
9 | end
10 |
11 | if ENV['DEVEL'] == '1'
12 | gem 'activeadmin_trumbowyg', path: './'
13 | else
14 | gemspec
15 | end
16 |
17 | ruby_ver = ENV.fetch('RUBY_VERSION', '')
18 |
19 | rails_ver = ENV.fetch('RAILS_VERSION', '')
20 | rails = eval_version('rails', rails_ver)
21 | gem(*rails)
22 |
23 | active_admin_ver = ENV.fetch('ACTIVEADMIN_VERSION', '')
24 | active_admin = eval_version('activeadmin', active_admin_ver)
25 | gem(*active_admin)
26 |
27 | ruby32 = ruby_ver.empty? || Gem::Version.new(ruby_ver) >= Gem::Version.new('3.2')
28 | rails72 = rails_ver.empty? || Gem::Version.new(rails_ver) >= Gem::Version.new('7.2')
29 | sqlite3 = ruby32 && rails72 ? ['sqlite3'] : ['sqlite3', '~> 1.4']
30 | gem(*sqlite3)
31 |
32 | gem 'zeitwerk', '~> 2.6.18' unless ruby32
33 |
34 | # NOTE: to avoid error: uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger
35 | gem 'concurrent-ruby', '1.3.4'
36 |
37 | gem 'bigdecimal'
38 | gem 'csv'
39 | gem 'mutex_m'
40 | gem 'puma'
41 | gem 'sassc'
42 | gem 'sprockets-rails'
43 |
44 | # Testing
45 | gem 'capybara'
46 | gem 'cuprite'
47 | gem 'rspec_junit_formatter'
48 | gem 'rspec-rails'
49 | gem 'simplecov', require: false
50 |
51 | # Linters
52 | gem 'fasterer'
53 | gem 'rubocop'
54 | gem 'rubocop-capybara'
55 | gem 'rubocop-packaging'
56 | gem 'rubocop-performance'
57 | gem 'rubocop-rails'
58 | gem 'rubocop-rspec'
59 | gem 'rubocop-rspec_rails'
60 |
61 | # Tools
62 | gem 'pry-rails'
63 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/bn.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * bn.js
3 | * Bangla translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Ahammad Naim
7 | * Website : https://github.com/AhammadNaim
8 | */
9 |
10 | jQuery.trumbowyg.langs.bn = {
11 | viewHTML: 'HTML দেখান',
12 |
13 | undo: 'পূর্বাবস্থায় ফিরুন',
14 | redo: 'পুনরায় করুন',
15 |
16 | formatting: 'বিন্যাস',
17 | p: 'অনুচ্ছেদ',
18 | blockquote: 'উদ্ধৃতি',
19 | code: 'কোড',
20 | header: 'শিরোনাম',
21 |
22 | bold: 'বোল্ড',
23 | italic: 'ইটালিক',
24 | strikethrough: 'স্ট্রাইকথ্রু',
25 | underline: 'আন্ডারলাইন',
26 |
27 | strong: 'বোল্ড',
28 | em: 'ইটালিক',
29 | del: 'স্ট্রাইকথ্রু',
30 |
31 | superscript: 'সুপারস্ক্রিপ্ট',
32 | subscript: 'সাবস্ক্রিপ্ট',
33 |
34 | unorderedList: 'অসংখ্যায়িত তালিকা',
35 | orderedList: 'সাজানো তালিকা',
36 |
37 | insertImage: 'ছবি',
38 | link: 'লিংক',
39 | createLink: 'লিংক তৈরি করুন',
40 | unlink: 'লিংক মুছুন',
41 |
42 | justifyLeft: 'বামে জাস্টিফাইড',
43 | justifyCenter: 'কেন্দ্রীভূত',
44 | justifyRight: 'ডানে জাস্টিফাইড',
45 | justifyFull: 'জাস্টিফাইড',
46 |
47 | horizontalRule: 'আনুভূমিক দাগ',
48 | removeformat: 'বিন্যাস অপসারণ করুন',
49 |
50 | fullscreen: 'সম্পূর্ণ পর্দায় দেখুন',
51 |
52 | close: 'বন্ধ',
53 |
54 | submit: 'প্রেরণ',
55 | reset: 'বাতিল',
56 |
57 | required: 'আবশ্যক',
58 | description: 'বর্ননা',
59 | title: 'শিরোনাম',
60 | text: 'পাঠ্য',
61 | target: 'লক্ষ্য'
62 | };
63 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/by.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * by.js
3 | * Belarusian translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Yury Karalkou
7 | */
8 |
9 | jQuery.trumbowyg.langs.by = {
10 | viewHTML: 'Паглядзець HTML',
11 |
12 | undo: 'Скасаваць',
13 | redo: 'Паўтарыць',
14 |
15 | formatting: 'Фарматаванне',
16 | p: 'Звычайны',
17 | blockquote: 'Цытата',
18 | code: 'Код',
19 | header: 'Загаловак',
20 |
21 | bold: 'Паўтлусты',
22 | italic: 'Курсіў',
23 | strikethrough: 'Закрэслены',
24 | underline: 'Падкрэслены',
25 |
26 | strong: 'Паўтлусты',
27 | em: 'Курсіў',
28 | del: 'Закрэслены',
29 |
30 | superscript: 'Верхні індэкс',
31 | subscript: 'Індэкс',
32 |
33 | unorderedList: 'Звычайны спіс',
34 | orderedList: 'Нумараваны спіс',
35 |
36 | insertImage: 'Уставіць выяву',
37 | insertVideo: 'Уставіць відэа',
38 | link: 'Спасылка',
39 | createLink: 'Уставіць спасылку',
40 | unlink: 'Выдаліць спасылку',
41 |
42 | justifyLeft: 'Па леваму боку',
43 | justifyCenter: 'У цэнтры',
44 | justifyRight: 'Па праваму боку',
45 | justifyFull: 'Па шырыні',
46 |
47 | horizontalRule: 'Гарызантальная лінія',
48 | removeformat: 'Ачысціць фарматаванне',
49 |
50 | fullscreen: 'На ўвесь экран',
51 |
52 | close: 'Зачыніць',
53 |
54 | submit: 'Уставіць',
55 | reset: 'Скасаваць',
56 |
57 | required: 'Абавязкова',
58 | description: 'Апісанне',
59 | title: 'Падказка',
60 | text: 'Тэкст'
61 | };
62 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/nl.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * nl.js
3 | * Dutch translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Danny Hiemstra
7 | * Github : https://github.com/dhiemstra
8 | */
9 |
10 | jQuery.trumbowyg.langs.nl = {
11 | viewHTML: 'HTML bekijken',
12 |
13 | undo: 'Ongedaan maken',
14 | redo: 'Opnieuw',
15 |
16 | formatting: 'Opmaak',
17 | p: 'Paragraaf',
18 | blockquote: 'Citaat',
19 | code: 'Code',
20 | header: 'Kop',
21 |
22 | bold: 'Vet',
23 | italic: 'Cursief',
24 | strikethrough: 'Doorhalen',
25 | underline: 'Onderlijnen',
26 |
27 | strong: 'Sterk',
28 | em: 'Nadruk',
29 | del: 'Verwijderd',
30 |
31 | unorderedList: 'Ongenummerde lijst',
32 | orderedList: 'Genummerde lijst',
33 |
34 | insertImage: 'Afbeelding invoegen',
35 | insertVideo: 'Video invoegen',
36 | link: 'Link',
37 | createLink: 'Link maken',
38 | unlink: 'Link verwijderen',
39 |
40 | justifyLeft: 'Links uitlijnen',
41 | justifyCenter: 'Centreren',
42 | justifyRight: 'Rechts uitlijnen',
43 | justifyFull: 'Uitvullen',
44 |
45 | horizontalRule: 'Horizontale lijn',
46 | removeFormat: 'Opmaak verwijderen',
47 |
48 | fullscreen: 'Volledig scherm',
49 |
50 | close: 'Sluiten',
51 |
52 | submit: 'Opslaan',
53 | reset: 'Annuleren',
54 |
55 | required: 'Verplicht',
56 | description: 'Omschrijving',
57 | title: 'Titel',
58 | text: 'Tekst',
59 | target: 'Doel',
60 | width: 'Breedte'
61 | };
62 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/ro.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * ro.js
3 | * Romanian translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Vladut Radulescu (pacMakaveli)
7 | * Email: pacMakaveli90@gmail.com
8 | * Twitter : @pacMakaveli90
9 | * Website : creative-studio51.co.uk
10 | * Github : https://github.com/pacMakaveli
11 | */
12 |
13 | jQuery.trumbowyg.langs.ro = {
14 | viewHTML: 'Vizualizare HTML',
15 |
16 | formatting: 'Format',
17 | p: 'Paragraf',
18 | blockquote: 'Citație',
19 | code: 'Cod',
20 | header: 'Titlu',
21 |
22 | bold: 'Bold',
23 | italic: 'Italic',
24 | strikethrough: 'Tăiat',
25 | underline: 'Subliniat',
26 |
27 | strong: 'Puternic',
28 | em: 'Accentuat',
29 | del: 'Sterge',
30 |
31 | unorderedList: 'Lista dezordonată',
32 | orderedList: 'Liste ordonată',
33 |
34 | insertImage: 'Adăugare Imagine',
35 | insertVideo: 'Adăugare Video',
36 | link: 'Link',
37 | createLink: 'Crează link',
38 | unlink: 'Remover link',
39 |
40 | justifyLeft: 'Aliniază stânga',
41 | justifyCenter: 'Aliniază centru',
42 | justifyRight: 'Aliniază dreapta',
43 | justifyFull: 'Justificare',
44 |
45 | horizontalRule: 'Linie orizontală',
46 |
47 | fullscreen: 'Tot ecranul',
48 |
49 | close: 'Închide',
50 |
51 | submit: 'Procesează',
52 | reset: 'Resetează',
53 |
54 | required: 'Obligatoriu',
55 | description: 'Descriere',
56 | title: 'Titlu',
57 | text: 'Text'
58 | };
59 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/ru.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * ru.js
3 | * Russian translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Yuri Lya
7 | */
8 |
9 | jQuery.trumbowyg.langs.ru = {
10 | viewHTML: 'Посмотреть HTML',
11 |
12 | undo: 'Отменить',
13 | redo: 'Повторить',
14 |
15 | formatting: 'Форматирование',
16 | p: 'Обычный',
17 | blockquote: 'Цитата',
18 | code: 'Код',
19 | header: 'Заголовок',
20 |
21 | bold: 'Полужирный',
22 | italic: 'Курсив',
23 | strikethrough: 'Зачеркнутый',
24 | underline: 'Подчеркнутый',
25 |
26 | strong: 'Полужирный',
27 | em: 'Курсив',
28 | del: 'Зачеркнутый',
29 |
30 | superscript: 'Надстрочный',
31 | subscript: 'Подстрочный',
32 |
33 | unorderedList: 'Обычный список',
34 | orderedList: 'Нумерованный список',
35 |
36 | insertImage: 'Вставить изображение',
37 | insertVideo: 'Вставить видео',
38 | link: 'Ссылка',
39 | createLink: 'Вставить ссылку',
40 | unlink: 'Удалить ссылку',
41 |
42 | justifyLeft: 'По левому краю',
43 | justifyCenter: 'По центру',
44 | justifyRight: 'По правому краю',
45 | justifyFull: 'По ширине',
46 |
47 | horizontalRule: 'Горизонтальная линия',
48 | removeformat: 'Очистить форматирование',
49 |
50 | fullscreen: 'Во весь экран',
51 |
52 | close: 'Закрыть',
53 |
54 | submit: 'Вставить',
55 | reset: 'Отменить',
56 |
57 | required: 'Обязательное',
58 | description: 'Описание',
59 | title: 'Подсказка',
60 | text: 'Текст'
61 | };
62 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/az.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * az.js
3 | * Azerbaijani translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Qalib Qurbanov
7 | * Github : https://github.com/qalibqurbanov
8 | */
9 |
10 | jQuery.trumbowyg.langs.az = {
11 | viewHTML: 'HTML Kodu',
12 |
13 | formatting: 'Formatlama',
14 | p: 'Abzas',
15 | blockquote: 'Sitat',
16 | code: 'Kod',
17 | header: 'Başlıq',
18 |
19 | undo: 'Geri al',
20 | redo: 'İrəli al',
21 |
22 | superscript: 'Sözüstü',
23 | subscript: 'Sözaltı',
24 |
25 | bold: 'Qalın',
26 | italic: 'İtalik',
27 | strikethrough: 'Üzeri xəttli',
28 | underline: 'Altı xəttli',
29 |
30 | strong: 'Qalın',
31 | em: 'Vurğulu',
32 | del: 'Üzəri xəttli',
33 |
34 | unorderedList: 'İşarələnmiş siyahı',
35 | orderedList: 'Nömrələnmiş siyahı',
36 |
37 | insertImage: 'Şəkil yerləşdir',
38 | insertVideo: 'Video yerləşdir',
39 | link: 'Link',
40 | createLink: 'Link yerləşdir',
41 | unlink: 'Linki sil',
42 |
43 | justifyLeft: 'Sola nizamla',
44 | justifyCenter: 'Ortaya nizamla',
45 | justifyRight: 'Sağa nizamla',
46 | justifyFull: 'Üfüqi nizamla',
47 |
48 | horizontalRule: 'Üfüqi xətt əlavə et',
49 |
50 | fullscreen: 'Tam ekran',
51 |
52 | close: 'Bağla',
53 |
54 | submit: 'Təsdiq et',
55 | reset: 'Sıfırla',
56 |
57 | required: 'Vacib',
58 | description: 'Açıqlama',
59 | title: 'Başlıq',
60 | text: 'Mətn',
61 |
62 | removeformat: 'Formatlamanı təmizlə'
63 | };
64 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/it.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * it.js
3 | * Italian translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Mirko Buffoni
7 | */
8 |
9 | jQuery.trumbowyg.langs.it = {
10 | viewHTML: 'Mostra HTML',
11 |
12 | undo: 'Annulla',
13 | redo: 'Ripeti',
14 |
15 | formatting: 'Formattazione',
16 | p: 'Paragrafo',
17 | blockquote: 'Citazione',
18 | code: 'Codice',
19 | header: 'Intestazione',
20 |
21 | bold: 'Grassetto',
22 | italic: 'Italico',
23 | strikethrough: 'Barrato',
24 | underline: 'Sottolineato',
25 |
26 | strong: 'Rafforza',
27 | em: 'Enfatizza',
28 | del: 'Cancella',
29 |
30 | unorderedList: 'Elenco puntato',
31 | orderedList: 'Elenco numerato',
32 |
33 | insertImage: 'Inserisci immagine',
34 | insertVideo: 'Inserisci video',
35 | link: 'Collegamento',
36 | createLink: 'Crea un collegamento',
37 | unlink: 'Elimina collegamento',
38 |
39 | justifyLeft: 'Allinea a sinistra',
40 | justifyCenter: 'Centra',
41 | justifyRight: 'Allinea a destra',
42 | justifyFull: 'Giustifica',
43 |
44 | horizontalRule: 'Inserisci un separatore orizzontale',
45 |
46 | fullscreen: 'Schermo intero',
47 |
48 | close: 'Chiudi',
49 |
50 | submit: 'Invia',
51 | reset: 'Annulla',
52 |
53 | required: 'Obbligatorio',
54 | description: 'Descrizione',
55 | title: 'Titolo',
56 | text: 'Testo',
57 |
58 | removeformat: 'Rimuovi Formattazione',
59 |
60 | superscript: 'Apice',
61 | subscript: 'Pedice'
62 | };
63 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/sl.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * sl.js
3 | * Slovenian translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author: Matjaz Zavski (https://github.com/matjaz321)
7 | * Mod: Uros Gaber (uros@powercom.si)
8 | */
9 |
10 | jQuery.trumbowyg.langs.sl = {
11 | viewHTML: 'Prikaži HTML',
12 |
13 | undo: 'Razveljavi',
14 | redo: 'Ponovno uveljavi',
15 |
16 | formatting: 'Oblika',
17 | p: 'Odstavek',
18 | blockquote: 'Citat',
19 | code: 'Koda',
20 | header: 'Glava',
21 |
22 | bold: 'Krepko',
23 | italic: 'Ležeče',
24 | strikethrough: 'Prečrtano',
25 | underline: 'Podčrtano',
26 |
27 | strong: 'Odebljeno',
28 | em: 'Poudarjeno',
29 | del: 'Izbrisano',
30 |
31 | unorderedList: 'Neoštevilčen seznam',
32 | orderedList: 'Oštevilčen seznam',
33 |
34 | image: 'Slika',
35 | insertImage: 'Vstavi sliko',
36 | insertVideo: 'Vstavi video',
37 | link: 'Povezava',
38 | createLink: 'Vstavi povezavo',
39 | unlink: 'Odstrani povezavo',
40 |
41 | justifyLeft: 'Poravnava levo',
42 | justifyCenter: 'Poravnaj na sredino',
43 | justifyRight: 'Poravnava desno',
44 | justifyFull: 'Obojestranska poravnava',
45 |
46 | horizontalRule: 'Vstavite vodoravno črto',
47 | removeformat: 'Odstrani format',
48 |
49 | fullscreen: 'Celozaslonski način',
50 |
51 | close: 'Zapri',
52 |
53 | submit: 'Potrdi',
54 | reset: 'Prekliči',
55 |
56 | required: 'Zahtevano',
57 | description: 'Opis',
58 | title: 'Naslov',
59 | text: 'Besedilo'
60 | };
61 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/cs.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * cs.js
3 | * Czech translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Jan Svoboda (https://github.com/svoboda-jan)
7 | */
8 |
9 | jQuery.trumbowyg.langs.cs = {
10 | viewHTML: 'Zobrazit HTML',
11 |
12 | redo: 'Vpřed',
13 | undo: 'Zpět',
14 |
15 | formatting: 'Formátování',
16 | p: 'Odstavec',
17 | blockquote: 'Citace',
18 | code: 'Kód',
19 | header: 'Nadpis',
20 |
21 | bold: 'Tučné',
22 | italic: 'Kurzíva',
23 | strikethrough: 'Přeškrtnuté',
24 | underline: 'Podtržené',
25 |
26 | strong: 'Tučné',
27 | em: 'Zvýraznit',
28 | del: 'Přeškrtnuté',
29 |
30 | superscript: 'Horní index',
31 | subscript: 'Dolní index',
32 |
33 | unorderedList: 'Netříděný seznam',
34 | orderedList: 'Tříděný seznam',
35 |
36 | insertImage: 'Vložit obrázek',
37 | insertVideo: 'Vložit video',
38 | link: 'Odkaz',
39 | createLink: 'Vložit odkaz',
40 | unlink: 'Smazat odkaz',
41 |
42 | justifyLeft: 'Zarovnat doleva',
43 | justifyCenter: 'Zarovnat na střed',
44 | justifyRight: 'Zarovnat doprava',
45 | justifyFull: 'Zarovnat do bloku',
46 |
47 | horizontalRule: 'Vložit vodorovnou čáru',
48 |
49 |
50 | removeformat: 'Vymazat formátování',
51 | fullscreen: 'Režim celé obrazovky',
52 |
53 | close: 'Zavřít',
54 |
55 | submit: 'Potvrdit',
56 | reset: 'Zrušit',
57 |
58 | required: 'Povinné',
59 | description: 'Popis',
60 | title: 'Nadpis',
61 | text: 'Text',
62 | target: 'Cíl'
63 | };
64 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/sq.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * sq.js
3 | * Albanian translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Adalen Vladi
7 | */
8 |
9 | jQuery.trumbowyg.langs.sq = {
10 |
11 | viewHTML: 'Shfaq HTML',
12 |
13 | undo: 'Prish',
14 | redo: 'Ribej',
15 |
16 | formatting: 'Formatimi',
17 | p: 'Paragraf',
18 | blockquote: 'Citat',
19 | code: 'Kodi',
20 | header: 'Koka',
21 |
22 | bold: 'Spikatur',
23 | italic: 'Pjerret',
24 | strikethrough: 'Vize ne mes',
25 | underline: 'Nenvizo',
26 |
27 | strong: 'I trashe',
28 | em: 'I theksuar',
29 | del: 'I fshire',
30 |
31 | superscript: 'Indeks i sipërm',
32 | subscript: 'Indeks i poshtem',
33 |
34 | unorderedList: 'Liste e parenditur',
35 | orderedList: 'Liste e renditur',
36 |
37 |
38 | insertImage: 'Fut Foto',
39 | insertVideo: 'Fut Video',
40 | link: 'Link',
41 | createLink: 'Krijo Link',
42 | unlink: 'Hiq Link',
43 |
44 | justifyLeft: 'Drejto Majtas',
45 | justifyCenter: 'Drejto ne Qender',
46 | justifyRight: 'Drejto Djathtas',
47 | justifyFull: 'Drejto Vete',
48 |
49 | horizontalRule: 'Vendos rregulloren horizontale',
50 | removeformat: 'Hiq formatin',
51 |
52 | fullscreen: 'Ekran i plotë',
53 |
54 | close: 'Mbyll',
55 |
56 | submit: 'Konfirmo',
57 | reset: 'Anullo',
58 |
59 | required: 'I detyrueshem',
60 | description: 'Pershkrimi',
61 | title: 'Titulli',
62 | text: 'Tekst',
63 | target: 'Objektivi',
64 | width: 'Gjeresia'
65 | };
66 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/tr.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * tr.js
3 | * Turkish translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Emrah Bilbay (munzur)
7 | * Github : https://github.com/munzur
8 | *
9 | * Özgür Görgülü (ozgurg)
10 | * Github : https://github.com/ozgurg
11 | */
12 |
13 | jQuery.trumbowyg.langs.tr = {
14 | viewHTML: 'HTML Kodu',
15 |
16 | undo: 'Yinele',
17 | redo: 'Geri al',
18 |
19 | formatting: 'Biçimlendirme',
20 | p: 'Paragraf',
21 | blockquote: 'Alıntı',
22 | code: 'Kod',
23 | header: 'Başlık',
24 |
25 | bold: 'Kalın',
26 | italic: 'İtalik',
27 | strikethrough: 'Üzeri çizgili',
28 | underline: 'Altı çizgili',
29 |
30 | strong: 'Koyu',
31 | em: 'Vurgulu',
32 | del: 'Üzeri çizgili',
33 |
34 | unorderedList: 'Simgeli liste',
35 | orderedList: 'Numaralı liste',
36 |
37 | insertImage: 'Resim yerleştir',
38 | insertVideo: 'Video yerleştir',
39 | link: 'Link',
40 | createLink: 'Link yerleştir',
41 | unlink: 'Linki sil',
42 |
43 | justifyLeft: 'Sola hizala',
44 | justifyCenter: 'Ortaya hizala',
45 | justifyRight: 'Sağa hizala',
46 | justifyFull: 'Yasla',
47 |
48 | horizontalRule: 'Yatay satır ekle',
49 |
50 | fullscreen: 'Tam ekran',
51 |
52 | close: 'Kapat',
53 |
54 | submit: 'Onayla',
55 | reset: 'Sıfırla',
56 |
57 | required: 'Gerekli',
58 | description: 'Açıklama',
59 | title: 'Başlık',
60 | text: 'Metin',
61 |
62 | removeformat: 'Biçimlendirmeyi temizle'
63 | };
64 |
--------------------------------------------------------------------------------
/spec/rails_helper.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative 'spec_helper'
4 |
5 | require 'zeitwerk'
6 | loader = Zeitwerk::Loader.new
7 | loader.push_dir("#{__dir__}/page_objects")
8 | loader.setup
9 |
10 | ENV['RAILS_ENV'] = 'test'
11 |
12 | require File.expand_path('dummy/config/environment.rb', __dir__)
13 |
14 | abort('The Rails environment is running in production mode!') if Rails.env.production?
15 |
16 | require 'rspec/rails'
17 | require 'capybara/rails'
18 |
19 | Dir[File.expand_path('support/**/*.rb', __dir__)].each { |f| require_relative f }
20 |
21 | # Checks for pending migrations and applies them before tests are run.
22 | # If you are not using ActiveRecord, you can remove these lines.
23 | begin
24 | ActiveRecord::Migration.maintain_test_schema!
25 | rescue ActiveRecord::PendingMigrationError => e
26 | puts e.to_s.strip
27 | exit 1
28 | end
29 |
30 | RSpec.configure do |config|
31 | if Gem::Version.new(Rails.version) >= Gem::Version.new('7.1')
32 | config.fixture_paths = [Rails.root.join('spec/fixtures')]
33 | else
34 | config.fixture_path = Rails.root.join('spec/fixtures')
35 | end
36 |
37 | config.infer_spec_type_from_file_location!
38 | config.filter_rails_from_backtrace!
39 |
40 | config.use_transactional_fixtures = true
41 | config.use_instantiated_fixtures = false
42 | config.render_views = false
43 |
44 | config.before(:suite) do
45 | intro = ('-' * 80)
46 | intro << "\n"
47 | intro << "- Ruby: #{RUBY_VERSION}\n"
48 | intro << "- Rails: #{Rails.version}\n"
49 | intro << "- ActiveAdmin: #{ActiveAdmin::VERSION}\n"
50 | intro << ('-' * 80)
51 |
52 | RSpec.configuration.reporter.message(intro)
53 | end
54 | end
55 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/da.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * da.js
3 | * Danish translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Christian Pedersen
7 | * Github : https://github.com/chripede
8 | */
9 |
10 | jQuery.trumbowyg.langs.da = {
11 | viewHTML: 'Vis HTML',
12 |
13 | undo: 'Fortryd',
14 | redo: 'Anuller fortryd',
15 |
16 | formatting: 'Formattering',
17 | p: 'Afsnit',
18 | blockquote: 'Citat',
19 | code: 'Kode',
20 | header: 'Overskrift',
21 |
22 | bold: 'Fed',
23 | italic: 'Kursiv',
24 | strikethrough: 'Gennemstreg',
25 | underline: 'Understreg',
26 |
27 | strong: 'Vigtig',
28 | em: 'Fremhæv',
29 | del: 'Slettet',
30 |
31 | superscript: 'Hævet skrift',
32 | subscript: 'Sænket skrift',
33 |
34 | unorderedList: 'Uordnet liste',
35 | orderedList: 'Ordnet liste',
36 |
37 | insertImage: 'Indsæt billede',
38 | insertVideo: 'Indsæt video',
39 | link: 'Link',
40 | createLink: 'Indsæt link',
41 | unlink: 'Fjern link',
42 |
43 | justifyLeft: 'Venstrestil',
44 | justifyCenter: 'Centrer',
45 | justifyRight: 'Højrestil',
46 | justifyFull: 'Lige margener',
47 |
48 | horizontalRule: 'Horisontal linie',
49 | removeformat: 'Ryd formattering',
50 |
51 | fullscreen: 'Fuld skærm',
52 |
53 | close: 'Luk',
54 |
55 | submit: 'Bekræft',
56 | reset: 'Annuller',
57 |
58 | required: 'Påkrævet',
59 | description: 'Beskrivelse',
60 | title: 'Titel',
61 | text: 'Tekst',
62 | target: 'Mål',
63 | width: 'Bredde'
64 | };
65 |
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/plugins/colors/ui/trumbowyg.colors.min.css:
--------------------------------------------------------------------------------
1 | /** Trumbowyg v2.31.0 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg/ - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */
2 | .trumbowyg-dropdown-backColor:not(.trumbowyg-dropdown--color-list),.trumbowyg-dropdown-foreColor:not(.trumbowyg-dropdown--color-list){max-width:276px;padding:7px 5px;overflow:initial}.trumbowyg-dropdown-backColor:not(.trumbowyg-dropdown--color-list) button,.trumbowyg-dropdown-foreColor:not(.trumbowyg-dropdown--color-list) button{display:block;position:relative;float:left;text-indent:-9999px;height:20px;width:20px;border:1px solid #333;padding:0;margin:2px}.trumbowyg-dropdown-backColor:not(.trumbowyg-dropdown--color-list) button:focus::after,.trumbowyg-dropdown-backColor:not(.trumbowyg-dropdown--color-list) button:hover::after,.trumbowyg-dropdown-foreColor:not(.trumbowyg-dropdown--color-list) button:focus::after,.trumbowyg-dropdown-foreColor:not(.trumbowyg-dropdown--color-list) button:hover::after{content:" ";display:block;position:absolute;top:-5px;left:-5px;width:27px;height:27px;background:inherit;border:1px solid #fff;-webkit-box-shadow:#000 0 0 2px;box-shadow:#000 0 0 2px;z-index:10}.trumbowyg-dropdown-backColor.trumbowyg-dropdown--color-list button:not(.trumbowyg-backColorRemove-dropdown-button){position:relative;color:#fff!important}.trumbowyg-dropdown-backColor.trumbowyg-dropdown--color-list button:not(.trumbowyg-backColorRemove-dropdown-button):focus::after,.trumbowyg-dropdown-backColor.trumbowyg-dropdown--color-list button:not(.trumbowyg-backColorRemove-dropdown-button):hover::after{content:" ";display:block;position:absolute;top:13px;left:0;width:0;height:0;border:5px solid transparent;border-left-color:#fff}
--------------------------------------------------------------------------------
/app/assets/javascripts/activeadmin/trumbowyg/langs/es.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * es.js
3 | * Spanish translation for Trumbowyg
4 | * http://alex-d.github.com/Trumbowyg
5 | * ===========================================================
6 | * Author : Moisés Márquez
7 | * Email : moises.marquez.g@gmail.com
8 | */
9 |
10 | jQuery.trumbowyg.langs.es = {
11 | viewHTML: 'Ver HTML',
12 |
13 | undo: 'Deshacer',
14 | redo: 'Rehacer',
15 |
16 | formatting: 'Formato',
17 | p: 'Párrafo',
18 | blockquote: 'Cita',
19 | code: 'Código',
20 | header: 'Título',
21 |
22 | bold: 'Negrita',
23 | italic: 'Cursiva',
24 | strikethrough: 'Tachado',
25 | underline: 'Subrayado',
26 |
27 | strong: 'Negrita',
28 | em: 'Énfasis',
29 | del: 'Borrar',
30 |
31 | superscript: 'Sobrescrito',
32 | subscript: 'Subíndice',
33 |
34 | unorderedList: 'Lista Desordenada',
35 | orderedList: 'Lista Ordenada',
36 |
37 | insertImage: 'Insertar una imagen',
38 | insertVideo: 'Insertar un vídeo',
39 | link: 'Enlace',
40 | createLink: 'Insertar un enlace',
41 | unlink: 'Suprimir un enlace',
42 |
43 | justifyLeft: 'Izquierda',
44 | justifyCenter: 'Centrar',
45 | justifyRight: 'Derecha',
46 | justifyFull: 'Justificado',
47 |
48 | horizontalRule: 'Insertar separador horizontal',
49 | removeformat: 'Eliminar formato',
50 |
51 | fullscreen: 'Pantalla completa',
52 |
53 | close: 'Cerrar',
54 |
55 | submit: 'Enviar',
56 | reset: 'Cancelar',
57 |
58 | required: 'Obligatorio',
59 | description: 'Descripción',
60 | title: 'Título',
61 | text: 'Texto',
62 | target: 'Target'
63 | };
64 |
--------------------------------------------------------------------------------