Giter Site home page Giter Site logo

nuthrash / obsidian-html-plugin Goto Github PK

View Code? Open in Web Editor NEW
108.0 2.0 2.0 1.28 MB

This is a plugin for Obsidian (https://obsidian.md). Can open document with .html and .htm file extensions.

License: MIT License

JavaScript 2.80% TypeScript 97.20%
html obsidian-plugin htm

obsidian-html-plugin's People

Contributors

nuthrash avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

cy20lin bingoyb

obsidian-html-plugin's Issues

don’t work on iPad

the obsidian shows "failed to load plugin obsidian-html-plugin" when click the enable bottom

Feature Request: frontmatter metadata associated with html files

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.

[not-issue] usage with SingleFile

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.

Display HTML in markdown files?

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!

Bug in 1.0.6 with unrestricted access

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:

  1. Not important: in the settings, when in dark mode, some part of the table and some phrases are still rendered with white background which makes them difficult to read. This is just aesthetic.
  2. This is more important: Obsidian can now show a tweet saved with SingleFile (through ThreadReader website), and the video plays well, but when you click on the tweet text (the text just above or below the video) it opens the tweet in the default browser, which is fine, only that it opens it repeated in 20 tabs or so ! When you open the very same file directly in the default brower by clicking on it in the windows explorer, it opens it, and if then you click on the tweet text it opens the tweet in twitter just once, as it should. This is in unrestriced mode, otherwise the click on the text is disabled. The attached file is for testing, and normally there is no need to go full unrestriced with it, but for other entries, it is.

Thank you!

TRB - ❝ 𝐘𝐚𝐲𝐚 ❞ FULL_.zip

Doesn't work on mobile

Can somebody please confirm that this plugin doesn't work on mobile?
(Failed to load plugin after enabling)

FR: Custom extensions

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

search from all files with obsidian

For now, I can only search in each single file. But if I want to find something from all my notes. And that thing is in a html file. I will miss it.

Is it possible to search information from html file with the original obsidian search?

CleanShot 2024-03-18 at 18 51 31@2x

Feature request: run a command or script after generating HTML

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.

HTML is always open in the default browser

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:

  • HTML Reader 1.0.12
  • Obsidian 1.5.12
  • Linux

How to build it?

Instructions how to build were not found in README.MD. Please clarify this.

How to correctly parse the contents of the HTML files generated by SingleFileZ

    > 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)

Dark mode?

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.

Mathjax

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.

Edit

Are there any plans to make the files editable as WYSIWYG, like a word document?

Feature Request: support mhtml

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.

Not finding images inside html files

Images inside the html files does not render when I open them in Obsidian
image

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"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.