Opened 8 years ago
Closed 8 years ago
#16747 closed Bug (invalid)
Unable to save cursor position on page refresh (i.e. after saving data)
Reported by: | Mubin | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 4.5.6 |
Keywords: | Cc: | mubin327@… |
Description
Steps to reproduce
- Write one or two lines of code in ckeditor.
- Place cursor in between this text (see attached image).
- Save this data
Expected result
Cursor should highlight the same position after saving data (or page refresh) in which it was present before saving.
Actual result
Cursor is not even highlight anywhere in ckeditor
Other details (browser, OS, CKEditor version, installed plugins)
I am using chrome, ckediotr 4.5.6
Attachments (1)
Change History (3)
Changed 8 years ago by
Attachment: | CursorImage.PNG added |
---|
comment:1 Changed 8 years ago by
Cc: | mubin327@… added |
---|---|
Keywords: | Cursor Focus added |
Version: | → 4.5.6 |
comment:2 Changed 8 years ago by
Component: | Core : Focus → General |
---|---|
Keywords: | Cursor Focus removed |
Resolution: | → invalid |
Status: | new → closed |
There is no such feature built-in by default. You would need to code it on your own.
It would have to work similar to intrusive bookmark in CKEditor - http://docs.ckeditor.com/#!/api/CKEDITOR.dom.range-method-createBookmark. You would need to create HTML node which doesn't get removed when you save/reload data. Once data is loaded you would need to find that node, put cursor before it and finally remove that node.
You should always have just one such element in whole editor document with specific ID assigned (or two for non-collapsed selection). Whenever you need to insert such marker you would have to first look for existing one(s) and remove it/them before inserting the new one or a pair of new ones.
In this image cursor is shown in blue highlighted line..After saving or page refresh cursor should be present or focus on same position