0
我想使用Froala編輯器並正在測試它。通過以下設置,我可以看到插入視頻按鈕,並且我可以打開一個小窗口以添加Youtube鏈接或嵌入代碼。但是,當輸入鏈接或嵌入代碼並單擊插入按鈕時,編輯區域中不顯示任何內容。哪裏不對?Froala WYSIWYG編輯器:爲什麼我無法插入Youtube視頻鏈接或嵌入代碼到編輯區域?
$('textarea').froalaEditor({
charCounterCount: true,
codeMirror: false,
charCounterMax: 1000,
direction: 'ltr',
disableRightClick: false,
editorClass: 'froala-editor',
htmlAllowComments: false,
htmlAllowedEmptyTags: [],
htmlExecuteScripts: false,
htmlRemoveTags: ['script', 'style', 'base'],
placeholderText: '',
pluginsEnabled: ['align','codeView','colors','draggable','emoticons','entities','fontFamily','fontSize','fullscreen','image','lineBreaker','link','lists','paragraphFormat','quote','video'],
shortcutsEnabled: ['show', 'bold', 'italic', 'underline', 'strikeThrough', 'indent', 'outdent', 'undo', 'redo', 'insertImage', 'createLink'],
spellcheck: false,
toolbarButtons: ['fullscreen', 'bold', 'italic', 'underline', '|', 'fontFamily', 'fontSize', 'color', 'inlineStyle', 'paragraphStyle', '|', 'paragraphFormat', 'align', 'formatOL', 'formatUL', 'outdent', 'indent', 'quote', '|', 'insertLink', 'insertImage', 'insertVideo', '|', 'emoticons', 'specialCharacters', 'insertHR', 'selectAll', 'clearFormatting', '|', 'print', 'help', 'html', '|', 'undo', 'redo'],
toolbarButtonsSM: null,
toolbarButtonsXS: null,
toolbarSticky: false,
toolbarVisibleWithoutSelection: true,
imageAllowedTypes: ['jpeg', 'jpg', 'png','gif'],
imageEditButtons: ['imageReplace', 'imageAlign', 'imageRemove', '|', 'imageLink', 'linkOpen', 'linkEdit', 'linkRemove', '-', 'imageDisplay', 'imageAlt', 'imageSize'],
imageMaxSize: 1024 * 1024 * 1,
linkInsertButtons: ['linkBack'],
paragraphFormat: {
N: 'Normal',
H1: 'Heading 1',
H2: 'Heading 2',
H3: 'Heading 3',
},
videoAllowedProviders: ['youtube', 'vimeo'],
videoInsertButtons: ['videoBack', '|', 'videoByURL', 'videoEmbed']
})
});
你試圖插入什麼URL? – st3fan
這只是一個例子。我打開它,並從瀏覽器地址欄複製它的網址:https://www.youtube.com/watch?v=yoPq-s7-_qM&t=152s – curious1
斯蒂芬,你介意看這個問題嗎?謝謝! https://stackoverflow.com/questions/45396636/froala-wysiwyg-editor-how-to-do-background-color – curious1