Skip to content

Commit

Permalink
improved mobile styling, updated web worker
Browse files Browse the repository at this point in the history
  • Loading branch information
Clevis22 committed Feb 15, 2024
1 parent 45429f8 commit 2173dcb
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Enter your markdown on the left and see the live preview of the rendered output

* Add more export options

* Fix exported PDF tables
* Improve editing at the bottom of the page.

## Dependencies
* [split.js](https://github.com/splitrb/split.js?files=1)
Expand Down
16 changes: 8 additions & 8 deletions previewWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ showdown.extension('showdownChecklist', function() {
}];
});

self.addEventListener('message', function(event) {
// Instantiate a converter
var converter = new showdown.Converter({
tables: true,
strikethrough: true,
emoji: true,
extensions: ['showdownChecklist']
});
// Instantiate a converter
var converter = new showdown.Converter({
tables: true,
strikethrough: true,
emoji: true,
extensions: ['showdownChecklist']
});

self.addEventListener('message', function(event) {
// Convert Markdown to HTML
var html = converter.makeHtml(event.data);

Expand Down
2 changes: 2 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ var editor = document.getElementById('editor');
var preview = document.getElementById('preview');

var previewWorker = new Worker('previewWorker.js');


function updatePreview() {
previewWorker.postMessage(editor.value);
}
Expand Down
4 changes: 4 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,10 @@ select:hover {
padding: 0.3em 0.5em;
font-size: 0.7rem;
}
.dropbtn{
padding: 0.3em 0.5em;
font-size: 0.7rem;
}
}


0 comments on commit 2173dcb

Please sign in to comment.