How to preserve user added markers and on editor reopen restore it in editor?

22 views
Skip to first unread message

kankari...@gmail.com

unread,
Apr 27, 2016, 2:12:26 AM4/27/16
to Ace Internals Dev
Hello ,

I am using ace editor to show the file and allowing user to add markers (i.e. range can be word, list of characters or multiple lines). Now I want to preserve these user selections, so once user reopens the file in ace editor again, I would add selected marker's back again. 

Is any utility present which convert the markers (range) in to the  text format which I can remember in database?  And on reopen I can convert these strings to range objects? Any library utility can help here?

Regards,
~Anand

Harutyun Amirjanyan

unread,
Apr 29, 2016, 1:56:26 PM4/29/16
to ace-in...@googlegroups.com
Hi, ace  doesn't provide utility function for this. Use JSON.stringify and JSON.parse

Reply all
Reply to author
Forward
0 new messages