1/** 2 * MMX / RICH TEXT EDITOR 3 */ 4class MMX_TextEditor extends MMX_Element { 5 6 static get props() { 7 return { 8 content: { 9 allowAny: true, 10 default: '' 11 }, 12 width: { 13 default: 'auto', 14 isPercentage: true, 15 allowAny: true 16 } 17 }; 18 } 19 20 styleResourceCodes = ['mmx-base', 'mmx-text-editor']; 21 22 constructor() { 23 super(); 24 this.makeComponent(); 25 } 26 27 render() { 28 return /*html*/` 29 <div part="content" class="mmx-text-editor"> 30 ${this.renderContent()} 31 <slot></slot> 32 </div> 33 `; 34 } 35 36 styles() { 37 return /*css*/` 38 :host { 39 --mmx-text-editor__width: ${MMX.encodeEntities(this.getPropValue('width'))}; 40 } 41 `; 42 } 43 44 renderContent() { 45 return this.getPropValue('content'); 46 } 47} 48 49if (!customElements.get('mmx-text-editor')) { 50 customElements.define('mmx-text-editor', MMX_TextEditor); 51}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.