wysihtml5

How to disabled wysihtml5 HTML Clean Up in Editor?

女生的网名这么多〃 提交于 2019-12-03 06:37:16
How to disable HTML Clean Up while in the editor mode? I'm in a need of allowing css format & inline html in code. The idea is to disable parser and html clean up action when pasting the code and entering the Editor for editing. Thanks. Actually, this is what the parser rules are for. You can attach your custom rules to the included var wysihtml5ParserRules before instantiate the editor object or just create your own rules object and give to the editor's constructor. For example, to allow the h1 and h3 tag in addition to the tags allowed in the distributed simple example rules, you'd need to

'Range.detach' is now a no-op, as per DOM

泄露秘密 提交于 2019-12-01 18:58:37
I have been noticing this warning and error message in my console after updating Chrome to 36.0.1985.125. Warning: 'Range.detach' is now a no-op, as per DOM (http://dom.spec.whatwg.org/#dom-range-detach). Error: Discontiguous selection is not supported. Can be seen: http://rangy.googlecode.com/svn/trunk/demos/cssclassapplier.html Other javascript/jquery plugins (wysihtml5, rangy) have also been affected, any solutions? I'm still trying to decide what to do about this. See this Rangy issue (migration to GitHub not quite complete, sorry). I think it's unhelpful behaviour on the part of Chrome

How to add a non editable tag to content in Quill editor

别来无恙 提交于 2019-12-01 03:42:34
I want to add a couple of pre-built labels like <div class="label"> Label Text <span>x</span><div> to the html content in the quill editor. Add such a tag should not be a problem in itself. However I don't want the user to be able to edit the text inside the label. The cursor should not even be allowed to be placed inside the label. On delete the whole div should be deleted. The whole label should act like an image in some sense. Is it possible ? You should be able to achieve this by writing your own Blot : class Label extends Parchment.Embed { static create(value) { const node = super.create