Closed stocksr closed 5 years ago
Please let me know if you want me to make any changes to this.
Great PR @stocksr! A left a few comments.
Just curious, what was your use-case for needing to disable this?
I don't have a use case for disabling it - just for changing it :-) I am building a preview component that needs to apply the same styling as our mobile apps so I needed this set to: i: 'font-style: italic;', b: 'font-weight: 600;', bi: 'font-style: italic;font-weight: 600;'
I'm wondering if maybe we should combine the
html
andtagLookup
variables into 1, which allows a user to either passfalse
or a complex object (not justtrue
).
I am happy to tackle this change if you like. I assume you would want the name to be 'html'?
Would this be a breaking change and therefor delay integration? Or should i make this change backwards compatible by special casing true in the setter to put the default value in the variable like this?
html(_) {
return arguments.length ? (this._html = typeof _ === "boolean" ? (_ ? defaultHtmlLookup : false) : _, this) : this._html;
}
Description
Adds a function to TextBox to allow setting the tag lookup object that is used to support html. This will enable users to either override the formatting (my use case) or add additional supported tags.
Types of changes
Checklist