You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This might brake the annotations. So we might want to allow only a full update of the surface, passing in the text content and all annotations.
surface.update({content: "foo",annotations: []});
Actually all init functionality could go into update.. and we just call it from the constructor.
Delta Updates
We might want to consider supporting delta updates but this would involve pulling in third party libs.. like Tim's Operation.js. We wanna wait with that I think.. and make surface small.. and dumb... and don't try to guess use-cases.
The text was updated successfully, but these errors were encountered:
The more I think about it, the less I think we should have an apply-like interface. Also the current API is misleading..
Annotations Manipulation API
as
surface.apply(["insert", {type: "em"}]
, I'd rather respect a text insert.. than an annotation insert...Maybe an explicit annotations interface is better..
Or for comments:
No UI logic should be within Surface.. prompt() ing for a links url etc. should be handled outside.
In order to make passing annotations to the constructor work.. we can use that interface internally..
Text Manipulation
This might brake the annotations. So we might want to allow only a full update of the surface, passing in the text content and all annotations.
Actually all init functionality could go into update.. and we just call it from the constructor.
Delta Updates
We might want to consider supporting delta updates but this would involve pulling in third party libs.. like Tim's Operation.js. We wanna wait with that I think.. and make surface small.. and dumb... and don't try to guess use-cases.
The text was updated successfully, but these errors were encountered: