Skip to content
This repository has been archived by the owner on Apr 6, 2021. It is now read-only.

Allow plugins that modify Ace to extend session state #377

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dabbler0
Copy link

Some plugins (like Droplet for CS50) are not Editor plugins, but instead modify existing Ace instances to change the editor experience. This change allows such plugins to add extra information to the persistent session information serialized in getState() and setState() for Ace editors. It exposes one new public API method for the Ace plugin:

function extendSerializedState(serialize, deserialize)

where serialize(session) -> state is a function taking an Ace editor session and returning a persistable object, and deserialize(state, session) -> void is a function taking that persistable object and an Ace session, and modifying the session to reflect the object.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant