Code Monkey home page Code Monkey logo

ice's Introduction

ice.js

Ice is a track changes implementation, built in javascript, for anything that is contenteditable on the web. Conceived by the CMS Group at The New York Times, ice is powering the editor used for writing articles in the newsroom.

The present project is a fork of Ice which focuses on the tinymce plugin version of the tool.

See https://github.com/NYTimes/ice for original project.

Download

Releases are available here: https://github.com/morbac/ice/releases

Get Started

Tinymce initialization - Add the ice plugin to your tinymce plugins directory and include the following in your tinymce init:

 tinymce.init({
   selector: 'textarea',
   menubar: false,
   element_format: 'xhtml',
   entity_encoding: 'raw',
   paste_as_text: true,
   forced_root_block: false,
   autoresize_bottom_margin: 0,
   extended_valid_elements: "p,span[*]",
   toolbar: 'undo redo | iceaccept icereject',
   contextmenu: 'iceaccept icereject',
   plugins: 'ice,contextmenu',
   ice: {
     user: { id: '1', name: 'John Doe' },
     preserveOnPaste: 'p,a[href],i,em,b,span'
   }
 });

License

GPL 2.0

ice's People

Contributors

benesch avatar bennettyates avatar catsgotmytongue avatar danransom avatar david-bannon avatar delambo avatar johanneswilm avatar jrbl avatar lleirborras avatar morbac avatar nb avatar nullvoxpopuli avatar sae249833 avatar sanjayginde avatar skratchdot avatar tswicegood avatar unknower avatar willwbur avatar

Watchers

 avatar

Forkers

mwadden virimm

ice's Issues

Backspace functionality changed

Just upgraded to the latest version from version 5.0 and it seems as though the backspace functionality has changed. When deleting text that spans over multiple p tags, they are all merged under one p tag. This throws off the formatting as line breaks are lost. Is there a way to prevent p tags from being merged?

So say for example I had the following:
image

Before when selecting those 2 p tags and pressing backspace I would get the following:
image

Now I get this:
image

This renders as:
This is my textThis is some more text

As opposed to:
This is my text
This is some more text

Any help on how to solve this issue would be much appreciated.

TinyMCE V5.8

Update: So it seems that the initialsation functionality of the plugin is broken. I have set mergeBlocks to false but the settings are not taking place, neither are the custom paste commands I have created
image

TinyMCE doesn't wait for Ice to finish loading

If you throttle the network connection you can edit the content in the editor before the tracked changes kick in. This throws exceptions saying Ice is not defined
image

Is there a way to prevent tinyMCE from rendering before Ice is fully loaded?

undo/redo not working when using ice.js with a contenteditable

I am using ice.js with a plain contenteditable in HTML, and undo/redo are not working. I tried ice.js in the builds from 0.6.0 to 0.6.4, but none of them worked. I did try the original ice.js of version 0.5.0, and undo/redo did work but with some bugs. Thank you very much for any help.

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.