How do I get the text around the cursor position? I'm using jQuery but javascript method to get this would be fine. I need to get the text and put up smart labels or change menu options based on the context of the text.
Thanks in advance for the help. I'm new to CKEditor but already love it.
Thanks in advance for the help. I'm new to CKEditor but already love it.
Re: Text around the cursor
Re: Text around the cursor
FYI, this CKEditor JavaScript API page lists the methods that can be used when working with selections: http://docs.cksource.com/ckeditor_api/s ... ction.html. Other useful links are http://docs.cksource.com/ckeditor_api/s ... .node.html and http://docs.cksource.com/ckeditor_api/s ... ument.html.
Documentation Manager, CKSource
See CKEditor 5 docs, CKEditor 4 docs, CKEditor 3 docs, CKFinder 3 docs, CKFinder 2 docs for help.
Visit the new CKEditor SDK for samples showcasing editor features to try out and download!
Re: Text around the cursor
Thanks.
Re: Text around the cursor
comes pretty close.
Re: Text around the cursor
I am glad you figured this one. This is why I pasted the links to API pages with all methods that can be used when dealing with a selection, hoping you will be able to use what is relevant for your scenario.
Documentation Manager, CKSource
See CKEditor 5 docs, CKEditor 4 docs, CKEditor 3 docs, CKFinder 3 docs, CKFinder 2 docs for help.
Visit the new CKEditor SDK for samples showcasing editor features to try out and download!