Fixes new tag creation logic

This commit is contained in:
Mo Bitar
2020-03-21 11:39:25 -05:00
parent c5d86f16a9
commit ed9da96c3f
6 changed files with 579 additions and 523 deletions

View File

@@ -28,7 +28,7 @@ class RevisionPreviewModalCtrl {
}
async configure() {
this.note = await this.application.createItem({
this.note = await this.application.createTemplateItem({
contentType: ContentTypes.Note,
content: this.content
});
@@ -46,7 +46,7 @@ class RevisionPreviewModalCtrl {
* interfere with active editor. Be sure to copy only the content, as the top level
* editor object has non-copyable properties like .window, which cannot be transfered
*/
const editorCopy = await this.application.createItem({
const editorCopy = await this.application.createTemplateItem({
contentType: ContentTypes.Component,
content: editorForNote.content
});
@@ -80,7 +80,7 @@ class RevisionPreviewModalCtrl {
if (contentCopy.title) {
contentCopy.title += " (copy)";
}
item = await this.application.createItem({
item = await this.application.createManagedItem({
contentType: 'Note',
content: contentCopy,
needsSync: true