Skip to content
Snippets Groups Projects
Commit a3d1dcc5 authored by chris's avatar chris
Browse files

fix for no config

parent 3c04bbdd
No related branches found
No related tags found
1 merge request!232feat(custom-tag-block): added custom-tag-block
......@@ -73,7 +73,9 @@ const CustomTagBlockComponent = ({ isShowTag, item }) => {
const { $from } = state.selection;
const className = $from.parent.attrs.class ? $from.parent.attrs.class : '';
const configTags = app.config.get('config.CustomTagService').tags;
const customTagsConfig = app.config.get('config.CustomTagService');
const configTags =
customTagsConfig && customTagsConfig.tags ? customTagsConfig.tags : [];
const [allTags, setAllTags] = useState(configTags);
const tagStatus = item.active(
activeView.state,
......
......@@ -127,7 +127,7 @@ const CustomTagInlineOverlayComponent = ({ mark, setPosition, position }) => {
}
});
const parseArray = JSON.parse(itemArtt.attrs.tagNames);
classNames = itemArtt.attrs.class + ' ';
classNames = `${itemArtt.attrs.class} `;
finalTag = tagNames.concat(parseArray);
});
} else {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment