So since there's no real guide or explanation of how to use the Smith's Html Editor on project website, I've used source to build the .dll and then referenced it in my project.
I managed to get the binding and the editor working, however list of fonts is empty.
Has anyone encountered this ever?
Thanks in advance!
Alright, I think I've found the error. I've been using "PrettyLib" for .NET which moves .dll's and other configuration files into specific folder of the installation (or debug) directory. (usually \\lib\\
)
In the HtmlEditor.xaml.cs of the source code, there's a InitStyles()
method which basically reads the config file with XmlReader
and then populates the comboboxes for Font Family and Font Size.
Creator of the Editor used pretty specific location of the configuration file, which is just "smithhtmleditor.config.xml"
- I assume root of the project.
I used the
Path.GetDirectoryName(Environment.GetCommandLineArgs()[0]) + "\\lib\\" + ConfigPath)
Which reads the location of where Application is installed at and adds \\lib\\smithhtmleditor.config.xml
Instead of old
XmlTextReader.Create(ConfigPath)
I cleaned, rebuilt the solution and the new dll worked as intended.
Edit: Sometimes I wish I knew why people downvote for no specific reason.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.