These are chat archives for GetmeUK/ContentTools

3rd
Oct 2016
Yevhenii Kurtov
@lessless
Oct 03 2016 12:42
Hello folks! Quick question - is CT building document from parsing html produced by contenteditable or by intercepting user input?
Anthony Blackshaw
@anthonyjb
Oct 03 2016 13:58
Hi @lessless CT does both to an extent, block level elements are managed by intercepting user input (e.g creating a paragraph, list, table), text within an element is typically parsed and sanitised using using HTMLString but certain input events such as the return key, tab and modifier combinations will be intercepted so the event is handled correctly and consistently across all browsers - hope that makes sense - do you have a specific scenario in mind so I might provide a better/more relevant explaination?
Yevhenii Kurtov
@lessless
Oct 03 2016 14:09
Evening @anthonyjb ! I'm building an email editor and as you might now email clients are really squeamish to the HTML that they receive, so clean markup is the key requirement. Particularly absence of the <b>Willy <strong> is a good</strong> father</b> and others pitties of TinyMCE/CKeditor. No glue/junk markup, consistent results across latest browsers and that's it!
Anthony Blackshaw
@anthonyjb
Oct 03 2016 14:13
ahh - well the HTML is sanitised by CT using HTMLString - but the rule as always is if you put junk in you will get junk out - however for the most part it's quite hard to put junk in - the example you give is valid HTML and wouldn't be sanitised by CT but having said that CT wouldn't add that HTML by default you'd have to use JS or HTML to put that mark up in - at least as far as I'm aware - I've not had anyone raise issues about the output of HTML from CT
David King
@oodavid
Oct 03 2016 14:20
In the realm of WYSIWYG editors, I'd say CT is king for clean output
Yevhenii Kurtov
@lessless
Oct 03 2016 14:40
@anthonyjb editor will not accept pasting from external sources, only what user has directly typed in
Anthony Blackshaw
@anthonyjb
Oct 03 2016 14:41
well it will but only as text currently there is an open issue and some basic examples to supporting HTML input
Yevhenii Kurtov
@lessless
Oct 03 2016 14:41
@anthonyjb no, I mean we will disable pasting programmatically :)
Anthony Blackshaw
@anthonyjb
Oct 03 2016 14:46
ah cool