GithubHelp home page GithubHelp logo

Storing content in browser local storage does not work properly / sporadically loses changes without local storage about ckeditor-textselection-plugin HOT 4 CLOSED

w8tcha avatar w8tcha commented on June 17, 2024
Storing content in browser local storage does not work properly / sporadically loses changes without local storage

from ckeditor-textselection-plugin.

Comments (4)

w8tcha avatar w8tcha commented on June 17, 2024

What errors are you getting? and which browser did you use?

from ckeditor-textselection-plugin.

roadlittledawn avatar roadlittledawn commented on June 17, 2024

i of course cannot reproduce the local storage error right now, but i believe it was a cannot read length of null at line 342 which is:

var diff = content.length - savedContent.length;

the local storage error occurred in Chrome (Version 63.0.3239.84 (64-bit)) and Firefox 57.0 (64-bit).

i can still reproduce losing data when switching between Source and WYSIWYG modes. that also happens in those version of Chrome and Firefox. right now, looks like it loses data when switching from WYSIWYG to Source mode. it correctly saves content when switching from Source to WYSIWYG. if i remove the local storage code, it works most of the time. occasionally, users have noticed missing content when switching between Source and WYSIWYG.

are there version requirements to use this? we are on codemirror plugin 1.17.4 and sourcearea plugin 4.5.11. our Drupal ckeditor module version is 1.17 (the ckeditor version our drupal module is running is 4.5.6).

from ckeditor-textselection-plugin.

roadlittledawn avatar roadlittledawn commented on June 17, 2024

also, FWIW: with the local storage code removed, i think the intermittent missing data issue may be related to the browsers caching the old version of the plugin's javascript. i changed the timestamp token in this line of code in ckeditor/ckeditor/ckeditor.js file (drupal module path) to force browser to get latest file and it seems to work in local and dev environments.

d={timestamp:"20180103"...

from ckeditor-textselection-plugin.

w8tcha avatar w8tcha commented on June 17, 2024

i added some checks that should avoid the issues with the localstorage

from ckeditor-textselection-plugin.

Related Issues (20)

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.