GithubHelp home page GithubHelp logo

parndt / refinerycms-wymeditor Goto Github PK

View Code? Open in Web Editor NEW
16.0 6.0 39.0 220 KB

WYMeditor extension for Refinery CMS

Home Page: http://refinerycms.com

Ruby 4.09% JavaScript 87.15% HTML 0.99% SCSS 7.76%

refinerycms-wymeditor's Introduction

Refinery CMS WYMeditor (the visual editor)

Build Status

Refinery CMS is backed by WYMeditor

It's a standards compliant editor that we've trimmed to only have what we feel is absolutely necessary. When you're editing the content in a page part you're using WYMeditor.

We have since modified the source code of WYMeditor to allow for a lot of new features like our custom dialogues however it is all based on the release: WYMeditor 0.5 rc1.

You can also switch to "source" view and edit HTML manually if the visual editor is not playing nice.

Installation

Simply put this in the Gemfile of your Refinery application:

gem 'refinerycms-wymeditor', ['~> 3.0', '>= 3.0.0']

Now, run bundle install

Next, to install the WYMeditor extension run:

rails generate refinery:wymeditor

Custom Selectable Styles in WYMeditor

Some sites require a little more than just your standard bold and heading controls. This is where the "css" style drop down comes in handy.

It allows your users to select a style you define. You need to edit/create a CSS file called theme.css.

This file should be located in /public/stylesheets/themes.css

Inside that file you define your styles like this

.category-name-style-name {
  // apply your CSS rules here
}

For example, if I wanted to add a style that allowed my users to highlight their text a light yellow colour, I would put this

.text-highlight-yellow {
  background: LightYellow;
}

Now edit public/javascripts/admin.js. We're going to need to tell WYMeditor that we have some new styles it should load when the editor is loaded.

Currently your admin.js file will have something like this

var custom_visual_editor_boot_options = {

};

If we open public/javascripts/boot_wym.js we might see the default inside:

, classesItems: [
  {name: 'text-align', rules:['left', 'center', 'right', 'justify'], join: '-'}
  , {name: 'image-align', rules:['left', 'right'], join: '-'}
  , {name: 'font-size', rules:['small', 'normal', 'large'], join: '-'}
]

Let's just breakdown a single WYMeditor line and understand it:

{name: 'font-size', rules:['small','normal','large'], join: '-'}

font-size is the name of the category and small, normal, large are the actual styles. So for this to match up with the styles in my theme.css file the class name has to be:

