tiny-markdown-editor 0.2.31 → 0.2.32
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.
- package/README.md +1 -1
- package/dist/tiny-mde.css +9 -1
- package/dist/tiny-mde.js +82 -34
- package/dist/tiny-mde.min.css +1 -1
- package/dist/tiny-mde.min.js +1 -1
- package/dist/tiny-mde.tiny.js +1 -1
- package/lib/TinyMDE.js +4 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -261,7 +261,7 @@ Here are some methods of the Editor object that might be useful in general inter
|
|
|
261
261
|
| `getSelection(getAnchor)` | Gets the current selection / cursor position inside the editor. The parameter `getAnchor` (defaults to false) determines if the anchor (starting point) of the selection should be returned—if `getAnchor` is false (or omitted), the focus (end point) is returned, otherwise the starting point. If the selection is not inside the editor, `null` is returned. The method returns an object with the attributes `row` and `col` which contain the zero-based row (line) and column number of the selection position. |
|
|
262
262
|
| `setSelection(focus, anchor)` | Sets the selection within the editor. The parameters `focus` and `offset` are both of the format returned by `getSelection()` (containing attributes `row` and `col`). If `anchor` is `null` or omitted, a single-point selection (cursor position) will be set. |
|
|
263
263
|
| `paste(text, anchor, focus)` | Pastes / inserts text over either the current selection (if `anchor` and `focus` are null or omitted) or a specific range (if `anchor` and `focus` are passed in in the format as returned by `getSelection()`). |
|
|
264
|
-
| `wrapSelection(pre, post, anchor, focus)` | Wraps the current selection (if `anchor` and `focus` are `null` or omitted) or a specific selection (if `anchor` and `focus` are given) in the strings `pre` and `post`. For example, `wrapSelection('[', '](https://www.github.com)')` will wrap the selection with a link to GitHub.
|
|
264
|
+
| `wrapSelection(pre, post, anchor, focus)` | Wraps the current selection (if `anchor` and `focus` are `null` or omitted) or a specific selection (if `anchor` and `focus` are given) in the strings `pre` and `post`. For example, `wrapSelection('[', '](https://www.github.com)')` will wrap the selection with a link to GitHub. Fires a `change` event (and updates the linked textarea, if any). Does nothing if the selection spans more than one line. |
|
|
265
265
|
| `addEventListener(type, listener)` | Adds an [event listener](#event-listeners) to the editor. `type` is a string denoting the type (`change` or `selection`), and `listener` is a function which takes one parameter, the event. |
|
|
266
266
|
| `undo()` | Undoes the last action. |
|
|
267
267
|
| `redo()` | Redoes the last undone action. |
|
package/dist/tiny-mde.css
CHANGED
|
@@ -5,7 +5,15 @@
|
|
|
5
5
|
line-height:24px;
|
|
6
6
|
outline: none;
|
|
7
7
|
padding:5px;
|
|
8
|
-
height
|
|
8
|
+
/* Count the padding towards the height below, so a fixed-height container
|
|
9
|
+
doesn't end up 10px short of fitting its own editor. Also makes the box
|
|
10
|
+
behave the same whether or not the embedding page has a border-box reset. */
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
/* min-height rather than height so the editor fills a fixed-height container
|
|
13
|
+
when it's near-empty, but still grows with the content when it overflows.
|
|
14
|
+
With height:100% the box stayed at the container's height and the
|
|
15
|
+
background stopped painting at the fold (#182). */
|
|
16
|
+
min-height: 100%;
|
|
9
17
|
}
|
|
10
18
|
|
|
11
19
|
.TinyMDE.TinyMDE_empty {
|