jenningsb2 / copy-as-html Goto Github PK
View Code? Open in Web Editor NEWA simple plugin that copies the selected text to your clipboard as HTML
A simple plugin that copies the selected text to your clipboard as HTML
Sometimes it tries to convert _
to <em>
or <\em>
in math equations. This happens when two _
are present in the same line, as it might be identified as em
in markdown syntax.
In general, If there is an equation (text in pairs of $
or $$
), what inside of the equation should be left as what it is (no conversion at all for anything within a pair of $
or $$
)
I believe this should be helpful.
After installing and enabling, the command is missing from my command palette.
typing 'copy' only shows copy file path
, copy obsidian URL
.
I've also trying restarting Obsidian, reenabling the plugin, and reinstalling it [with app restart in between]
=\
A table written in markdown is only being copied "as is" not a HTML table
INPUT: Markdown
|name|operation|
|:-----|:----:|
|`$lt`|`<`|
|`$lte`|`<=`|
|`$gt`|`>`|
|`$gte`|`>=`|
|`$ne`|`!=`|
OUTPUT: Copy as HTML
<!-- directives:[] -->
<div id="content"><p>|name|operation|
|:-----|:----:|
|<code>$lt</code>|<code><</code>|
|<code>$lte</code>|<code><=</code>|
|<code>$gt</code>|<code>></code>|
|<code>$gte</code>|<code>>=</code>|
|<code>$ne</code>|<code>!=</code>|</p></div>
EXPECTED OUTPUT
<table>
<thead>
<tr>
<th style="text-align:left">name</th>
<th style="text-align:center">operation</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>$lt</code></td>
<td style="text-align:center"><code><</code></td>
</tr>
<tr>
<td style="text-align:left"><code>$lte</code></td>
<td style="text-align:center"><code><=</code></td>
</tr>
<tr>
<td style="text-align:left"><code>$gt</code></td>
<td style="text-align:center"><code>></code></td>
</tr>
<tr>
<td style="text-align:left"><code>$gte</code></td>
<td style="text-align:center"><code>>=</code></td>
</tr>
<tr>
<td style="text-align:left"><code>$ne</code></td>
<td style="text-align:center"><code>!=</code></td>
</tr>
</tbody>
</table>
I highlighted normal text, called the command and nothing happened. I am using Samsung tablet S4. Software is all up to date. Am I doing something wrong or is the plugin really not working. On Android devices it would be the first possibility to directly export from Obsidian. I mean, the plugin would be very helpful to pure Androidists.
I'm not sure if this is the right place for this, but the option to remove comments (%%) when copying would be enormously helpful.
The showdown library converts any three consecutive '.' characters into a Unicode ellipses character. This breaks URLs that contain three dots, such as Github/Gitlab compare URLs, e.g.: vuejs/core@v3.2.32...v3.2.33
This is a known issue in showdown < 2.0: showdownjs/showdown#634
Showdown added an ellipsis
setting that allows you to disable the conversion of '...' to ellipses to address this issue. Updating to showdown to >= v2.0 and setting the ellipsis
option to false
should fix this issue.
Hello,
It would be great if highlighted text could be copied. For example, ==Text== into <span style="background-color: rgb(255, 255, 127);"> Text </span>
Thanks in advance.
Would be cool if it each obsidian formatting (bold, cursive, mark, etc) could be configured in output. For example, convert obsidian bold into color=red
I have some notes wfor people with @name and in wikilink. When I copy as HTML those some get mapped to the closest Github user's link. This does not happen with the other copy as HTML plugin or pandoc export as well.
It appears to fail silently with nothing passed to the clipboard when copying large blocks of Markdown. With smaller blocks of text, it seems to fail silently while passing the original Markdown to the clipboard.
Obsidian 1.4.6 (105)
Plug-in: 1.1.3
iOS: 16.6
Device: iPad Pro (12.9-inch) (6th generation)
Please let me know how I can provide more information.
The plugin skips generating HTML for internal links.
It would be nice if this feature is added as it will allow transfer to WordPress and other blog platforms.
Here is an example of a Internal link which references a note named as Child Page within a folder called Parent Folder. The display name is set as Anchor Text.
[[Parent Folder/Child Page|Anchor Text]]
Page path needs to be /parent-folder/child-page
-
|
in the Internal link and if no Anchor Text is provided, the Name of the Note.Copied HTML should be
<a href="/parent-folder/child-page">Anchor Text</a>
It will make the plugin extremely important for publishing.
This may be an issue with the markdown standard/parser as much as anything, but OTOH Obsidian handles block quotes even when they are adjacent (ie, on the next line).
However, this plugin requires a blank line preceding the blockquote. Without the blank line, it simply inserts a >
At least, this should be mentioned in the README.
Thanks so much for this plugin!
Hello!
I love this Plugin which do help me a lot, but it seems that the Highlighted Text can't be converted to HTML.
I would really appreciate it if you could fulfill this fuction(turn "==text==" into HTML) in your convience.
Thanks for your plugin and wish you a good day!
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.