Skip to content

Instantly share code, notes, and snippets.

View StreetStrider's full-sized avatar

Strider StreetStrider

  • Rostov-on-Don
  • 11:57 (UTC +03:00)
View GitHub Profile
@StreetStrider
StreetStrider / diff.js
Created April 7, 2026 09:39 — forked from ximing/diff.js
quill diff
function findDiff() {
var oldContent = quill_old.getContents();
var newContent = quill_new.getContents();
var diff = oldContent.diff(newContent);
// console.log('old', oldContent);
// console.log('new', newContent);
for (var i = 0; i < diff.ops.length; i++) {
var op = diff.ops[i];
// if the change was an insertion
if (op.hasOwnProperty('insert')) {