@dile/editor 2.4.1 → 2.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/DileEditor.js +25 -13
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dile/editor",
3
- "version": "2.4.1",
3
+ "version": "2.4.2",
4
4
  "description": "Webcomponent to create a user editor interface, configured on various ways",
5
5
  "keywords": [
6
6
  "markdown",
@@ -41,5 +41,5 @@
41
41
  "prosemirror-state": "^1.4.2",
42
42
  "prosemirror-view": "^1.30.1"
43
43
  },
44
- "gitHead": "2f4e696db6cb74d33233b83b5da7ce79699c5632"
44
+ "gitHead": "bddd214424a2b8a1d0a91d780bc77459a70508f2"
45
45
  }
package/src/DileEditor.js CHANGED
@@ -247,21 +247,10 @@ export class DileEditor extends DileI18nMixin(DileEmmitChange(LitElement)) {
247
247
  </nav>
248
248
  <dile-pages selected="${this.viewSelected}" attrForSelected="name">
249
249
  <section name="markdown">
250
- <textarea
251
- id="eltextarea"
252
- .value="${this.value}"
253
- @input=${this.doTextareaKeypress}
254
- ></textarea>
250
+ ${this.textareaTemplate}
255
251
  </section>
256
252
  <section class="editor" name="design">
257
- <dile-editor-markdown
258
- id="editor"
259
- @dile-editor-change=${this.updateValue}
260
- ._menuConfig=${this._menuConfig}
261
- @dile-editor-markdown-initialized=${this.setInitialized}
262
- .addicionalCommands=${this.addicionalCommands}
263
- language="${this.language}"
264
- ></dile-editor-markdown>
253
+ ${this.editorMarkdownTemplate}
265
254
  </section>
266
255
  </dile-pages>
267
256
  </section>
@@ -270,6 +259,29 @@ export class DileEditor extends DileI18nMixin(DileEmmitChange(LitElement)) {
270
259
  `;
271
260
  }
272
261
 
262
+ get editorMarkdownTemplate() {
263
+ return html`
264
+ <dile-editor-markdown
265
+ id="editor"
266
+ @dile-editor-change=${this.updateValue}
267
+ ._menuConfig=${this._menuConfig}
268
+ @dile-editor-markdown-initialized=${this.setInitialized}
269
+ .addicionalCommands=${this.addicionalCommands}
270
+ language="${this.language}"
271
+ ></dile-editor-markdown>
272
+ `
273
+ }
274
+
275
+ get textareaTemplate() {
276
+ return html`
277
+ <textarea
278
+ id="eltextarea"
279
+ .value="${this.value}"
280
+ @input=${this.doTextareaKeypress}
281
+ ></textarea>
282
+ `
283
+ }
284
+
273
285
  updateValue(e) {
274
286
  this.value = e.detail.content;
275
287
  this.textarea.value = e.detail.content;