easy-richtextarea 3.0.148 → 3.0.150

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +0 -8
  2. package/example.js +16 -13
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -100,14 +100,6 @@ Or you can just set the `active` attribute directly initially:
100
100
  <RichTextarea ... active />
101
101
  ```
102
102
 
103
- ## Focus and selection
104
-
105
- It is important to note that being active and having the focus are not the same thing for a rich textarea element. The former is a concept defined here, the latter is a native property of the underlying DOM element. This is worth mentioning because the concepts of being active and being focused are often used interchangeably elsewhere.
106
-
107
- Also, note that the `getSelection()` method will always return a selection even when the underlying DOM element has none. This is because the native `startPosition` and `endPosition` properties of the DOM element, on which the `getSelection()` method ultimately relies, always return values regardless of the presence or otherwise of a selection. If there is no selection, they will both return zero. A textarea element does not always have a selection, however. This can occur before it receives the focus, or if the selection is cleared programmatically by way of the native `removeAllRanges()` method. Despite this, there currently appears to be no reliable way to discern when the underlying selection is present, and so the `getSelection()` method will always return a selection object.
108
-
109
- Some good news is that the selection is unaffected by focus. Bear in mind, however, that a selection is not updated until the tick after a DOM element in question receives the focus. For this reason, the rich textarea element will defer the handing off of a focus event for a tick so as to be able to provide the updated selection as one of the arguments to its focus handler.
110
-
111
103
  ## Styles
112
104
 
113
105
  There is no default styling. The rich textarea element has a class name, however, allowing you to style it with CSS. Or a better way is to use [Easy with Style](https://github.com/djalbat/easy-with-style). For example: