mirror of
https://github.com/typemill/typemill.git
synced 2025-08-05 05:37:45 +02:00
Version 1.5.1: Fix code syntax in raw editor, fix codeblocks, fix post errors, load post-vue conditionally
This commit is contained in:
@@ -722,7 +722,7 @@ class ControllerAuthorArticleApi extends ControllerAuthor
|
||||
# update the structure for editor
|
||||
$this->setFreshStructureDraft();
|
||||
|
||||
$folder = Folder::getItemWithKeyPath($this->structureYaml, $folderKeyPath);
|
||||
$folder = Folder::getItemWithKeyPath($this->structureDraft, $folderKeyPath);
|
||||
|
||||
# activate this if you want to redirect after creating the page...
|
||||
# $url = $this->uri->getBaseUrl() . '/tm/content/' . $this->settings['editor'] . $folder->urlRelWoF . '/' . $slug;
|
||||
@@ -1031,7 +1031,6 @@ class ControllerAuthorArticleApi extends ControllerAuthor
|
||||
{
|
||||
$content[0] = trim($content[0], "# ");
|
||||
}
|
||||
|
||||
return $response->withJson(array('data' => $content, 'errors' => false));
|
||||
}
|
||||
|
||||
|
@@ -994,6 +994,11 @@ class ParsedownExtension extends \ParsedownExtra
|
||||
);
|
||||
}
|
||||
|
||||
# keep empty lines in pre-tags
|
||||
if($CurrentBlock['type'] == 'FencedCode' && isset($current['text']))
|
||||
{
|
||||
$current['text'] .= "\n";
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1050,7 +1055,6 @@ class ParsedownExtension extends \ParsedownExtra
|
||||
|
||||
# current block failed to "eat" current line
|
||||
# let's see if we can start a new block
|
||||
|
||||
$marker = $text[0];
|
||||
|
||||
# ~
|
||||
|
@@ -45,7 +45,8 @@
|
||||
</div>
|
||||
<div class="large" :class="{'error' : errors.content}">
|
||||
<label for="content">{{ __('Content') }}*</label>
|
||||
<textarea id="content" v-model="form.content" @input="changeContent" required>{{ content }}</textarea>
|
||||
<textarea @input="changeContent" v-model="form.content" required></textarea>
|
||||
<div id="content" style="display:none" v-pre>{{ content }}</div>
|
||||
<span class="error" v-if="errors.content">${ errors.content }</span>
|
||||
</div>
|
||||
<input id="path" type="hidden" value="{{ item.urlRel }}" required readonly />
|
||||
|
@@ -8,7 +8,7 @@ let editor = new Vue({
|
||||
},
|
||||
form: {
|
||||
title: document.getElementById("title").value,
|
||||
content: document.getElementById("content").value,
|
||||
content: document.getElementById("content").innerHTML,
|
||||
},
|
||||
showEditor: 'show',
|
||||
},
|
||||
|
@@ -146,8 +146,8 @@ let meta = new Vue({
|
||||
{
|
||||
editor.showEditor = 'hidden';
|
||||
posts.showPosts = 'hidden';
|
||||
}
|
||||
return 'tab-' + this.currentTab.toLowerCase()
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted: function(){
|
||||
|
@@ -66,4 +66,4 @@ let posts = new Vue({
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
@@ -62,7 +62,11 @@
|
||||
{{ assets.renderEditorJS() }}
|
||||
|
||||
<script src="{{ base_url }}/system/author/js/vue-blox.js?20211010"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-posts.js?20211010"></script>
|
||||
{% if item.elementType == "folder" %}
|
||||
<script src="{{ base_url }}/system/author/js/vue-posts.js?20211010"></script>
|
||||
{% else %}
|
||||
<script>let posts = false;</script>
|
||||
{% endif %}
|
||||
<script src="{{ base_url }}/system/author/js/sortable.min.js?20211010"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vuedraggable.umd.min.js?20211010"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-navi.js?20211010"></script>
|
||||
|
@@ -59,7 +59,11 @@
|
||||
{{ assets.renderEditorJS() }}
|
||||
|
||||
<script src="{{ base_url }}/system/author/js/vue-editor.js?20211010"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-posts.js?20211010"></script>
|
||||
{% if item.elementType == "folder" %}
|
||||
<script src="{{ base_url }}/system/author/js/vue-posts.js?20211010"></script>
|
||||
{% else %}
|
||||
<script>let posts = false;</script>
|
||||
{% endif %}
|
||||
<script src="{{ base_url }}/system/author/js/sortable.min.js?20211010"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vuedraggable.umd.min.js?20211010"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-navi.js?20211010"></script>
|
||||
|
Reference in New Issue
Block a user