Skip to content

Commit 866d1f5

Browse files
authored
Update README.md
1 parent e14c840 commit 866d1f5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ When `auto`, CodeMirror container is auto resized. (Container's CSS parameter `h
4545
When `inherit`, CodeMirror container is not resized, scroll-bar appears. (Container's CSS `height` value should not be `auto`! )
4646

4747

48-
You can set CodeMirror configs in DOM element attribute `codemirror-config` or `codemirror` in JSON format. Latest is preferred.
48+
You can set CodeMirror configs in DOM element attribute `codemirror-config` or `codemirror` in JSON format. Last one is preferred when both used.
4949

5050
```
5151
<div codemirror='{"autofocus": true, "value": "Hello world"}'></div>
5252
```
5353

54-
You can set plugin configs in DOM element attribute `jquery-codemirror-config` or `jquery-codemirror` in JSON format. Latest is preferred.
54+
You can set plugin configs in DOM element attribute `jquery-codemirror-config` or `jquery-codemirror` in JSON format. Last one is preferred when both used.
5555

5656
```
5757
<div jquery-codemirror='{"height": "inherit"}'></div>
@@ -67,10 +67,11 @@ You can access it and use as specified in CodeMirror manual
6767
$.data($(...)][0], 'codemirror').getValue()
6868
```
6969

70-
Plugin itself adds `setValue(string), getValue(), setOption(option, value), setOptions(optionsObject)`
70+
Plugin itself adds `setValue(string), getValue(), setOption(option, value), setOptions(optionsObject)`. You can access them after initialization is done.
7171

7272
```
73-
$(...).codemirror().getValue()
73+
$(...).codemirrorInit();
74+
$(...).codemirror().getValue();
7475
```
7576

7677
`NB!` Plugin's options (height) cannot be set outside initialization (yet).

0 commit comments

Comments
 (0)