wp/wp-admin/js/editor.js
changeset 21 48c4eec2b7e6
parent 18 be944660c56a
child 22 8c2e4d02f4ef
equal deleted inserted replaced
20:7b1b88e27a20 21:48c4eec2b7e6
   263 				}
   263 				}
   264 			}
   264 			}
   265 		}
   265 		}
   266 
   266 
   267 		/**
   267 		/**
   268 		 * Gets a list of unique shortcodes or shortcode-look-alikes in the content.
   268 		 * Gets a list of unique shortcodes or shortcode-lookalikes in the content.
   269 		 *
   269 		 *
   270 		 * @param {string} content The content we want to scan for shortcodes.
   270 		 * @param {string} content The content we want to scan for shortcodes.
   271 		 */
   271 		 */
   272 		function getShortcodesInText( content ) {
   272 		function getShortcodesInText( content ) {
   273 			var shortcodes = content.match( /\[+([\w_-])+/g ),
   273 			var shortcodes = content.match( /\[+([\w_-])+/g ),
   559 		 * Removes selection marker and the parent node if it is an empty paragraph.
   559 		 * Removes selection marker and the parent node if it is an empty paragraph.
   560 		 *
   560 		 *
   561 		 * By default TinyMCE wraps loose inline tags in a `<p>`.
   561 		 * By default TinyMCE wraps loose inline tags in a `<p>`.
   562 		 * When removing selection markers an empty `<p>` may be left behind, remove it.
   562 		 * When removing selection markers an empty `<p>` may be left behind, remove it.
   563 		 *
   563 		 *
   564 		 * @param {Object} $marker The marker to be removed from the editor DOM, wrapped in an instnce of `editor.$`
   564 		 * @param {Object} $marker The marker to be removed from the editor DOM, wrapped in an instance of `editor.$`
   565 		 */
   565 		 */
   566 		function removeSelectionMarker( $marker ) {
   566 		function removeSelectionMarker( $marker ) {
   567 			var $markerParent = $marker.parent();
   567 			var $markerParent = $marker.parent();
   568 
   568 
   569 			$marker.remove();
   569 			$marker.remove();