Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var width = dom.getAttribute("width");
if (width) {
return width;
}
return undefined;
};
// require('split-html');
// Needs to lift out image blocks in their own div
var transformPastedHTML = function transformPastedHTML(htmlStr) {
var markdown = (0, _markdownToHTML.markdowntoHTML)(htmlStr);
return markdown;
return htmlStr;
};
var clipboardParser = new _prosemirrorModel.DOMParser(_schema.schema, defaultRules);
exports.transformPastedHTML = transformPastedHTML;
exports.clipboardSerializer = clipboardSerializer;
exports.clipboardParser = clipboardParser;
};
nodeSerializer.embed = function toDOM(node) {
return null;
};
*/
const clipboardSerializer = new DOMSerializer(nodeSerializer, markSerializer);
const defaultRules = DOMParser.schemaRules(schema);
const transformPastedHTML = function(htmlStr) {
return htmlStr;
// const markdown = markdowntoHTML(htmlStr);
// return markdown;
}
const clipboardParser = new DOMParser(schema, defaultRules);
return { transformPastedHTML, clipboardSerializer, clipboardParser };
}
nodeId: randomId,
};
};
for (const rule of defaultRules) {
if (rule.node === 'block_embed') {
rule.tag = 'div.block-embed';
rule.getAttrs = getNodeAttrs;
} else if (rule.node === 'embed') {
rule.tag = 'span.embed';
rule.getAttrs = getNodeAttrs;
}
}
const clipboardParser = new DOMParser(schema, defaultRules);
exports.clipboardSerializer = clipboardSerializer;
exports.clipboardParser = clipboardParser;