wickedest / Mergely

Merge and diff documents online
http://www.mergely.com
Other
1.17k stars 228 forks source link

An error occurred when I use the search function #166

Closed Boom1597 closed 2 years ago

Boom1597 commented 2 years ago

I want to provide search functionality to my users, but it gives an error that "Uncaught TypeError: s.getSearchCursor is not a function". What can I do to fix this?

picture1
wickedest commented 2 years ago

I think you need to require: codemirror/addon/search/searchcursor.js.

Boom1597 commented 2 years ago

thanks a lot! now I can use this function to search key, but it's only support to find next key, disable to find previous, how can i do it? by the way, how can I do this using the merge library?

image
wickedest commented 2 years ago

Huh, Mergely's documentation is wrong for #search. The usage is: search(side, query, direction), where direction is "next" or "prev".

Boom1597 commented 2 years ago

thanks! it really helped me.