|
126 | 126 | ] );
|
127 | 127 | },
|
128 | 128 |
|
| 129 | + 'test link attributes - complex (partial)': function() { |
| 130 | + var html = '<a accesskey="b" charset="i" class="h" dir="rtl" href="http://x" id="a" name="c" rel="j" style="margin-right: 0px;" target="a" title="f" type="g">foo</a>'; |
| 131 | + |
| 132 | + assertLink( this.editorBot, html, |
| 133 | + { |
| 134 | + type: 'url', |
| 135 | + url: { |
| 136 | + protocol: 'http://', |
| 137 | + url: 'x' |
| 138 | + }, |
| 139 | + target: { |
| 140 | + type: 'frame', |
| 141 | + name: 'a' |
| 142 | + }, |
| 143 | + advanced: { |
| 144 | + advId: 'a', |
| 145 | + advLangDir: 'rtl', |
| 146 | + advAccessKey: 'b', |
| 147 | + advName: 'c', |
| 148 | + advTitle: 'f', |
| 149 | + advContentType: 'g', |
| 150 | + advCSSClasses: 'h', |
| 151 | + advCharset: 'i', |
| 152 | + advStyles: 'margin-right:0px', |
| 153 | + advRel: 'j' |
| 154 | + } |
| 155 | + }, { |
| 156 | + 'data-cke-saved-href': 'http://x', |
| 157 | + target: 'a', |
| 158 | + id: 'a', |
| 159 | + dir: 'rtl', |
| 160 | + accessKey: 'b', |
| 161 | + name: 'c', |
| 162 | + title: 'f', |
| 163 | + type: 'g', |
| 164 | + 'class': 'h', |
| 165 | + charset: 'i', |
| 166 | + style: 'margin-right:0px', |
| 167 | + rel: 'j', |
| 168 | + 'data-cke-saved-name': 'c', |
| 169 | + href: 'http://x' |
| 170 | + }, |
| 171 | + [ |
| 172 | + 'data-cke-pa-onclick', |
| 173 | + 'onclick', |
| 174 | + 'lang', |
| 175 | + 'tabindex' |
| 176 | + ] ); |
| 177 | + }, |
| 178 | + |
129 | 179 | 'test link attributes - mailto': function() {
|
130 |
| - var html = '<a href="mailto:foo?subject=bar&body=bam" style="text-decoration: none;" id="some_link">foo</a>'; |
| 180 | + var html = '<a href="mailto:foo?subject=bar&body=bam">foo</a>'; |
131 | 181 |
|
132 | 182 | assertLink( this.editorBot, html,
|
133 | 183 | {
|
|
136 | 186 | address: 'foo',
|
137 | 187 | subject: 'bar',
|
138 | 188 | body: 'bam'
|
139 |
| - }, |
140 |
| - advanced: { |
141 |
| - advId: 'some_link', |
142 |
| - advStyles: 'text-decoration:none' |
143 | 189 | }
|
144 | 190 | }, {
|
145 | 191 | 'data-cke-saved-href': 'mailto:foo?subject=bar&body=bam',
|
146 |
| - id: 'some_link', |
147 |
| - style: 'text-decoration:none', |
148 | 192 | href: 'mailto:foo?subject=bar&body=bam'
|
149 | 193 | },
|
150 | 194 | [
|
151 |
| - 'accessKey', |
152 |
| - 'charset', |
153 |
| - 'class', |
154 | 195 | 'data-cke-pa-onclick',
|
155 | 196 | 'data-cke-saved-name',
|
156 |
| - 'dir', |
157 |
| - 'lang', |
158 |
| - 'name', |
159 | 197 | 'onclick',
|
160 |
| - 'rel', |
161 |
| - 'tabindex', |
162 |
| - 'target', |
163 |
| - 'title', |
164 |
| - 'type' |
| 198 | + 'target' |
165 | 199 | ] );
|
166 | 200 | },
|
167 | 201 |
|
168 | 202 | 'test link attributes - simple': function() {
|
169 |
| - var html = '<a href="http://x" style="text-decoration: none;" id="some_link">foo</a>'; |
| 203 | + var html = '<a href="http://x">foo</a>'; |
170 | 204 |
|
171 | 205 | assertLink( this.editorBot, html,
|
172 | 206 | {
|
173 | 207 | type: 'url',
|
174 | 208 | url: {
|
175 | 209 | protocol: 'http://',
|
176 | 210 | url: 'x'
|
177 |
| - }, |
178 |
| - advanced: { |
179 |
| - advId: 'some_link', |
180 |
| - advStyles: 'text-decoration:none' |
181 | 211 | }
|
182 | 212 | }, {
|
183 | 213 | 'data-cke-saved-href': 'http://x',
|
184 |
| - id: 'some_link', |
185 |
| - style: 'text-decoration:none', |
186 | 214 | href: 'http://x'
|
187 | 215 | },
|
188 | 216 | [
|
189 |
| - 'accessKey', |
190 |
| - 'charset', |
191 |
| - 'class', |
192 | 217 | 'data-cke-pa-onclick',
|
193 | 218 | 'data-cke-saved-name',
|
194 |
| - 'dir', |
195 |
| - 'lang', |
196 |
| - 'name', |
197 | 219 | 'onclick',
|
198 |
| - 'rel', |
199 |
| - 'tabindex', |
200 |
| - 'target', |
201 |
| - 'title', |
202 |
| - 'type' |
| 220 | + 'target' |
203 | 221 | ] );
|
204 | 222 | },
|
205 | 223 |
|
|
226 | 244 | },
|
227 | 245 |
|
228 | 246 | 'test link attributes - target popup': function() {
|
229 |
| - var html = '<a href="http://foo" style="text-decoration: none;" id="some_link" onclick="window.open(this.href, \'pop\', \'resizable=yes,status=yes,location=yes,toolbar=yes,menubar=yes,' + |
| 247 | + var html = '<a href="http://foo" onclick="window.open(this.href, \'pop\', \'resizable=yes,status=yes,location=yes,toolbar=yes,menubar=yes,' + |
230 | 248 | 'fullscreen=yes,scrollbars=yes,dependent=yes,width=10,left=20,height=30,top=40\'); return false;">foo</a>';
|
231 | 249 |
|
232 | 250 | assertLink( this.editorBot, html,
|
|
251 | 269 | left: '20',
|
252 | 270 | height: '30',
|
253 | 271 | top: '40'
|
254 |
| - }, |
255 |
| - advanced: { |
256 |
| - advId: 'some_link', |
257 |
| - advStyles: 'text-decoration:none' |
258 | 272 | }
|
259 | 273 | }, {
|
260 | 274 | 'data-cke-saved-href': 'http://foo',
|
261 | 275 | 'data-cke-pa-onclick': 'window.open(this.href, \'pop\', \'resizable=yes,status=yes,location=yes,toolbar=yes,menubar=yes,fullscreen=yes,' +
|
262 | 276 | 'scrollbars=yes,dependent=yes,width=10,left=20,height=30,top=40\'); return false;',
|
263 |
| - id: 'some_link', |
264 |
| - style: 'text-decoration:none', |
265 | 277 | href: 'http://foo'
|
266 | 278 | },
|
267 | 279 | [
|
268 |
| - 'accessKey', |
269 |
| - 'charset', |
270 |
| - 'class', |
271 | 280 | 'data-cke-saved-name',
|
272 |
| - 'dir', |
273 |
| - 'lang', |
274 |
| - 'name', |
275 | 281 | 'onclick',
|
276 |
| - 'rel', |
277 |
| - 'tabindex', |
278 |
| - 'target', |
279 |
| - 'title,type' |
| 282 | + 'target' |
280 | 283 | ] );
|
281 | 284 | },
|
282 | 285 |
|
283 | 286 | 'test link attributes - target _top': function() {
|
284 |
| - var html = '<a href="http://x" target="_top" style="text-decoration: none;" id="some_link">foo</a>'; |
| 287 | + var html = '<a href="http://x" target="_top">foo</a>'; |
285 | 288 |
|
286 | 289 | assertLink( this.editorBot, html,
|
287 | 290 | {
|
|
293 | 296 | target: {
|
294 | 297 | type: '_top',
|
295 | 298 | name: '_top'
|
296 |
| - }, |
297 |
| - advanced: { |
298 |
| - advId: 'some_link', |
299 |
| - advStyles: 'text-decoration:none' |
300 | 299 | }
|
301 | 300 | }, {
|
302 | 301 | 'data-cke-saved-href': 'http://x',
|
303 | 302 | target: '_top',
|
304 |
| - id: 'some_link', |
305 |
| - style: 'text-decoration:none', |
306 | 303 | href: 'http://x'
|
307 | 304 | },
|
308 | 305 | [
|
309 |
| - 'accessKey', |
310 |
| - 'charset', |
311 |
| - 'class', |
312 | 306 | 'data-cke-pa-onclick',
|
313 | 307 | 'data-cke-saved-name',
|
314 |
| - 'dir', |
315 |
| - 'lang', |
316 |
| - 'name', |
317 |
| - 'onclick', |
318 |
| - 'rel', |
319 |
| - 'tabindex', |
320 |
| - 'title', |
321 |
| - 'type' |
| 308 | + 'onclick' |
322 | 309 | ] );
|
323 | 310 | }
|
324 | 311 | } );
|
|
0 commit comments