Closed ok-ttc closed 4 years ago
Hi @ok-ttc,
Simplest approach I can think of would be something like...
const customTagNames = {
'h1': 'Heading',
'p': 'Body text'
}
ContentTools.TagUI.prototype.mount = function (domParent, before=null) {
this._domElement = this.constructor.createDiv(['ct-tag'])
this._domElement.textContent = customTagNames[this.element.tagName()]
ContentTools.AnchoredComponentUI.prototype.mount.call(this, domParent, before)
}
Is there a way to change the display of the tags in the inspector to custom text? I want to offer this to an inexperienced audience and they do not know what
h1
,p
ortd
means. Instead I would like to have something likeHeading
,Paragraph
orTable Cell
.Is that possible or is there a way to accomplish that?