|
@ -11,7 +11,8 @@ export const isInclude = function(name, doc) { |
|
|
// 加载插件所需js
|
|
|
// 加载插件所需js
|
|
|
export const loadJS_ifrEditArea = function(editor, jsArr) { |
|
|
export const loadJS_ifrEditArea = function(editor, jsArr) { |
|
|
if (jsArr.length > 0) { |
|
|
if (jsArr.length > 0) { |
|
|
const nodeList = document.getElementsByClassName('tox-edit-area__iframe') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const nodeList = Array.from(document.getElementsByClassName('tox-edit-area__iframe')) |
|
|
nodeList.forEach(node => { |
|
|
nodeList.forEach(node => { |
|
|
const ifr = node.contentWindow.document |
|
|
const ifr = node.contentWindow.document |
|
|
const head = ifr.getElementsByTagName('head')[0] |
|
|
const head = ifr.getElementsByTagName('head')[0] |
|
@ -31,7 +32,7 @@ export const loadJS_ifrEditArea = function(editor, jsArr) { |
|
|
// 加载插件所需css
|
|
|
// 加载插件所需css
|
|
|
export const loadCSS_ifrEditArea = function(editor, cssArr) { |
|
|
export const loadCSS_ifrEditArea = function(editor, cssArr) { |
|
|
if (cssArr.length > 0) { |
|
|
if (cssArr.length > 0) { |
|
|
const nodeList = document.getElementsByClassName('tox-edit-area__iframe') |
|
|
|
|
|
|
|
|
const nodeList = Array.from(document.getElementsByClassName('tox-edit-area__iframe')) |
|
|
nodeList.forEach(node => { |
|
|
nodeList.forEach(node => { |
|
|
const ifr = node.contentWindow.document |
|
|
const ifr = node.contentWindow.document |
|
|
const head = ifr.getElementsByTagName('head')[0] |
|
|
const head = ifr.getElementsByTagName('head')[0] |
|
|