Froala Video Embed Regex
A test for https://github.com/froala/wysiwyg-editor/issues/3152
by apuchkov
HTML
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.3.0/codemirror.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.3.0/codemirror.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.3.0/mode/xml/xml.min.js"></script>
<script src="https://editor-latest.s3.amazonaws.com/js/froala_editor.pkgd.min.js"></script>
<link rel="stylesheet" href="https://editor-latest.s3.amazonaws.com/css/froala_editor.pkgd.min.css">
<link rel="stylesheet" href="https://editor-latest.s3.amazonaws.com/css/froala_style.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<form>
<textarea id="edit" name="content"></textarea>
</form>
JavaScript
$.FE.VIDEO_EMBED_REGEX = /.*/mi;
$('#edit').froalaEditor({
toolbarButtons: [
'insertVideo'
],
videoInsertButtons: ['videoBack', '|', 'videoByURL', 'videoEmbed']
});