Fixed formatting of richText.js
This commit is contained in:
parent
3e22b13612
commit
d351f10a9b
@ -15,7 +15,6 @@ import { Icon } from '../UI';
|
|||||||
|
|
||||||
let processedPlugins = List([]);
|
let processedPlugins = List([]);
|
||||||
|
|
||||||
|
|
||||||
const nodes = {};
|
const nodes = {};
|
||||||
let augmentedMarkdownSyntax = markdownSyntax;
|
let augmentedMarkdownSyntax = markdownSyntax;
|
||||||
let augmentedHTMLSyntax = htmlSyntax;
|
let augmentedHTMLSyntax = htmlSyntax;
|
||||||
@ -103,7 +102,7 @@ function processMediaProxyPlugins(getMedia) {
|
|||||||
const className = isFocused ? 'active' : null;
|
const className = isFocused ? 'active' : null;
|
||||||
const src = node.data.get('src');
|
const src = node.data.get('src');
|
||||||
return (
|
return (
|
||||||
<img {...props.attributes} src={getMedia(src)} className={className} />
|
<img {...props.attributes} src={getMedia(src)} className={className}/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
augmentedMarkdownSyntax = augmentedMarkdownSyntax.addInlineRules(mediaProxyMarkdownRule);
|
augmentedMarkdownSyntax = augmentedMarkdownSyntax.addInlineRules(mediaProxyMarkdownRule);
|
||||||
@ -111,9 +110,11 @@ function processMediaProxyPlugins(getMedia) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getPlugins() {
|
function getPlugins() {
|
||||||
return processedPlugins.map(plugin => (
|
return processedPlugins.map(plugin => ({
|
||||||
{ id: plugin.id, icon: plugin.icon, fields: plugin.fields }
|
id: plugin.id,
|
||||||
)).toArray();
|
icon: plugin.icon,
|
||||||
|
fields: plugin.fields
|
||||||
|
})).toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
function getNodes() {
|
function getNodes() {
|
||||||
@ -124,7 +125,7 @@ function getSyntaxes(getMedia) {
|
|||||||
if (getMedia) {
|
if (getMedia) {
|
||||||
processMediaProxyPlugins(getMedia);
|
processMediaProxyPlugins(getMedia);
|
||||||
}
|
}
|
||||||
return { markdown: augmentedMarkdownSyntax, html:augmentedHTMLSyntax };
|
return { markdown: augmentedMarkdownSyntax, html: augmentedHTMLSyntax };
|
||||||
}
|
}
|
||||||
|
|
||||||
export { processEditorPlugins, getNodes, getSyntaxes, getPlugins };
|
export { processEditorPlugins, getNodes, getSyntaxes, getPlugins };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user