Code Monkey home page Code Monkey logo

ckeditor-vimeo-plugin's Introduction

Vimeo Plugin for CKEditor 4

This plugin allow you to insert Vimeo videos using embed code or just the video URL.

Installation

With NPM

  1. npm install ckeditor-vimeo-plugin

  2. Add the plugin to CKEditor (config.js):

    CKEDITOR.plugins.addExternal('vimeo', '../node_modules/ckeditor-vimeo-plugin/vimeo/');
    
    config.extraPlugins = 'vimeo';
    

    You may need to adjust the plugin path. The example is assuming that you have the following directory structure:

    project
    └───ckeditor
    │   └───config.js
    └───node_modules
        └───ckeditor-vimeo-plugin
    

Manual

Follow these steps:

  1. Download the latest version of the plugin from Github.

  2. Extract the downloaded file into the CKEditor's plugins folder.

  3. Enable the plugin by changing or adding the extraPlugins line in your configuration (config.js):

    config.extraPlugins = 'vimeo';
    

Configuration

The default options can be overriden on config.js.

Video width
config.vimeo_width = '640';
Video height
config.vimeo_height = '480';
Make responsive (ignore width and height, fit to width):
config.vimeo_responsive = true;
Start video automatically
config.vimeo_autoplay = false;
Disable the change of settings

The elements on the list will be disabled (but still visible).

config.vimeo_disabled_fields = ['txtEmbed', 'chkAutoplay'];

See the available element list below.

List of UI elements

  • txtEmbed
  • txtUrl
  • txtWidth
  • txtHeight
  • chkResponsive
  • chkAutoplay

How to use

If everything is ok, a Vimeo icon should appear on the CKEditor toolbar. Click it, paste your embed code or video URL and the video will be inserted.

Credits

This project has been started and modified from original project ckeditor-youtube-plugin version 2.1.10 from Jonnas Fonini.

monstrao for portuguese brazilian translations.

And it is licensed under the WTFPL to respect original project license.

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.