nuthrash / obsidian-html-plugin Goto Github PK
View Code? Open in Web Editor NEWThis is a plugin for Obsidian (https://obsidian.md). Can open document with .html and .htm file extensions.
License: MIT License
This is a plugin for Obsidian (https://obsidian.md). Can open document with .html and .htm file extensions.
License: MIT License
the obsidian shows "failed to load plugin obsidian-html-plugin" when click the enable bottom
Thanks for this plugin! It works perfectly with html files from the excellent SingleFile.
One thing I'm missing, though, is the ability to tag html files, and to associate with them other metadata that's normally in a markdown file's frontmatter. Besides tags, the URL the html came from is important.
Is there a way to add this frontmatter enabling to HTML Reader?
I suppose I could store all this in the frontmatter of a sibling markdown page that's linked to the html. But the redundancy will add clutter to the vault, and cause consistency problems sooner or later. It would also require a lot of steps. I, and many others, hope to recreate in Obsidian the simple, frictionless web page capture process found in programs like Evernote.
Hi.
Just wanna drop in and say thank you. I'm using SingleFile to archive some website into a single html file. Now with your plugin, I can view the archived html file from within Obsidian. Not counting the fact that these notes have also their own metadata in frontmatter, which is awesome.
Hi,
Thank you for a great plugin.
I'm wondering if you could also make it display HTML in markdown files. For instance, we put the html source into a code block starting with ```html.
Best!
Hello
Thanks a lot for this update that allows to choose the level of sanitizing!! That really helps (it is a solution!) for some pages! There are two bugs, though:
Thank you!
Can somebody please confirm that this plugin doesn't work on mobile?
(Failed to load plugin after enabling)
Hi
It would be nice if one could let the extension to read certain files as html files too. I have some files that are basically htmls but they do not have .html or .htm extensions coming from other apps so I ant rename them.
thanks
I like your plugin, and I think you should be able to optionally specify a command or script that it runs after generating the HTML. This could then mean a user can use scripts to automatically upload files by a number of means to their server or hosting.
Even if I install this plugin, the HTML file in my Obsidian vault is always open in the default browser, making no difference.
I also disabled all other plugins to ensure this issue is not caused by the interaction with other plugins.
Environment:
Instructions how to build were not found in README.MD. Please clarify this.
Obsidian shortcuts are invalid.
How to implement sending shortcuts back to Obsidian, like in the document editor.
> I have some questions:
1. Is the "SingleFileZ" web extension necessary? I opened a xxx.zip.html in Opera, it shows the same message. (NOTE: the Obsidian is based on [Electron](https://www.electronjs.org/), which embedded a Chromium browser)
It is unfortunately necessary to install SingleFileZ to view pages from the filesystem in Chromium-based browsers because they don't allow to run fetch("")
(in order to retrieve the displayed page in binary) when the page is opened from the filesystem. It looks like the same limitation is applied in Obsidian.
2. How to detect a .html file made by "SingleFileZ"?
The file can be unzipped and it contains an index.html
file in the root folder or the first folder of the zip file (for MAFF files). In addition, for self-extracting pages, the <html>
tag contains the attribute data-sfz
.
3. Is there a npm package to convert/decode SingleFileZ's .html content to standard HTML string?
The function extractPage
in the code below (heavily inspired from this gist) should help you.
import { extract } from "https://raw.githubusercontent.com/gildas-lormeau/SingleFileZ/master/src/single-file/processors/compression/compression-extract.js";
import * as zip from "https://raw.githubusercontent.com/gildas-lormeau/zip.js/master/index.js";
globalThis.zip = zip;
async function extractPage(zipBlob) {
const { docContent } = await extract(zipBlob, { noBlobURL: true });
return docContent;
}
You can also use local imports instead of retrieving scripts from raw.githubusercontent.com
by importing single-filez-core
and zip.js
from NPM, and replacing "https://raw.githubusercontent.com/gildas-lormeau/SingleFileZ/master/src/single-file"
with "single-filez-core"
and "https://raw.githubusercontent.com/gildas-lormeau/zip.js/master/index.js"
with "@zip.js/zip.js"
.
Originally posted by @gildas-lormeau in #1 (comment)
Hi, I really appreciate your complement. I am new to Obsidian and your work has helped me a lot to adapt to the display of pages on the platform. However, I would like to know if there is any chance of implementing or perhaps already exists and I have not seen it to put the page in dark mode as does this add-on (https://darkreader.org/), ie, I know there is the option to change the background and I think it's great, but sometimes the pages as you know have black text and when the background is darkened, the text is no longer very well seen.
I hope this request does not bother you, and thank you very much for your time and for sharing this valuable tool for the obsidian community. greetings.
I exported a Jupyter notebook from VSCode with a LaTeX formula and it doesn't render correctly in Obsidian.
Example File
The formula renders in Chrome, but not in Obsidian.
Are there any plans to make the files editable as WYSIWYG, like a word document?
Hi
Could you also support files with the extension .mhtml? Because when saving some web pages, .mhtml files can represent the original web page style to the greatest extent with only one file, compared to .html files.
Thank you for your hard work.
I'm using SingleFile to archive website into a single html file.
and it shows a blank space ,like this
the website is https://time.geekbang.org/column/article/39922
Hi, I exported my emails in html and the fond appear to be black on black because I use a theme that make obsidian look pretty dark.
Images inside the html files does not render when I open them in Obsidian
If I open the same file in firefox I see the images just fine
Here is an example of the html code for the image
body data-absolute-enabled="true" style="font-family:Calibri;font-size:11pt"> <div style="position:absolute;left:48px;top:115px;width:720px"> <img width="857" height="624" src="tkcyvllwly.png" data-src-type="image/png" /> <br />
I have the operating mode for your plugin set to "low restricted mode"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.