.font-size-small { // CSS rules here }
.font-size-normal { // CSS rules here }
.font-size-large { // CSS rules here }

So going back to our text highlighting style above, we make the new style show up in the editor by changing our admin.js file to:

var custom_visual_editor_boot_options = {
  classesItems: [
    {name: 'text-align', rules:['left', 'center', 'right', 'justify'], join: '-'}
    , {name: 'image-align', rules:['left', 'right'], join: '-'}
    , {name: 'font-size', rules:['small','normal','large'], join: '-'}
    , {name: 'text-highlight', rules:['yellow'], join: '-'}
  ]
}

Dialogs that show from WYMeditor

Page Link dialog

The link dialog lets you link in several different ways:

  • To an internal page
  • To an external page
  • To an email address
  • To a resource you've uploaded in the Resources tab.

Insert Image dialog

Simply lets you select from an existing image found in the Images tab or upload a new one right within the dialog.

refinerycms-wymeditor's People

Contributors

andytime avatar anitagraham avatar asgeo1 avatar bricesanchez avatar cjyate avatar evenreven avatar ghoppe avatar j15e avatar kalleth avatar parndt avatar simi avatar ugisozols avatar unknown-guy avatar veger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

refinerycms-wymeditor's Issues

Issue with WYM Editor in production

When running the app in development, the administrative backend's WYM looks like this
wym_css_proper
However, after deploying (assets are always precompiled at deploy time), the production environment looks like
wym_css_issue
I know that there was a bug for some CSS issues, so I wanted to see if there was anything you all could think of. I'll be happy to answer any questions you may have.

Adding nested tags

(eg) I added a section tag, I want a p and h4 within the section. I'm not able to achieve this with the wymeditor.

Image dialog passes wymeditor=true param in URL rather than visual_editor=true

I'm guessing this has to do with when this gem was separated out from the main refinery project.

Refinery now assumes there will be a visual_editor=true param in the image dialog URLs. However this gem is still passing wymeditor=true.

See:

var path = this._wym._options.dialogPath + dialogType + '?wymeditor=true&' + window.location.href.match(/switch_locale=[a-z]{2}(?:-[A-Z]{2})?/);

and

https://github.com/refinery/refinerycms/blob/684a9bfcc39aa498164de847bb37900941938fc9/core/app/views/layouts/refinery/admin_dialog.html.erb#L7

The main thing this breaks is that if you click on the pagination links in the image dialog, and then try to select an image to insert into the page content, it won't work because the . visual_editor_iframe_body class is missing!

I'm surprised this hasn't been noticed earlier?

I would submit a PR, except I'm not sure where you would want this fix? In this project or in refinerycms core?

Only allow image upload, not image select

Hi there

Is it possible to restrict this editor, to only allow the user to upload an image, and not choose an existing one from the already uploaded images?

I tried in earlier version of Refinery to hack around it, with hiding tabs etc... But that wasn't a solid solution.

Kind regards

wymeditor could not find all assets

I have to include following assets directly into my public folder:

public/assets/refinery/formatting.css
public/assets/refinery/theme.css
public/assets/wymeditor/lang/de.js
public/assets/skins/refinery/wymiframe.css

to remove a few 404 errors.. why are these files not loaded correctly through the rails asset pipeline?

Further I have a problem with precompiled assets:

"NetworkError: 404 Not Found - http://my-domain.com/assets/wymeditor/skins/refinery/html5/h1-34fd10a7c7f09d1652329c96543a039e.png"
"NetworkError: 404 Not Found - http://my-domain.com/assets/wymeditor/skins/refinery/html5/p-e482be71ffd131e6c25340378e37ae98.png

And if I take a look into my public assets folder on production I can see following files in the public/assets/wymeditor/skins/refinery/html5 directory:

h1-8822cc5e930e7e2fe2d754b4ea64780c.png
h1.png
p-8d766d51f785ed9f10b2d934e29b79ef.png
p.png

So is there something cached for the wymeditor? Or why does the editor requests "old" precompiled assets? If I use the h2-tag odr h3-tag I also get the same 404 not found error.
Any ideas what I am doing wrong or what could solve my problem?

I only have these problems on production btw.

Cannot update to Rails 5.2.2

We're trying to upgrade from rails 5.1.0 to rails 5.2.2 to use the following funcitonality: rails/rails@1813350

But we can't seem to upgrade because:

Bundler could not find compatible versions for gem "actionpack":
  In Gemfile:
    actionpack

    actionpack-action_caching was resolved to 1.2.0, which depends on
      actionpack (>= 4.0.0, < 6)

    rails (~> 5.2.2) was resolved to 5.2.2, which depends on
      actionpack (= 5.2.2)

    refinerycms-wymeditor was resolved to 2.0.0, which depends on
      refinerycms-core (>= 4.0.0.dev, < 5.0) was resolved to 4.0.3, which depends on
        actionpack (>= 5.1.0, < 5.2)

    refinerycms-i18n was resolved to 4.0.1, which depends on
      routing-filter (>= 0.4.0) was resolved to 0.6.2, which depends on
        actionpack (>= 4.2, < 6)

Saving page results in Internal Server Error

I Created a new page, set title, parent and added some content.

When clicking save I got this error:

ActionView::Template::Error (undefined method `find_asset' for nil:NilClass):
     5:     <meta charset='<%= ::Rails.application.config.encoding %>' />
     6:     <meta httpequiv="XUACompatible" content="IE=edge,chrome=1" />
     7:     <%= stylesheet_link_tag "wymeditor/skins/refinery/wymiframe", :media => "all" %>
     8:     <%= stylesheet_link_tag "formatting", :media => "all" if Rails.application.assets.find_asset('formatting.css') %>
     9:     <%= stylesheet_link_tag "theme", :media => "all" %>
    10:     <%= javascript_include_tag 'modernizr-min' %>
    11:   </head>

I am using (pre-)compiled assets on my production environment.

The error seems to be related to rails/sprockets-rails#311

Installing gem overwrites the railties binstubs

On installing this gem (v1.0.4) the rails and rake files in .rvm/gems/ruby-x.y.z/bin are modified, to load the binstubs from wymeditor instead of those in the railties gem.

rvm/gems/ruby-2.1.5/bin/rails before:

#!/usr/bin/env ruby_executable_hooks
#
# This file was generated by RubyGems.
#
# The application 'railties' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'rubygems'

version = ">= 0"

if ARGV.first
  str = ARGV.first
  str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
  if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
    version = $1
    ARGV.shift
  end
end

gem 'railties', version
load Gem.bin_path('railties', 'rails', version)

after:

#!/usr/bin/env ruby_executable_hooks
#
# This file was generated by RubyGems.
#
# The application 'refinerycms-wymeditor' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'rubygems'

version = ">= 0"

if ARGV.first
  str = ARGV.first
  str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
  if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
    version = $1
    ARGV.shift
  end
end

gem 'refinerycms-wymeditor', version
load Gem.bin_path('refinerycms-wymeditor', 'rails', version)

(see also refinery/refinerycms#2854)

Add Markdown support

At the moment the editor only supports WYSIWYG and HTML text entry and for simple pages that is fine, especially when you can create custom styles if you need a couple more predefined text formatting options but this is bound to get increasingly tiresome if the author's requirements go beyond just a couple of edge cases.

This had been mentioned in the past on the forums but things didn't progress at all.

Of course, this task could be performed elsewhere and then one could just paste the resulting HTML but, why not directly integrate this step into the workflow?

My initial proposal would be to have some sort of option in the editor panel that toggles the Markdown mode. Markdown would feed into the HTML which would then feed into the text preview.

If you guys think this is a feature you could use upstream, I'm very much willing to go away and implement it myself.

admin.js override different from real code custom_visual_editor_boot_options

In the readme it says we should set the custom_visual_editor_boot_options in the admin.js file.

However if one uses:

rake refinery:override javascript=admin

it generates:

if (typeof(custom_visual_editor_options) == "undefined") {
  custom_visual_editor_options = {};
}

The latter will not work. It should be the variable from the documentation: custom_visual_editor_boot_options

How to add custom styles?

Looks like readme is absolutely outdated, and all instructions in other sourced does not work for me also. Can anyone make this work?

dont have config files

I dont have any wymeditor files for editing white list tags

Gemfile:

gem 'refinerycms', '~> 3.0'
gem 'refinerycms-i18n'
gem 'refinerycms-blocks', :git => 'https://site.com/git/refinerycms-blocks'

gem 'refinerycms-acts-as-indexed', ['~> 2.0', '>= 2.0.1']
gem 'refinerycms-wymeditor', ['~> 1.0', '>= 1.0.6']
gem 'refinerycms-authentication-devise', '~> 1.0'
gem 'refinerycms-blog', git: 'https://github.com/refinery/refinerycms-blog', branch: 'master'
gem 'refinerycms-search', github: 'refinery/refinerycms-search', branch: 'master'
gem 'refinerycms-page-images', '~> 3.0.0', github: "refinery/refinerycms-page-images", branch: "master"

In Gemfile.lock:

refinerycms-wymeditor (1.0.7)
      refinerycms-core (>= 3.0.0, < 5.0)

DEPENDENCIES
  refinerycms-wymeditor (~> 1.0, >= 1.0.6)

rails generate refinery:wymeditor returns undefined method `<<' for nil:NilClass (NoMethodError)

Gemfile:

source 'https://rubygems.org'                                                                                                                                                                                                                                                                                                                                                                                                                                                  
ruby   '2.1.0'
# TODO: Version the gems!

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 4.1.0'

# Use sqlite3 as the database for Active Record
gem 'pg'

# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0'
gem 'foundation-rails'

# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
gem 'jbuilder', '~> 1.2'

gem 'rails-backbone', github: 'codebrew/backbone-rails'
gem 'jquery-rails'
gem 'jquery-ui-rails'
gem 'json2-rails'
gem 'slim'
gem 'slim-rails'

gem 'curb', '0.8.6'

gem 'aiua_calculator_wrapper', path: 'vendor/gems/aiua_calculator_wrapper-1.0.6'
gem 'aiua_zone_processor', path: 'vendor/gems/aiua_zone_processor-1.1.0'
gem 'aiua_gis_wrapper', path: 'vendor/gems/aiua_gis_wrapper-0.0.1'

gem 'sorcery', '~> 0.8.5'
gem 'refinerycms-i18n', github: 'refinery/refinerycms-i18n', branch: 'master'
gem 'refinerycms', github: 'refinery/refinerycms', branch: 'master'
gem 'refinerycms-wymeditor', ['~> 1.0', '>= 1.0.7']
gem 'unicorn'
gem 'sidekiq'
gem 'foreman'
gem 'dotenv'
gem 'figaro'

gem 'balanced', '~> 1.0.2'
gem 'faraday','~> 0.8.6'

gem 'cocoon'
gem 'default_value_for', '~> 3.0.0'
gem 'gmaps4rails'
gem 'map'
gem 'money', github: 'RubyMoney/money'
gem 'money-rails', github: 'avbrychak/money-rails'
gem 'monetize', github: 'RubyMoney/monetize'
gem 'rails-settings-cached', '0.4.1'
gem 'simple_enum'
gem 'simple_form'
gem 'dragonfly-s3_data_store'
gem 'unf'
gem 's3_file_field'


group :development, :test do
  gem 'better_errors'
  #gem 'jazz_hands'
  gem 'factory_girl'
  gem 'database_cleaner'
  gem 'rspec-rails', "~> 2.14.2"
  gem 'shoulda-matchers'
  gem 'capybara'
  gem 'capybara-screenshot'
  gem 'capybara-firebug'
  gem 'guard-rspec', require: false
  gem 'faker'
  gem 'jasmine'
  gem 'selenium-webdriver'
  gem 'poltergeist', '~> 1.13.0'
  # gem 'phantomjs', require: 'phantomjs/poltergeist'
end

group :test do
  gem 'simplecov', :require => false
end

group :development do
  gem 'annotate'
  gem 'capistrano', '~> 3.1.0'
  gem 'capistrano-rails',   require: false
  gem 'capistrano-chruby',  require: false
  gem 'capistrano-sidekiq', require: false
  gem "meta_request"
end

group :execjs do
  gem "therubyracer", platform: :ruby
end

gem 'refinerycms-suggestions', path: 'vendor/extensions'
gem 'refinerycms-settings', github: 'refinery/refinerycms-settings', branch: 'master'

gem 'quiet_assets'

Terminal Output:

$ bundle exec rails generate refinery:wymeditor

-- DEPRECATION WARNING --
The use of 'Refinery::Plugin#activity=' is deprecated and will be removed at version 3.1.
/home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/gems/refinerycms-wymeditor-1.1.0/lib/refinery/wymeditor/engine.rb:42:in `block in <class:Engine>': undefined method `<<' for nil:NilClass (NoMethodError)
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/bundler/gems/refinerycms-5441303330de/core/lib/refinery/core/engine.rb:25:in `call'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/bundler/gems/refinerycms-5441303330de/core/lib/refinery/core/engine.rb:25:in `each'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/bundler/gems/refinerycms-5441303330de/core/lib/refinery/core/engine.rb:25:in `refinery_inclusion!'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:438:in `instance_exec'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:438:in `block in make_lambda'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:184:in `call'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:184:in `block in simple'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:185:in `call'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:185:in `block in simple'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:86:in `call'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:86:in `run_callbacks'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/gems/actionpack-4.1.8/lib/action_dispatch/middleware/reloader.rb:83:in `prepare!'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/gems/actionpack-4.1.8/lib/action_dispatch/middleware/reloader.rb:55:in `prepare!'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/gems/railties-4.1.8/lib/rails/application/finisher.rb:52:in `block in <module:Finisher>'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/gems/railties-4.1.8/lib/rails/initializable.rb:30:in `instance_exec'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/gems/railties-4.1.8/lib/rails/initializable.rb:30:in `run'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/gems/railties-4.1.8/lib/rails/initializable.rb:55:in `block in run_initializers'
        from /home/david/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
        from /home/david/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
        from /home/david/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:418:in `block (2 levels) in each_strongly_connected_component_from'
        from /home/david/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:418:in `block (2 levels) in each_strongly_connected_component_from'
        from /home/david/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:418:in `block (2 levels) in each_strongly_connected_component_from'
        from /home/david/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:418:in `block (2 levels) in each_strongly_connected_component_from'
        from /home/david/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
        from /home/david/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:417:in `block in each_strongly_connected_component_from'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/gems/railties-4.1.8/lib/rails/initializable.rb:44:in `each'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/gems/railties-4.1.8/lib/rails/initializable.rb:44:in `tsort_each_child'
        from /home/david/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:411:in `call'
        from /home/david/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:411:in `each_strongly_connected_component_from'
        from /home/david/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:417:in `block in each_strongly_connected_component_from'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/gems/railties-4.1.8/lib/rails/initializable.rb:44:in `each'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/gems/railties-4.1.8/lib/rails/initializable.rb:44:in `tsort_each_child'
        from /home/david/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:411:in `call'
        from /home/david/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:411:in `each_strongly_connected_component_from'
        from /home/david/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:417:in `block in each_strongly_connected_component_from'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/gems/railties-4.1.8/lib/rails/initializable.rb:44:in `each'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/gems/railties-4.1.8/lib/rails/initializable.rb:44:in `tsort_each_child'
        from /home/david/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:411:in `call'
        from /home/david/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:411:in `each_strongly_connected_component_from'
        from /home/david/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:417:in `block in each_strongly_connected_component_from'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/gems/railties-4.1.8/lib/rails/initializable.rb:44:in `each'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/gems/railties-4.1.8/lib/rails/initializable.rb:44:in `tsort_each_child'
        from /home/david/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:411:in `call'
        from /home/david/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:411:in `each_strongly_connected_component_from'
        from /home/david/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
        from /home/david/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:345:in `each'
        from /home/david/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:345:in `call'
        from /home/david/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
        from /home/david/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
        from /home/david/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/gems/railties-4.1.8/lib/rails/initializable.rb:54:in `run_initializers'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/gems/railties-4.1.8/lib/rails/application.rb:300:in `initialize!'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/gems/railties-4.1.8/lib/rails/railtie.rb:194:in `public_send'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/gems/railties-4.1.8/lib/rails/railtie.rb:194:in `method_missing'
        from /home/david/work/aiua/eapps/config/environment.rb:5:in `<top (required)>'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `require'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `block in require'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:232:in `load_dependency'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `require'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/gems/railties-4.1.8/lib/rails/application.rb:276:in `require_environment!'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:147:in `require_application_and_environment!'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:133:in `generate_or_destroy'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:51:in `generate'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
        from /home/david/.rvm/gems/ruby-2.1.0@aiua_eapps/gems/railties-4.1.8/lib/rails/commands.rb:17:in `<top (required)>'
        from bin/rails:4:in `require'
        from bin/rails:4:in `<main>'

Problems deploying to heroku (refinery edge)

This is the log from Heroku just after the push:

2014-05-14T01:48:54+00:00 heroku[slug-compiler]: Slug compilation started
2014-05-14T01:50:49.268249+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 19039 -e production` 
2014-05-14T01:50:54.896998+00:00 app[web.1]: => Booting WEBrick 
2014-05-14T01:50:54.897881+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bundler/gems/refinerycms-wymeditor-05b5e70d400b/app/decorators/models/refinery/page_decorator.rb:7:in `singleton class' 
2014-05-14T01:50:54.897016+00:00 app[web.1]: => Rails 4.1.0 application starting in production on http://0.0.0.0:19039
2014-05-14T01:50:54.897021+00:00 app[web.1]: => Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
2014-05-14T01:50:54.897018+00:00 app[web.1]: => Run `rails server -h` for more startup options
2014-05-14T01:50:54.897022+00:00 app[web.1]: => Ctrl-C to shutdown server
2014-05-14T01:50:54.897876+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/core_ext/module/aliasing.rb:32:in `alias_method': undefined method `reserved_words' for class `Class' (NameError)
2014-05-14T01:50:54.897879+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/core_ext/module/aliasing.rb:32:in `alias_method_chain'
2014-05-14T01:50:54.897024+00:00 app[web.1]: Exiting
2014-05-14T01:50:54.897895+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bundler/gems/refinerycms-wymeditor-05b5e70d400b/app/decorators/models/refinery/page_decorator.rb:3:in `<class:FriendlyIdOptions>'
2014-05-14T01:50:54.897906+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `require'
2014-05-14T01:50:54.897908+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `block in require'
2014-05-14T01:50:54.897909+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:232:in `load_dependency'
2014-05-14T01:50:54.897901+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bundler/gems/refinerycms-wymeditor-05b5e70d400b/app/decorators/models/refinery/page_decorator.rb:2:in `block in <top (required)>'
2014-05-14T01:50:54.897903+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bundler/gems/refinerycms-wymeditor-05b5e70d400b/app/decorators/models/refinery/page_decorator.rb:1:in `class_eval'
2014-05-14T01:50:54.897905+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bundler/gems/refinerycms-wymeditor-05b5e70d400b/app/decorators/models/refinery/page_decorator.rb:1:in `<top (required)>'
2014-05-14T01:50:54.897911+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `require'
2014-05-14T01:50:54.897913+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:348:in `require_or_load'
2014-05-14T01:50:54.897914+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:307:in `depend_on'
2014-05-14T01:50:54.897915+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:225:in `require_dependency'
2014-05-14T01:50:54.897921+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/engine.rb:467:in `block in eager_load!'
2014-05-14T01:50:54.897917+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/engine.rb:468:in `block (2 levels) in eager_load!'
2014-05-14T01:50:54.897919+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/engine.rb:467:in `each'
2014-05-14T01:50:54.897925+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/engine.rb:465:in `each'
2014-05-14T01:50:54.897926+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/engine.rb:465:in `eager_load!'
2014-05-14T01:50:54.897928+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/engine.rb:346:in `eager_load!'
2014-05-14T01:50:54.897929+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/application/finisher.rb:58:in `each'
2014-05-14T01:50:54.897931+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/application/finisher.rb:58:in `block in <module:Finisher>'
2014-05-14T01:50:54.897932+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/initializable.rb:30:in `instance_exec'
2014-05-14T01:50:54.897936+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
2014-05-14T01:50:54.897934+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/initializable.rb:30:in `run'
2014-05-14T01:50:54.897935+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/initializable.rb:55:in `block in run_initializers'
2014-05-14T01:50:54.897940+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
2014-05-14T01:50:54.897941+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:210:in `block (2 levels) in each_strongly_connected_component_from'
2014-05-14T01:50:54.897943+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:210:in `block (2 levels) in each_strongly_connected_component_from'
2014-05-14T01:50:54.897944+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:210:in `block (2 levels) in each_strongly_connected_component_from'
2014-05-14T01:50:54.897945+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
2014-05-14T01:50:54.897947+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:209:in `block in each_strongly_connected_component_from'
2014-05-14T01:50:54.897950+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/initializable.rb:44:in `each'
2014-05-14T01:50:54.897953+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:203:in `each_strongly_connected_component_from'
2014-05-14T01:50:54.897954+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:209:in `block in each_strongly_connected_component_from'
2014-05-14T01:50:54.897952+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/initializable.rb:44:in `tsort_each_child'
2014-05-14T01:50:54.897958+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/initializable.rb:44:in `each'
2014-05-14T01:50:54.897959+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/initializable.rb:44:in `tsort_each_child'
2014-05-14T01:50:54.897962+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:203:in `each_strongly_connected_component_from'
2014-05-14T01:50:54.897963+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:209:in `block in each_strongly_connected_component_from'
2014-05-14T01:50:54.897967+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/initializable.rb:44:in `each'
2014-05-14T01:50:54.897968+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/initializable.rb:44:in `tsort_each_child'
2014-05-14T01:50:54.897971+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:203:in `each_strongly_connected_component_from'
2014-05-14T01:50:54.897976+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:180:in `each'
2014-05-14T01:50:54.897973+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
2014-05-14T01:50:54.897981+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
2014-05-14T01:50:54.897980+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
2014-05-14T01:50:54.897984+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/initializable.rb:54:in `run_initializers'
2014-05-14T01:50:54.897986+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/application.rb:288:in `initialize!'
2014-05-14T01:50:54.897994+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2014-05-14T01:50:54.897996+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `require'
2014-05-14T01:50:54.897997+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `block in require'
2014-05-14T01:50:54.898010+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:232:in `load_dependency'
2014-05-14T01:50:54.898012+00:00 app[web.1]: from /app/config.ru:3:in `block in <main>'
2014-05-14T01:50:54.898011+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `require'
2014-05-14T01:50:54.898017+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
2014-05-14T01:50:54.898018+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
2014-05-14T01:50:54.898022+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
2014-05-14T01:50:54.898019+00:00 app[web.1]: from /app/config.ru:in `new'
2014-05-14T01:50:54.898021+00:00 app[web.1]: from /app/config.ru:in `<main>'
2014-05-14T01:50:54.898025+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
2014-05-14T01:50:54.898028+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
2014-05-14T01:50:54.898027+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
2014-05-14T01:50:54.898029+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
2014-05-14T01:50:54.898036+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:250:in `start'
2014-05-14T01:50:54.898039+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/commands/server.rb:69:in `start'
2014-05-14T01:50:54.898034+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
2014-05-14T01:50:54.898033+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/commands/server.rb:50:in `app'
2014-05-14T01:50:54.898043+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:76:in `tap'
2014-05-14T01:50:54.898040+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:81:in `block in server'
2014-05-14T01:50:54.898045+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:76:in `server'
2014-05-14T01:50:54.898050+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/commands.rb:17:in `<top (required)>'
2014-05-14T01:50:54.898048+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
2014-05-14T01:50:54.898054+00:00 app[web.1]: from bin/rails:8:in `require'
2014-05-14T01:50:54.898057+00:00 app[web.1]: from bin/rails:8:in `<main>'

/wymeditor/lang/zh-TW.js not found

When I update the latest version, my refinerycms editor return

/wymeditor/lang/zh-TW.js not found error.

I check out the console, zh-TW.js was stored as "zh_tw.js":
~/.rvm/gems/ruby-2.0.0-p353@rails4/bundler/gems/refinerycms-wymeditor-4aa3df90cc37/app/assets/javascripts/wymeditor/lang
bg.js da.js es.js fr.js it.js nb.js pl.js rs.js sl.js vi.js
ca.js de.js fa.js he.js ja.js nl.js pt-BR.js ru.js sv.js zh_cn.js
cs.js en.js fi.js hu.js lv.js nn.js pt.js sk.js tr.js zh_tw.js

Can the zh_tw.js rename to zh-TW , like 'pt-BR.js' (so as zh_cn.js) ?

Whitelisting custom elements?

I've whitelisted iframe attributes before and it worked, but I can't get the whitelist to stick when attempting to whitelist <turbo-frame>. Usually adding turbo-frames should be done in the template, but I have an outlier where it would be really handy to put a block inside of a turbo-frame I edit in Refinery.

Is it possible? Here's what I've tried:

# config/initializers/refinery/wymeditor.rb
Refinery::Wymeditor.configure do |config|
  # Add extra tags to the wymeditor whitelist e.g. = {'a' => {'attributes': '1': 'href'}} or just {'a' => {}}
  config.whitelist_tags = { "turbo-frame" => { "attributes" => { "1": "id",
                                                                 "2": "loading" } } }
  # Toggle the paste dialog when using browser paste.
  # You will have to clear your asset cache after changing this setting.
  # In development mode: this is as simple as: `rm -rf tmp/cache/assets`.
  # In production mode: hopefully you recompile assets every time you deploy.
  # config.intercept_paste = true
end

I've also tried without the attributes block, just turbo-frame. Same thing. Nothing happens - any content inside the tag is retained, while the outer tags themselves are removed on save.

Every time I edit the initializer, I delete the tmp dir just to be sure and restart the dev server.

I'm on Refinery 4.0.3 with refinerycms-wymeditor 2.1.0.

Some css styles are missing after upgrade on refinery 4.0.0

Steps to reproduce the issue:

  1. I setup clear new application with refinery 4.0.0
  2. I do RAILS_ENV=production rails assets:precompile
  3. I start my app with RAILS_ENV=production rails s
  4. skin.css and wyeditor.css are missing(404) when I try to create or edit page

Validations for <audio> and<source>...

Can you please add attribute validations for and so links to audio files can have controls and be listened from the browser.
I tried to add them in validators.js.erb, but nothing seems to work. I had ta add the tags with JS.
This what I've added to validators.js.erb:

 "audio": {
      "attributes":[
        "controls"
      ]
    },
"source": {
      "attributes":[
        "src"
      ]
    },

Live preview causes page to be unresponsive on large posts

We've found that on our page with a large table of data (over 2,000 rows) the live editor window will cause the page to become unresponsive. It is especially noticeable when attempting to type text into the editor pane.

It appears as though the live preview is attempting to update on every keystroke.
With such a large DOM within the iframe, it lags the page quite heavily and in some cases ( firefox ) the browser can become entirely unresponsive for upwards of 20 minutes.

Editing the html within an external text editor and the pasting everything at once into the editor pane suffices as a work around for now, however it would probably be a good idea to incorporate some sort of throttle/debounce on how quickly the live update iframe attempts to generate the preview.
Only triggering an update once every 500ms or every 1000ms would probably be entirely reasonable.

Thanks

Option to disable keybinds for editor

Hello, got interesting conflict with Latvian input. Default Latvian keyboard uses right Alt as modifier for letters, i.e. i can be ī (pronounced as long "i"), but editor instead of typing needed letter enables italic mode for input. How can I override/disable these keyboard shortcuts ?

Thank you.

Not rendering on page edit

I've added refinery as an engine to our app, and tried adding this, and it doesn't make any change on the page edit. No console errors, I'm seeing wymeditor assets get loaded, but it's not applying to the editor.

Not sure where to dig from here to get this to work.

gem 'refinerycms', github: 'refinery/refinerycms'
gem 'refinerycms-wymeditor', github: 'parndt/refinerycms-wymeditor'

Dynamically add form-field with editor element does not work

I have a form, where I can dynamically add objects (page has_many team_members).

app/views/refinery/admin/pages/_form.html.erb:

<%= form_for [refinery, :admin, @page],
         url: (refinery.admin_page_path(@page.nested_url) if @page.persisted?) do |f| %>

  <div class="field">
    <%= f.label :title %>
    <%= f.text_field :title, class: "larger widest" %>
  </div>

  <fieldset>
    <legend>Team-Members</legend>
    <ul id="page-team-members">
      <%= f.fields_for :team_members do |member_builder| %>
        <%= render "team_member_fields", :f => member_builder %>
      <% end %>
      <%= (link_to_add_fields refinery_icon_tag('add.png'), f, :team_members) %>
    </ul>
  </fieldset>

the partial which gets added:
app/views/refinery/admin/pages/_team_members.html.erb

<li>
  <div class="data-team-member-fields">
    <%= image_tag("refinery/icons/arrow_switch.png", :class => "sort-handle") %>
    <div class="field">
      <%= f.label :name %>
      <%= f.text_field :name %>
    </div>

    <div class="field clearfix ui-tabs ui-widget ui-widget-content ui-corner-all">
      <%= f.text_area :description, :class => "visual_editor widest" %>
    </div>
  </div>
</li>

and the helper method for "link_to_add_fields" (you can see it in the form partial)

app/helpers/application_helper.rb

  def link_to_add_fields(name, f, association)
    new_object = f.object.send(association).klass.new
    id = new_object.object_id
    fields = f.fields_for(association, new_object, :child_index => id) do |builder|
      render(association.to_s.singularize + "_fields", :f => builder)
    end
    link_to(name, '#', :class => "data-add-fields", :data => { :id => id, :fields => fields.gsub("\n", "")}, :tooltip => "Add new")
  end

And now I have a problem with the correct loading of the refinery-wymeditor. If I add a new team-member dynamically the editor in the description-field of the partial:

<div class="field clearfix ui-tabs ui-widget ui-widget-content ui-corner-all">
  <%= f.text_area :description, :class => "visual_editor widest" %>
</div>

does not get loaded..I don´t see any editor elements. If I build a new team-member first (for example in a before_action) and load the form, the first team-member form is also shown correctly (with the correct editor elements).

How could I "fix" or "reload" the javascript code for the refinerycms-wymeditor through the click-event on "data-add-fields"?

Btw the javascript for the click event is following:

$(document).ready(function(){
  // click on add team-member link in form
  $("form").on("click", ".data-add-fields", function(event) {
    var regexp, time;
    time = new Date().getTime();
    regexp = new RegExp($(this).data("id"), "g");
    $(this).before($(this).data("fields").replace(regexp, time));
    return event.preventDefault();
  });
});

Any idea?

Thx for your help! :)

Matthias

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.