Reocin / obsidian-markdown-formatting-assistant-plugin

This Plugin provides a simple WYSIWYG Editor for Markdown and in addition a command line interface. The command line interface facilitate a faster workflow.
247 stars 27 forks source link

Add in HTML tag function (like text edit) #4

Closed trungng2006 closed 3 years ago

trungng2006 commented 3 years ago

Is your feature request related to a problem? Please describe. I would like to use different text size, color, format, line height, background color, text justification when taking notes. I have noted down some HTML code for use such as: <font size=18px color="blue">text</font> But it is quite inconvenient to switch note, copy, paste, then input the text. So it would be great if you can help add this html function.

It would also be great if the user can create a list of hex color code in the plugin setting. And in the editor, we can have a modal for color picker.

Reocin commented 3 years ago

Hallo @trungng2006 Thanks for your idea, I really like the idea of adding some html functions :-)

But for this I will need some time. At the moment I'm on the table functions ;-)

trungng2006 commented 3 years ago

no rush! :D Thank you for your effort! 👍

Reocin commented 3 years ago

@trungng2006 As you wished I added HTML support and color support. But I changed you font example a little as it is deprecated. The HTML Snippets are also accessible via the Command Language. How do you like the new update ?

To Update in obsidian go to Settings -> Community plugins and click Check for updates. Then restart obsidian!

IMPORTANT! How to work with the color picker: https://github.com/Reocin/obsidian-markdown-formatting-assistant-plugin#color-picker

trungng2006 commented 3 years ago

Thank you so much!!! The and color picker is exactly what i asked for. I love it!!!

One additional small enhancement I would suggest is that the color could be add via hex or rgb in the setting. Use case: It save time for user to copy color from the Obsidian theme, and paste it in the setting as list, rather than saving each color.

Once again, thank you so much for this plugin!!!

Reocin commented 3 years ago

@trungng2006 Thanks :-)

About your enhancement. I have some trouble to create a good user experience to work with the raw json in the settings. So at the moment, it's not possible. But as a little trick you can use the following trick:

Go to your obsidian Database in there you will find a hidden folder like: .obsidian/plugins/obsidian-markdown-formatting-assistant-plugin

In there is a data.json file with the following setting:

{
"savedColors:["#0088cc","#2a95cb","#577c8e","#917373","#321f1f","#81939c","#4b91b4","#0b1b23","#220707","#762e2e","#2bff00","#230b0b","#ff0000"]
}

Just close Obsidian and insert your colors there. The last color will be the first color you see in the side pane. So you can also sort your colors here if you want.

regards Reocin

trungng2006 commented 3 years ago

Thank you, this is great!!!!