@yoopta/marks 1.9.8-rc → 1.9.10-rc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -40
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,40 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
function styleInject(css, ref) {
|
|
4
|
-
if ( ref === void 0 ) ref = {};
|
|
5
|
-
var insertAt = ref.insertAt;
|
|
6
|
-
|
|
7
|
-
if (!css || typeof document === 'undefined') { return; }
|
|
8
|
-
|
|
9
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
10
|
-
var style = document.createElement('style');
|
|
11
|
-
style.type = 'text/css';
|
|
12
|
-
|
|
13
|
-
if (insertAt === 'top') {
|
|
14
|
-
if (head.firstChild) {
|
|
15
|
-
head.insertBefore(style, head.firstChild);
|
|
16
|
-
} else {
|
|
17
|
-
head.appendChild(style);
|
|
18
|
-
}
|
|
19
|
-
} else {
|
|
20
|
-
head.appendChild(style);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
if (style.styleSheet) {
|
|
24
|
-
style.styleSheet.cssText = css;
|
|
25
|
-
} else {
|
|
26
|
-
style.appendChild(document.createTextNode(css));
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
var css_248z = ".Marks-module_bold{font-weight:700}.Marks-module_italic{font-style:italic}.Marks-module_strike{text-decoration:line-through}.Marks-module_underline{word-wrap:break-word;border-bottom:.05em solid}.Marks-module_code{background:#f7f7f7;border:1px solid rgba(0,0,0,.1);border-radius:5px;color:#000;font-family:SFMono-Regular,Menlo,Consolas,PT Mono,Liberation Mono,Courier,monospace;font-size:75%;margin:3px 2px;padding:2px 6px}";
|
|
31
|
-
var s = {"bold":"Marks-module_bold","italic":"Marks-module_italic","strike":"Marks-module_strike","underline":"Marks-module_underline","code":"Marks-module_code"};
|
|
32
|
-
styleInject(css_248z);
|
|
33
|
-
|
|
34
|
-
const Bold = createYooptaMark({ type: 'bold', hotkey: 'mod+b', className: s.bold, as: 'strong' });
|
|
35
|
-
const Italic = createYooptaMark({ type: 'italic', hotkey: 'mod+i', className: s.italic, as: 'em' });
|
|
36
|
-
const Underline = createYooptaMark({ type: 'underline', hotkey: 'mod+u', className: s.underline });
|
|
37
|
-
const Strike = createYooptaMark({ type: 'strike', hotkey: 'mod+shift+s', className: s.strike });
|
|
38
|
-
const CodeMark = createYooptaMark({ type: 'code', hotkey: 'mod+e', className: s.code });
|
|
39
|
-
|
|
40
|
-
export { Bold, CodeMark, Italic, Strike, Underline };
|
|
1
|
+
import{createYooptaMark as e}from"@yoopta/editor";var o="doUI64CQ",t="l-JZUAo-",d="_5SCxD00I",a="_7vXfdYaS",r="_7YZYr7Zb";!function(e,o){void 0===o&&(o={});var t=o.insertAt;if(e&&"undefined"!=typeof document){var d=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===t&&d.firstChild?d.insertBefore(a,d.firstChild):d.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}(".doUI64CQ{font-weight:700}.l-JZUAo-{font-style:italic}._5SCxD00I{text-decoration:line-through}._7vXfdYaS{word-wrap:break-word;border-bottom:.05em solid}._7YZYr7Zb{background:#f7f7f7;border:1px solid rgba(0,0,0,.1);border-radius:5px;color:#000;font-family:SFMono-Regular,Menlo,Consolas,PT Mono,Liberation Mono,Courier,monospace;font-size:75%;margin:3px 2px;padding:2px 6px}");const s=e({type:"bold",hotkey:"mod+b",className:o,as:"strong"}),i=e({type:"italic",hotkey:"mod+i",className:t,as:"em"}),n=e({type:"underline",hotkey:"mod+u",className:a}),l=e({type:"strike",hotkey:"mod+shift+s",className:d}),m=e({type:"code",hotkey:"mod+e",className:r});export{s as Bold,m as CodeMark,i as Italic,l as Strike,n as Underline};
|