Home Reference Source

application/components/common/simple-editor/strategy/link.js

import {findWithRegex} from './../util';

/**
 * RegEx the provided content block text to look for valid links.
 */
export default function linkStrategy(contentBlock, callback) {
    findWithRegex(/\http(s)?:\/\/(.[^ ]*)?/g, contentBlock, callback);
}