value: content,
mode: mode,
lineNumbers: true,
+ lineWrapping: true,
theme: getTheme(),
readOnly: true
});
value: content,
mode: getMode(lang),
lineNumbers: true,
+ lineWrapping: true,
theme: getTheme(),
readOnly: true
});
value: content,
mode: getMode(modeSuggestion),
lineNumbers: true,
- theme: getTheme(),
- lineWrapping: true
+ lineWrapping: true,
+ theme: getTheme()
});
}
}
/**
- * Get a CodeMirror instace to use for the markdown editor.
+ * Get a CodeMirror instance to use for the markdown editor.
* @param {HTMLElement} elem
* @returns {*}
*/
function markdownEditor(elem) {
- let content = elem.textContent;
-
- return CodeMirror(function (elt) {
- elem.parentNode.insertBefore(elt, elem);
- elem.style.display = 'none';
- }, {
+ const content = elem.textContent;
+ const config = {
value: content,
mode: "markdown",
lineNumbers: true,
- theme: getTheme(),
lineWrapping: true,
+ theme: getTheme(),
scrollPastEnd: true,
- });
+ };
+
+ window.$events.emitPublic(elem, 'editor-markdown-cm::pre-init', {config});
+
+ return CodeMirror(function (elt) {
+ elem.parentNode.insertBefore(elt, elem);
+ elem.style.display = 'none';
+ }, config);
}
/**
* Link styling
*/
a {
- color: $primary;
+ color: var(--color-primary);
+ fill: var(--color-primary);
cursor: pointer;
text-decoration: none;
- transition: color ease-in-out 80ms;
+ transition: filter ease-in-out 80ms;
line-height: 1.6;
&:hover {
text-decoration: underline;
- color: darken($primary, 20%);
}
&.icon {
display: inline-block;
position: relative;
display: inline-block;
}
+ &:focus img:only-child {
+ outline: 2px dashed var(--color-primary);
+ outline-offset: 2px;
+ }
}
.blended-links a {
blockquote {
display: block;
position: relative;
- border-left: 4px solid $primary;
+ border-left: 4px solid var(--color-primary);
background-color: #F8F8F8;
padding: $-s $-m $-s $-xl;
&:before {
@extend .code-base;
display: inline;
padding: 1px 3px;
- white-space:pre;
+ white-space:pre-wrap;
line-height: 1.2em;
margin-bottom: 1.2em;
}
}
span.highlight {
- //background-color: rgba($primary, 0.2);
font-weight: bold;
padding: 2px 4px;
}
margin-right: $-xs;
pointer-events: none;
}
-