Skip to content
This repository has been archived by the owner on May 19, 2020. It is now read-only.

feat(*): implement Link modal #311

Merged
merged 2 commits into from
Apr 13, 2020
Merged

feat(*): implement Link modal #311

merged 2 commits into from
Apr 13, 2020

Conversation

DianaLease
Copy link
Member

Signed-off-by: Diana Lease [email protected]

Issue #297

@DianaLease DianaLease self-assigned this Apr 11, 2020
Comment on lines -27 to 18
const editor = useSlate();
const { selection } = editor;
const handleMouseDown = (e) => {
e.preventDefault();
// if (!selection) return;
toggleLink(!isLinkOpen);
ReactEditor.focus(editor);
// const url = window.prompt('Enter the URL of the link:');
// if (!url) return;
// toggleFunc(editor, url);
};
const isActive = activeFunc(editor, type);
const isActive = showLinkModal;
const iconColor = isActive
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could just get rid of isActive and use showLinkModal from props.

@dselman
Copy link
Contributor

dselman commented Apr 13, 2020

Nice. Note that I added this feature request today:
https://github.com/accordproject/cicero-ui/issues/379

Because images are just specialised links in Markdown, perhaps we can also use for to edit images?

Copy link
Member

@jolanglinais jolanglinais left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧨

@DianaLease DianaLease merged commit 91a8862 into master Apr 13, 2020
@DianaLease DianaLease deleted the dl-link-modal branch April 13, 2020 13:01
algomaster99 added a commit to algomaster99/markdown-editor that referenced this pull request Apr 14, 2020
algomaster99 added a commit to algomaster99/markdown-editor that referenced this pull request Apr 14, 2020
algomaster99 added a commit to algomaster99/markdown-editor that referenced this pull request Apr 15, 2020
algomaster99 added a commit to algomaster99/markdown-editor that referenced this pull request Apr 15, 2020
jolanglinais pushed a commit that referenced this pull request Apr 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants