From 7d83ee3912582d3435d5a7c5fe4cb8a21617425b Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Thu, 8 Apr 2021 20:27:36 +0200 Subject: Added custom link popin in text editor --- editor/editor.css | 98 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 54 insertions(+), 44 deletions(-) (limited to 'editor/editor.css') diff --git a/editor/editor.css b/editor/editor.css index 75d9495..de67f8c 100644 --- a/editor/editor.css +++ b/editor/editor.css @@ -372,10 +372,17 @@ li.ProseMirror-selectednode:after { } -.editor a[href] { +.editor a[href] { position: relative; } -.tooltip, .editor a[href]:hover::after { + +.popin button { + color: white; + background-color:#2e3440; + border: 0px; +} + +.tooltip, .popin { position: absolute; border: 1px #3b4252 solid; border-radius: 10px; @@ -384,51 +391,54 @@ li.ProseMirror-selectednode:after { color: #eceff4; font-size: 14px; z-index: 99; +} + +.tooltip { pointer-events: none; } -.editor a[href]:hover::after { - content: attr(href); - left: 0; - top: 24px; +.popin a[contenteditable="true"] { + color: #eceff4; } +.ProseMirror { + counter-reset: prosemirror-footnote; +} - .ProseMirror { - counter-reset: prosemirror-footnote; - } - footnote { - display: inline-block; - position: relative; - cursor: pointer; - } - footnote::after { - content: counter(prosemirror-footnote); - vertical-align: super; - font-size: 75%; - counter-increment: prosemirror-footnote; - } - .ProseMirror-hideselection .footnote-tooltip *::selection { background-color: transparent; } - .ProseMirror-hideselection .footnote-tooltip *::-moz-selection { background-color: transparent; } - .footnote-tooltip { - cursor: auto; - position: absolute; - left: -30px; - top: calc(100% + 10px); - background: silver; - padding: 3px; - border-radius: 2px; - width: 500px; - } - .footnote-tooltip::before { - border: 5px solid silver; - border-top-width: 0px; - border-left-color: transparent; - border-right-color: transparent; - position: absolute; - top: -5px; - left: 27px; - content: " "; - height: 0; - width: 0; - } +footnote { + display: inline-block; + position: relative; + cursor: pointer; +} +footnote::after { + content: counter(prosemirror-footnote); + vertical-align: super; + font-size: 75%; + counter-increment: prosemirror-footnote; +} +.ProseMirror-hideselection .footnote-tooltip *::selection { background-color: transparent; } + +.ProseMirror-hideselection .footnote-tooltip *::-moz-selection { background-color: transparent; } + +.footnote-tooltip { + cursor: auto; + position: absolute; + left: -30px; + top: calc(100% + 10px); + background: silver; + padding: 3px; + border-radius: 2px; + width: 500px; +} +.footnote-tooltip::before { + border: 5px solid silver; + border-top-width: 0px; + border-left-color: transparent; + border-right-color: transparent; + position: absolute; + top: -5px; + left: 27px; + content: " "; + height: 0; + width: 0; +} -- cgit v1.2.3