Giter Club home page Giter Club logo

lite's Introduction

Lite

Lite integrates the LITE track changes plugin for CKEditor with Drupal. https://ckeditor.com/cke4/addon/lite

Installation

Composer (Recommended)

  • To download this module fork, Lite library and opentip, using Composer template for Drupal https://github.com/drupal-composer/drupal-project, add these lines to your repositories section on composer.json file:

    "repositories": [
        {
            "type": "composer",
            "url": "https://packages.drupal.org/8"
        },
        { 
            "type": "vcs", 
            "url": "https://github.com/Mogtofu33/lite"
        },
        {
          "type": "package",
          "package": {
            "name": "library/lite",
            "version": "1.2.28",
            "type": "drupal-library",
            "dist": {
              "url": "https://download.ckeditor.com/lite/releases/lite_1.2.28.zip",
              "type": "zip"
            }
          }
        },
        {
          "type": "package",
          "package": {
            "name": "library/opentip",
            "version": "2.4.6",
            "type": "drupal-library",
            "dist": {
              "url": "https://github.com/enyo/opentip/archive/v2.4.6.tar.gz",
              "type": "tar"
            }
          }
        }
    ],
    
  • Then run

    composer require "drupal/lite:2.x-dev" "library/lite:1.2.28" "library/opentip:2.4.6"
    

Manual (Not recommended, use Composer)

  • Download this module in /modules folder.
  • Download the version 1.2.28 of the LITE CKEditor plugin from https://download.ckeditor.com/lite/releases/lite_1.2.28.zip and extract it to /libraries. The extracted folder must be named lite. So Lite plugin file can be accessed from /libraries/lite/plugin.js
  • Optionnal By default changes are only visible in the Wysywig editor, if you want to display changes on the view mode with tooltip support you must install Opentip library. Create a folder opentip in your /libraries folder. From https://github.com/enyo/opentip/archive/v2.4.6.tar.gz, download opentip-jquery.min.js and place it in /libraries/opentip, so your file can be accessed from /libraries/opentip/downloads/opentip-jquery.min.js Note: you can remove all files from archive excepting downloads/opentip-jquery.min.js

Post intallation

  • Enable the module
  • Visit status report to ensure your Lite plugin is correctly loaded.
  • Enable any of the track changes buttons by dragging them into the active toolbar configuration for the desired text formats from the Text Formats configuration page (For example on /admin/config/content/formats/manage/basic_html).
    • Configure Lite options below CKEditor plugin settings
    • Enable the Lite changes tracking under Enabled filters
    • If the Limit allowed HTML tags and correct faulty HTML filter is enabled, add or replace to the Allowed HTML tags under the Filter settings :
    <del class="ice-del ice-cts-*" data-changedata data-userid data-cid data-last-change-time data-time data-username> <ins class="ice-ins ice-cts-*" data-changedata data-userid data-cid data-last-change-time data-time data-username>
    
    • Configure the Lite options under filter settings

Configuration

Lite plugin default state settings are available from the text format configuration form.

After the installation, you can configure specific options form /admin/config/content/lite/settings

Some global permissions to allow roles to toggle or resolve changes for all text formats can be set from People > Permissions (/admin/people/permissions#module-lite)

Content moderation

If the Drupal Content Moderation module is enabled, Lite text format option by Workflow and by states will be available.

Prior to text format configuration you must enable a Workflow on your content type and set the Workflow transitions permissions to your roles accordingly.

Known issues

Lite 1.2.30 can cause an issue with images or copy/paste, see https://www.drupal.org/node/2907869

If an image is added without any text it should be not tracked.

If image caption is enable, the image will not be tracked.

lite's People

Contributors

devincarlson avatar mogtofu33 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

anandtoshniwal

lite's Issues

Drupal 9 Compatibility

In order to make this module compatible with Drupal 9 I have found a few issues, the first being the obvious core_version_requirement, the second is in the same file and related to the fact that the module is using jquery_ui which is no longer in core so needed as a dependency.

The other was a bit more obscure, drupal 9 no longer supports the use of pre render callbacks using functions, it requires either a TrustedCallbackInterface implementation or an anonymous function (https://www.drupal.org/project/field_group/issues/3123131).

So I've attached a patch for those changes.

drupal-9-changes-patch.txt

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.