1- < section id =" adapters " >
2- < div class ="page-header ">
3- < h1 > Adapters</ h1 >
4- </ div >
5-
6- < p >
7- Select2 allows plugins to add additional functionality through the core
8- adapters. You can change almost anything involving the way Select2 works
9- to the way Select2 interacts with the page by modifying the core adapters.
10- Most third-party plugins should provide decorators (used to wrap adapters)
11- and custom adapters that you can use.
12- </ p >
13-
14- < p >
15- Each adapter contains a set of methods which will must always be defined.
16- Along with the global methods that all adapters must implement, these
17- methods must be implemented.
18- </ p >
19-
20- < h2 id ="adapters-all ">
21- All adapters
22- </ h2 >
23-
24- < p >
25- All adapters must implement a set of methods that Select2 will use to
26- display them and bind any internal events.
27- </ p >
1+ < section >
2+ < div class ="page-header ">
3+ < h1 id =" adapters " > Adapters</ h1 >
4+ </ div >
5+
6+ < p >
7+ Select2 allows plugins to add additional functionality through the core
8+ adapters. You can change almost anything involving the way Select2 works
9+ to the way Select2 interacts with the page by modifying the core adapters.
10+ Most third-party plugins should provide decorators (used to wrap adapters)
11+ and custom adapters that you can use.
12+ </ p >
13+
14+ < p >
15+ Each adapter contains a set of methods which will must always be defined.
16+ Along with the global methods that all adapters must implement, these
17+ methods must be implemented.
18+ </ p >
19+
20+ < h2 id ="adapters-all ">
21+ All adapters
22+ </ h2 >
23+
24+ < p >
25+ All adapters must implement a set of methods that Select2 will use to
26+ display them and bind any internal events.
27+ </ p >
2828
2929< pre class ="prettyprint linenums ">
3030// The basic HTML that should be rendered by Select2. A jQuery or DOM element
@@ -66,34 +66,34 @@ <h2 id="adapters-all">
6666Adapter.destroy = function () { };
6767</ pre >
6868
69- < h2 id ="selectionAdapter ">
70- Container (selection)
71- </ h2 >
72-
73- < p >
74- The selection is what is shown to the user as a replacement of the
75- standard < code > <select></ code > box. It controls the display of the
76- selection option(s), as well anything else that needs to be embedded
77- within the container, such as a search box.
78- </ p >
79-
80- < dl class ="dl-horizontal ">
81- < dt > Key</ dt >
82- < dd >
83- < code > selectionAdapter</ code >
84- </ dd >
85-
86- < dt > Default</ dt >
87- < dd >
88- < code title ="select2/selection/single "> SingleSelection</ code > or
89- < code title ="select2/selection/multiple "> MultipleSelection</ code >
90- </ dd >
91-
92- < dt > Base</ dt >
93- < dd >
94- < code title ="select2/selection/base "> BaseSelection</ code >
95- </ dd >
96- </ dl >
69+ < h2 id ="selectionAdapter ">
70+ Container (selection)
71+ </ h2 >
72+
73+ < p >
74+ The selection is what is shown to the user as a replacement of the
75+ standard < code > <select></ code > box. It controls the display of the
76+ selection option(s), as well anything else that needs to be embedded
77+ within the container, such as a search box.
78+ </ p >
79+
80+ < dl class ="dl-horizontal ">
81+ < dt > Key</ dt >
82+ < dd >
83+ < code > selectionAdapter</ code >
84+ </ dd >
85+
86+ < dt > Default</ dt >
87+ < dd >
88+ < code title ="select2/selection/single "> SingleSelection</ code > or
89+ < code title ="select2/selection/multiple "> MultipleSelection</ code >
90+ </ dd >
91+
92+ < dt > Base</ dt >
93+ < dd >
94+ < code title ="select2/selection/base "> BaseSelection</ code >
95+ </ dd >
96+ </ dl >
9797
9898< pre class ="prettyprint linenums ">
9999// Update the selected data.
@@ -106,31 +106,31 @@ <h2 id="selectionAdapter">
106106SelectionAdapter.update = function (data) { };
107107</ pre >
108108
109- < h2 id ="dataAdapter ">
110- Data set
111- </ h2 >
109+ < h2 id ="dataAdapter ">
110+ Data set
111+ </ h2 >
112112
113- < p >
114- The data set is what Select2 uses to generate the possible results that
115- can be selected, as well as the currently selected results.
116- </ p >
113+ < p >
114+ The data set is what Select2 uses to generate the possible results that
115+ can be selected, as well as the currently selected results.
116+ </ p >
117117
118- < dl class ="dl-horizontal ">
119- < dt > Key</ dt >
120- < dd >
121- < code > dataAdapter</ code >
122- </ dd >
118+ < dl class ="dl-horizontal ">
119+ < dt > Key</ dt >
120+ < dd >
121+ < code > dataAdapter</ code >
122+ </ dd >
123123
124- < dt > Default</ dt >
125- < dd >
126- < code title ="select2/data/select "> SelectAdapter</ code >
127- </ dd >
124+ < dt > Default</ dt >
125+ < dd >
126+ < code title ="select2/data/select "> SelectAdapter</ code >
127+ </ dd >
128128
129- < dt > Base</ dt >
130- < dd >
131- < code title ="select2/data/base "> BaseAdapter</ code >
132- </ dd >
133- </ dl >
129+ < dt > Base</ dt >
130+ < dd >
131+ < code title ="select2/data/base "> BaseAdapter</ code >
132+ </ dd >
133+ </ dl >
134134
135135< pre class ="prettyprint linenums ">
136136// Get the currently selected options. This is called when trying to get the
@@ -160,50 +160,50 @@ <h2 id="dataAdapter">
160160}
161161</ pre >
162162
163- < h2 id ="dropdownAdapter ">
164- Dropdown
165- </ h2 >
166-
167- < p >
168- The dropdown adapter defines the main container that the dropdown should
169- be held in. < strong > It does not define any extra methods that can be used
170- for decorators</ strong > , but it is common for decorators to attach to the
171- < code > render</ code > and < code > position</ code > methods to alter how the
172- dropdown is altered and positioned.
173- </ p >
174-
175- < dl class ="dl-horizontal ">
176- < dt > Key</ dt >
177- < dd >
178- < code > dropdownAdapter</ code >
179- </ dd >
180-
181- < dt > Default</ dt >
182- < dd >
183- < code title ="select2/dropdown "> DropdownAdapter</ code >
184- </ dd >
185- </ dl >
186-
187- < h2 id ="resultsAdapter ">
188- Results
189- </ h2 >
190-
191- < p >
192- The results adapter controls the list of results that the user can select
193- from. While the results adapter does not define any additional methods
194- that must be implemented, it makes extensive use of the Select2 event
195- system for controlling the display of results and messages.
196- </ p >
197-
198- < dl class ="dl-horizontal ">
199- < dt > Key</ dt >
200- < dd >
201- < code > resultsAdapter</ code >
202- </ dd >
203-
204- < dt > Default</ dt >
205- < dd >
206- < code title ="select2/results "> ResultsAdapter</ code >
207- </ dd >
208- </ dl >
209- </ section >
163+ < h2 id ="dropdownAdapter ">
164+ Dropdown
165+ </ h2 >
166+
167+ < p >
168+ The dropdown adapter defines the main container that the dropdown should
169+ be held in. < strong > It does not define any extra methods that can be used
170+ for decorators</ strong > , but it is common for decorators to attach to the
171+ < code > render</ code > and < code > position</ code > methods to alter how the
172+ dropdown is altered and positioned.
173+ </ p >
174+
175+ < dl class ="dl-horizontal ">
176+ < dt > Key</ dt >
177+ < dd >
178+ < code > dropdownAdapter</ code >
179+ </ dd >
180+
181+ < dt > Default</ dt >
182+ < dd >
183+ < code title ="select2/dropdown "> DropdownAdapter</ code >
184+ </ dd >
185+ </ dl >
186+
187+ < h2 id ="resultsAdapter ">
188+ Results
189+ </ h2 >
190+
191+ < p >
192+ The results adapter controls the list of results that the user can select
193+ from. While the results adapter does not define any additional methods
194+ that must be implemented, it makes extensive use of the Select2 event
195+ system for controlling the display of results and messages.
196+ </ p >
197+
198+ < dl class ="dl-horizontal ">
199+ < dt > Key</ dt >
200+ < dd >
201+ < code > resultsAdapter</ code >
202+ </ dd >
203+
204+ < dt > Default</ dt >
205+ < dd >
206+ < code title ="select2/results "> ResultsAdapter</ code >
207+ </ dd >
208+ </ dl >
209+ </ section >
0 commit comments