-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
first attempt to export html #1256
Conversation
Be sure to be changed |
Awesome! |
What do you mean by 'share notes on the web'? The feature request was about
exporting notes to HTML (including images and other references), so what
would this export to the web look like? Where on the web would you export
it?
|
I understand this pull request. I think that it would be better if could display the notes on web page as a future plan. |
@@ -173,21 +174,29 @@ export default class MarkdownPreview extends React.Component { | |||
this.exportAsDocument('md') | |||
} | |||
|
|||
handleSaveAsHtml () { | |||
this.exportAsDocument('html', function formatHtml (value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't need to name function. plz just write such as (value) => this.refs.root.contentWindow.document.documentElement.outerHTML
const options = { | ||
filters: [ | ||
{ name: 'Documents', extensions: [fileType] } | ||
], | ||
properties: ['openFile', 'createDirectory'] | ||
} | ||
var value = formatter ? formatter.call(this, this.props.value) : this.props.value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plz use const
lib/main-menu.js
Outdated
@@ -106,6 +106,13 @@ const file = { | |||
mainWindow.webContents.send('list:isMarkdownNote') | |||
mainWindow.webContents.send('export:save-md') | |||
} | |||
}, | |||
{ | |||
label: 'Html (.html)', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HTML
is better, I think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plz confirm my comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for fixing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works fine
Merged. Thanks for your contribution @mslourens ! |
minimum viable implementation of #1233, please let me know what you think.