Initial upload
This commit is contained in:
parent
bc2099c2e8
commit
e74f914be2
|
@ -0,0 +1,19 @@
|
|||
table {
|
||||
/* Note: Never had any luck getting rid of the space between the
|
||||
cells border-collapse doesn't work, nor does removing or
|
||||
colouring the borders in the td/th cells. Thanks Qt?
|
||||
*/
|
||||
border-color:lightgray;
|
||||
border-style:solid;
|
||||
border-width:1px;
|
||||
margin-top:1em;
|
||||
margin-bottom:1em;
|
||||
}
|
||||
|
||||
td, th {
|
||||
padding:0.2em 0.5em 0.2em 0.5em;
|
||||
}
|
||||
|
||||
ol, ul {
|
||||
margin:-1.5em;
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
import QtQml 2.0
|
||||
|
||||
// Script to load an external .CSS file and apply it to the Markdown preview
|
||||
|
||||
QtObject {
|
||||
|
||||
function openFile(fileUrl){
|
||||
// Load external file
|
||||
var request = new XMLHttpRequest();
|
||||
request.open("GET", fileUrl, false);
|
||||
request.send(null);
|
||||
return request.responseText;
|
||||
}
|
||||
|
||||
function noteToMarkdownHtmlHook(note, html) {
|
||||
// Pass loaded file into internal stylesheet
|
||||
// We can alternately skip the previous function
|
||||
// and directly add CSS here.
|
||||
var stylesheet = openFile("style.css");
|
||||
html = html.replace("</style>", stylesheet + "</style>");
|
||||
return html;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue