helluvamatt / dotnet-smallnotes Goto Github PK
View Code? Open in Web Editor NEWSmallNotes .NET application
SmallNotes .NET application
Implementation details to be determined
Using an invalid language will cause the parsing (and, right now, the application) to crash!
Allow specifying background and foreground colors.
Ideas:
Configurable Global Hotkeys* for the following actions (with default hotkey combos):
*Global hotkeys work in any application without the need for SmallNotes to be focused.
Support SVG images in notes
Add ability to export notes
Store and retrieve Note location and size in the Note data structure:
public Size Size { get; set; }
public Point Location { get; set; }
Need a cache for HTTP(S) downloads (including images and stylesheets).
Loading SVGs from the network appears to take a while without the in-memory caching available to the default loading in HtmlRenderer.
Symptoms: "DbFile" property is not populated, but it is using the proper FileDatabaseDescriptor type (apparently, investigate this too!)
Images should resize to fit in the note:
img
{
max-width: 100%;
}
Render images as clickable links that will open the picture in the browser:
<a href="file:///path/to/image.jpg">
<img src="file:///path/to/image.jpg">
</a>
The following error has been traced to an empty language info attached to a code block:
859 [10] ERROR SmallNotes.UI.SmallNotesOptionsForm (null) - Failed to render Note to image
CommonMark.CommonMarkException: An error occurred during formatting of the document. ---> System.ArgumentException: The languageId argument value must not be empty.
Parameter name: languageId
at ColorCode.Common.Guard.ArgNotNullAndNotEmpty(String arg, String paramName) in c:\Users\Matt\Development\Visual Studio 2013\Projects\SmallNotes\ColorCode\ColorCode\Common\Guard.cs:line 22
at ColorCode.Common.LanguageRepository.FindById(String languageId) in c:\Users\Matt\Development\Visual Studio 2013\Projects\SmallNotes\ColorCode\ColorCode\Common\LanguageRepository.cs:line 28
at ColorCode.Languages.FindById(String id) in c:\Users\Matt\Development\Visual Studio 2013\Projects\SmallNotes\ColorCode\ColorCode\Languages.cs:line 252
at SmallNotes.UI.NoteForm.CustomHtmlFormatter.WriteBlock(Block block, Boolean isOpening, Boolean isClosing, Boolean& ignoreChildNodes) in c:\Users\Matt\Development\Visual Studio 2013\Projects\SmallNotes\SmallNotes\UI\NoteForm.cs:line 288
at CommonMark.Formatters.HtmlFormatter.WriteDocument(Block document) in c:\Users\Matt\Development\Visual Studio 2013\Projects\SmallNotes\CommonMark.NET\CommonMark\Formatters\HtmlFormatter.cs:line 81
at SmallNotes.UI.NoteForm.<GetCommonMarkSettings>b__2(Block block, TextWriter target, CommonMarkSettings settings) in c:\Users\Matt\Development\Visual Studio 2013\Projects\SmallNotes\SmallNotes\UI\NoteForm.cs:line 258
at CommonMark.CommonMarkConverter.ProcessStage3(Block document, TextWriter target, CommonMarkSettings settings) in c:\Users\Matt\Development\Visual Studio 2013\Projects\SmallNotes\CommonMark.NET\CommonMark\CommonMarkConverter.cs:line 229
--- End of inner exception stack trace ---
at CommonMark.CommonMarkConverter.ProcessStage3(Block document, TextWriter target, CommonMarkSettings settings) in c:\Users\Matt\Development\Visual Studio 2013\Projects\SmallNotes\CommonMark.NET\CommonMark\CommonMarkConverter.cs:line 245
at CommonMark.CommonMarkConverter.Convert(TextReader source, TextWriter target, CommonMarkSettings settings) in c:\Users\Matt\Development\Visual Studio 2013\Projects\SmallNotes\CommonMark.NET\CommonMark\CommonMarkConverter.cs:line 302
at CommonMark.CommonMarkConverter.Convert(String source, CommonMarkSettings settings) in c:\Users\Matt\Development\Visual Studio 2013\Projects\SmallNotes\CommonMark.NET\CommonMark\CommonMarkConverter.cs:line 320
at SmallNotes.UI.NoteForm.RenderNoteToHtml(Note note, String customCss) in c:\Users\Matt\Development\Visual Studio 2013\Projects\SmallNotes\SmallNotes\UI\NoteForm.cs:line 456
at SmallNotes.UI.Utils.ImageUtil.RenderNoteToBitmap(RenderNoteRequest req) in c:\Users\Matt\Development\Visual Studio 2013\Projects\SmallNotes\SmallNotes\UI\Utils\ImageUtil.cs:line 40
Example Markdown causing the issue:
```
Code block
```
Ideas:
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.