Opened 7 years ago

Closed 7 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

  1. Write one or two lines of code in ckeditor.
  2. Place cursor in between this text (see attached image).
  3. 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)

CursorImage.PNG (23.9 KB) - added by Mubin 7 years ago.
In this image cursor is shown in blue highlighted line..After saving or page refresh cursor should be present or focus on same position

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by Mubin

Attachment: CursorImage.PNG added

In this image cursor is shown in blue highlighted line..After saving or page refresh cursor should be present or focus on same position

comment:1 Changed 7 years ago by Mubin

Cc: mubin327@… added
Keywords: Cursor Focus added
Version: 4.5.6

comment:2 Changed 7 years ago by Jakub Ś

Component: Core : FocusGeneral
Keywords: Cursor Focus removed
Resolution: invalid
Status: newclosed

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.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy