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

note deletion

parent 9329655d
No related branches found
No related tags found
1 merge request!144enable insertions, deletions on codeblock
import React from "react";
import styled from "styled-components";
import React from 'react';
import styled from 'styled-components';
import NoteNumber from "./NoteNumber";
import NoteNumber from './NoteNumber';
const NoteEditorContainerStyled = styled.div`
display: flex;
......@@ -23,6 +23,11 @@ const NoteStyled = styled.div`
&:focus {
outline: none;
}
p {
margin: 0;
}
span.comment {
border-bottom: 2px solid #ffab20;
border-radius: 3px 3px 0 0;
......
......@@ -170,6 +170,9 @@ export default css`
span.deletion {
text-decoration: line-through;
color: red;
footnote {
background: red;
}
}
span.insertion {
......
// TODO Write the node in WaxSchema
const footnote = {
group: 'inline',
content: 'inline*',
content: 'block*',
inline: true,
atom: true,
attrs: {
......
......@@ -4,34 +4,34 @@ const image = {
src: {},
alt: { default: null },
title: { default: null },
track: { default: [] }
track: { default: [] },
},
group: "inline",
group: 'inline',
draggable: true,
parseDOM: [
{
tag: "img[src]",
tag: 'img[src]',
getAttrs(hook, next) {
Object.assign(hook, {
src: hook.dom.getAttribute("src"),
title: hook.dom.getAttribute("title"),
src: hook.dom.getAttribute('src'),
title: hook.dom.getAttribute('title'),
// track: parseTracks(hook.dom.dataset.track),
alt: hook.dom.getAttribute("alt")
alt: hook.dom.getAttribute('alt'),
});
next();
}
}
},
},
],
toDOM(hook, next) {
const attrs = {};
let temp = "";
let temp = '';
// if (hook.node.attrs.track.length) {
// // attrs["data-track"] = JSON.stringify(hook.node.attrs.track);
// }
let { src, alt, title } = hook.node.attrs;
hook.value = ["img", { src, alt, title }];
const { src, alt, title } = hook.node.attrs;
hook.value = ['img', { src, alt, title }];
next();
}
},
};
export default image;
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