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