This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
It was noted in the documentation that RichTextEditor.LoadHtml() did not support all HTML elements and would throw if it tried to parse something it didn't understand. I could not find a list of supported (or unsupported) elements, is there a place I can find those? I am also not seeing an error at all when passing unhandled elements into the LoadHtml method.
If no exception is throw during load, I would expect afterHtml to be similar to beforeHtml. From the users' point of view, their changes are "being deleted". |
|
|
Hello Apologies for the lack of documentation. Supported tags and attributes: P -> (textAlign, textIndent, paddingLeft) OL, UL -> (textAlign, paddingLeft, listStyleType) BR, STRONG, B, EM, I, U, LI A -> (href) SPAN -> (fontSize, fontFamily, fontWeight, Color, backgroundColor) Supported list style types: decimal, decimal-leading-zero, lower-roman, upper-roman, lower-alpha, upper-alpha disc, square, round, none I haven't found where in the documentation it says the exception is raised. Instead, unrecognised tags, attributes and styles are discarded. Since LoadHtml doesn't implement a complete HTML parser, it is recommended this method is used to import code that was previously exported by the Html property, rather than importing users html code. You can still use it in this way, but you'll either need to detect unsupported user html, or let the html editor strip the unsupported elements. Jason Fauchelle |
|
|
Hello, I'm having problemes loading html with "br" tags. The RichTextEditor discards this tags, but you have said that this tag is supported by the editor. I'm using the Silverlight Elements edition, and no way to load correctly with br tags. I've tried loading the "br" tag in all possible combinations (with and without slash, with and without spaces,...) to see if it was a parsing problem, but it's still not working. Any idea? Thank you. |
|
|
|
|