Changes between Initial Version and Version 4 of Ticket #12878

Feb 12, 2015, 4:42:04 PM (9 years ago)
Piotr Jasiun

After discussion with @Reinmar we decided that the behavior of the functions in editor, editable and selection is different:

  • selection should know nothing about editor, config or editable, it contains only wrappers for the native methods and getSelectedText is such wrapper so it goes to selection,
  • editable knows about editor and the config so it may contains method which behavior depends on configuration, also it contains lower level methods then editor so (get|extract)HtmlFromRange methods go there,
  • editor contains high level API, methods user may often want to use, which works the way user expect, so (get|extract)selectedHtml goes there.

The original idea was to put (get|extract)selectedHtml into editable and link it in editor, but in fact these methods do nothing but join selection (which is property on the editor not editable) and (get|extract)HtmlFromRange so in my opinion there is no point in having them in the editable.

Changes in t/12878.


  • Ticket #12878

    • Property Status changed from new to review
    • Property Owner set to Piotr Jasiun
  • Ticket #12878 – Description

    initial v4  
    77We can not move `getSelectedText()` because of backward compatibility so we should move `getSelectedHtml()`. And if we move `getSelectedHtml` we should also move `extractSelectedHtml`.
     9Changes in [ t/12878].
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy