Skip to content
Snippets Groups Projects
Commit cd7b679c authored by Christos's avatar Christos
Browse files

Merge branch 'fix' into 'master'

tags fix

See merge request !287
parents fb9962b1 2baa28a9
No related branches found
No related tags found
1 merge request!287tags fix
......@@ -132,10 +132,6 @@ const CustomTagBlockComponent = ({ isShowTag, item }) => {
}
};
const onSelectTag = val => {
item.run(state, dispatch, val.replace(/ /g, '-').toLowerCase());
};
const renderTagList = () => {
const tagList = [];
const blockTags = allTags.filter(tag => {
......@@ -147,11 +143,13 @@ const CustomTagBlockComponent = ({ isShowTag, item }) => {
<TagBoxWrapper key={uuidv4()}>
<Box key={uuidv4()} />
<StyledButton
active={JSON.parse(tagStatus[blockTag.label])}
active={tagStatus[blockTag.label]}
disabled={isDisabled}
key={uuidv4()}
label={blockTag.label}
onMouseDown={() => onSelectTag(blockTag.label)}
onMouseDown={() => {
item.run(activeView.state, activeView.dispatch, blockTag.label);
}}
title={blockTag.label}
/>
</TagBoxWrapper>,
......
......@@ -8,7 +8,7 @@ class CustomTagBlockTool extends Tools {
get run() {
return (state, dispatch, val) => {
Commands.setBlockType(state.config.schema.nodes.customTagBlock, {
class: val,
class: val.replace(/ /g, '-').toLowerCase(),
})(state, dispatch);
};
}
......
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