Giter VIP home page Giter VIP logo

Comments (6)

michelson avatar michelson commented on May 28, 2024

from dante2.

bbaughn avatar bbaughn commented on May 28, 2024

Ah, I'm not seeing that behavior. Typing in the editor results in those functions being called but calling dispatchChangesToSave does not seem to.

from dante2.

michelson avatar michelson commented on May 28, 2024

if you have no changes in your content the store will not take place,

when dispatchChangesToSave is called the store behavior will call checkforStore function which will exit if there are no changes.

look at the save_content.coffee file on line 38. maybe you could add a PR which separate that function in 2 functions one for the return logic and another for save in order to call the save without the condition.

I could add this feature in the next days if you can't, (complicated week)

from dante2.

michelson avatar michelson commented on May 28, 2024

We have detached the check for changes from the store function which hits the server, so now you can call save function directly. use version 0.3.2

from dante2.

bbaughn avatar bbaughn commented on May 28, 2024

Could you give a quick example of using "save"? window.main_editor.editor.save()? On the Dante editor object I see "save" as a SaveBehavior object, not as a function.

from dante2.

michelson avatar michelson commented on May 28, 2024

yup, the save on editor references to SaveBehavior so you must call the save function on it, it's confusing but it works.
in the demo page you can execute this in console:
editor.editor.save.save

by the way, Dante2 provides an automatic save when changes on text are detected, so use this feature only when you really need to force the storage.

from dante2.

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.