IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
1704 | 1704 | <label><span><?php _e( 'Link Text' ); ?></span> |
1705 | 1705 | <input id="wp-link-text" type="text" /></label> |
1706 | 1706 | </div> |
| 1707 | <div class="wp-link-text-field"> |
| 1708 | <label><span><?php _e( 'CSS Class' ); ?></span> |
| 1709 | <input id="wp-link-classes" type="text" /></label> |
| 1710 | </div> |
1707 | 1711 | <div class="link-target"> |
1708 | 1712 | <label><span></span> |
1709 | 1713 | <input type="checkbox" id="wp-link-target" /> <?php _e( 'Open link in a new tab' ); ?></label> |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
1629 | 1629 | } |
1630 | 1630 | |
1631 | 1631 | #wp-link-wrap.has-text-field .query-results { |
1632 | | top: 235px; |
| 1632 | top: 270px; |
1633 | 1633 | } |
1634 | 1634 | |
1635 | 1635 | #link-selector { |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
30 | 30 | |
31 | 31 | // Input |
32 | 32 | inputs.text = $( '#wp-link-text' ); |
| 33 | inputs.classes = $( '#wp-link-classes' ); |
33 | 34 | inputs.url = $( '#wp-link-url' ); |
34 | 35 | inputs.nonce = $( '#_ajax_linking_nonce' ); |
35 | 36 | inputs.openInNewTab = $( '#wp-link-target' ); |
… |
… |
|
221 | 222 | }, |
222 | 223 | |
223 | 224 | mceRefresh: function( searchStr, text ) { |
224 | | var linkText, href, |
| 225 | var linkText, href, classes, |
225 | 226 | linkNode = getLink(), |
226 | 227 | onlyText = this.hasSelectedText( linkNode ); |
227 | 228 | |
… |
… |
|
229 | 230 | linkText = linkNode.textContent || linkNode.innerText; |
230 | 231 | href = editor.dom.getAttrib( linkNode, 'href' ); |
231 | 232 | |
| 233 | classes = editor.dom.getAttrib( linkNode, 'class' ); |
| 234 | inputs.classes.val(classes); |
| 235 | |
232 | 236 | if ( ! $.trim( linkText ) ) { |
233 | 237 | linkText = text || ''; |
234 | 238 | } |
… |
… |
|
304 | 308 | |
305 | 309 | return { |
306 | 310 | href: $.trim( inputs.url.val() ), |
307 | | target: inputs.openInNewTab.prop( 'checked' ) ? '_blank' : null |
| 311 | target: inputs.openInNewTab.prop( 'checked' ) ? '_blank' : null, |
| 312 | class: $.trim( inputs.classes.val() ) |
308 | 313 | }; |
309 | 314 | }, |
310 | 315 | |
311 | 316 | buildHtml: function(attrs) { |
312 | | var html = '<a href="' + attrs.href + '"'; |
| 317 | var html = '<a href="' + attrs.href + '" class="'+attrs.class+'"'; |
313 | 318 | |
314 | 319 | if ( attrs.target ) { |
315 | 320 | html += ' rel="noopener" target="' + attrs.target + '"'; |