GnoxNahte
85bd92a2f2
Update README.md
2024-03-21 22:36:32 +08:00
GnoxNahte
d0ff3c66d8
Cleaning up code
...
- Add common iframe attributes in embedBase, avoiding duplicate code
- Partially fix reddit resizing bug by lazy loading it. Still occurs when there are multiple reddit embeds in the user's view
- support more imgur urls
- remove min-height from css to allow user-set heights
2024-03-21 15:23:41 +08:00
GnoxNahte
6acfe1cab2
Support more Imgur links
...
Previously, Imgur has 2 types, albums and posts. Need the correct embed url for imgur to show the content correctly.
2024-03-20 23:50:42 +08:00
GnoxNahte
428ee62aed
Add support for getting options through alt text (Need code cleanup)
...
Users can put options in like
[w:75%, h:200px](https://example.com )
Also allows ignoring embeds (need some work to make it totally ignore though)
2024-03-20 23:49:34 +08:00
GnoxNahte
5e2167b131
add ignoring domains like youtube and twitter, so as to not conflict with Obsidian's embeds
2024-03-20 14:51:47 +08:00
GnoxNahte
f8f182128c
Add a few fallback options when the plugin can't parse the url
...
Also add a setting for it.
2024-03-18 22:14:25 +08:00
GnoxNahte
80bc8bab5b
Clean up some live preview code
2024-03-18 22:12:06 +08:00
GnoxNahte
b6269927f9
Change iframe CSS id to class
...
Since the HTML appears in both reading and preview mode, it interferes with the height adjustment. Users might also place multiple identical urls.
2024-03-18 22:09:53 +08:00
GnoxNahte
d636913110
Added base for live preview support. Need cleanup and testing
2024-03-17 21:00:38 +08:00
GnoxNahte
a9f862a1a2
Testing Live preview. (Not working yet, moving to another computer)
...
Mostly follows the code from https://docs.obsidian.md/Plugins/Editor/Decorations#State+fields
2024-03-15 21:34:22 +08:00
GnoxNahte
1c595ecf67
Install codemirror packages "language", "state", "view"
2024-03-12 21:44:47 +08:00
GnoxNahte
563a14a5d1
Shift files into the "src" folder for easier management
2024-03-11 22:36:22 +08:00
GnoxNahte
6fc932d465
Complete converting listening to <img> instead of <a>.
...
This is due to shifting to marking links with  instead of [](link).
This commit mostly removing previous code.
2024-03-11 13:53:51 +08:00
GnoxNahte
21f7fd3b84
Remove "Markdown link content" from these 2 commits: 3ec1d6a2a1 and c0c5c58f0f
...
Following the previous commit, since there's a simpler and cleaner method to mark links to be embed, remove code from the 2 commits that aren't being used for future code
2024-03-11 13:11:32 +08:00
GnoxNahte
0d2c211abf
Test replacing Obsidian's  that are unable to parse / render
...
Instead of searching for links, let the user use Obsidian's "embed web pages" feature and catch whenever they can't parse the link.
If this works, this makes the last 2 commits about "Markdown link text format" useless, as this is a much more cleaner approach to it. Sad..
2024-03-10 21:14:48 +08:00
GnoxNahte
c0c5c58f0f
Clean up code, update README.md
2024-03-10 20:53:54 +08:00
GnoxNahte
3ec1d6a2a1
Added setting for "markdown link content" and preview buttons to preview the result. Cleanup needed
2024-03-10 20:05:23 +08:00
GnoxNahte
a87bf8a324
Clean up code from previous commit (suggesting embed after pasting)
2024-03-09 10:54:50 +08:00
GnoxNahte
db45c00a7e
Completed asking user if they want to add embeds after pasting url (Code cleanup needed)
...
- User pastes url
- Plugin suggests to embed (has an option to cancel or tap anywhere else to cancel)
- After accepting to embed, mark the link for embedding [ae:embed](link)
2024-03-09 10:18:47 +08:00
GnoxNahte
dc82436d49
Modify settings options
...
- Add "Embed by default" (no functionality yet)
- Use Sentence case instead of Title Case. Following Plugin guidelines docs
2024-03-08 14:40:22 +08:00
GnoxNahte
3b5494f4c8
Add support for Spotify embeds
2024-03-08 12:49:59 +08:00
GnoxNahte
c5d17263d8
Add support for imgur embeds
2024-03-08 10:05:51 +08:00
GnoxNahte
417716e3af
Improve listening for resize message
...
- Use registerDomEvent() to automatically attach and detach event.
- Made listening 1 listener to listen to events, instead of each sources listening to the event, improving performance.
2024-03-08 10:05:14 +08:00
GnoxNahte
7326eb14a9
Create LICENSE (MIT License)
2024-03-06 15:59:39 +08:00
GnoxNahte
0a27609ccd
Update README.md
2024-03-06 15:57:25 +08:00
GnoxNahte
a105ff0c80
Add settings tab
2024-03-06 15:36:06 +08:00
GnoxNahte
ca27fbf44d
Add back reddit auto resize but with conditions
...
Only resize if there's only 1 reddit embed. Or the user can opt to resize automatically in the settings.
2024-03-06 15:35:40 +08:00
GnoxNahte
40ae8a410a
Add reddit embeds. Height resizing not working.
2024-03-06 12:19:49 +08:00
GnoxNahte
5f29c6df9d
Add Steam embeds
2024-03-06 10:39:30 +08:00
GnoxNahte
4f521faa71
Add support for more youtube urls, youtube shorts and capturing timestamp.
2024-03-06 09:58:29 +08:00
GnoxNahte
1370d6bdb7
Add base for youtube embeds
2024-03-05 23:13:09 +08:00
GnoxNahte
04513c920e
Added support for twitter and simplify codepen's code.
2024-03-05 23:12:54 +08:00
GnoxNahte
529c6c2b77
Initial commit
2024-03-05 08:42:56 +08:00