diff --git a/content/00-welcome/02-write-content.md b/content/00-welcome/02-write-content.md index e72f7d0..9d436d6 100644 --- a/content/00-welcome/02-write-content.md +++ b/content/00-welcome/02-write-content.md @@ -8,6 +8,7 @@ Typemill provides easy and intuitive authoring tools and we work hard to create You can create, structure and reorder all pages with the navigation on the left side. To structure your content, you can create new folders and files with the "add item" button. To reorder the pages, just drag an item and drop it wherever you want. Play around with it and you will notice, that it works pretty similar to the folder- and file-system of your laptop. And in fact, this is exactly what Typemill does in the background: It stores your content in files and folders on the server. +sdf However, there are some limitations when you try to reorder elements. For example, you cannot move a complete folder to another folder, because this would change all the urls of the pages inside that folder, which is a nightmare for readers and search engines. ## The Editor diff --git a/system/Controllers/ControllerAuthorArticleApi.php b/system/Controllers/ControllerAuthorArticleApi.php index 5f061c3..95dc88b 100644 --- a/system/Controllers/ControllerAuthorArticleApi.php +++ b/system/Controllers/ControllerAuthorArticleApi.php @@ -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)); } diff --git a/system/Extensions/ParsedownExtension.php b/system/Extensions/ParsedownExtension.php index 7d954d1..f2035c5 100644 --- a/system/Extensions/ParsedownExtension.php +++ b/system/Extensions/ParsedownExtension.php @@ -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]; # ~ diff --git a/system/author/editor/editor-raw.twig b/system/author/editor/editor-raw.twig index 16a630c..89ea76e 100644 --- a/system/author/editor/editor-raw.twig +++ b/system/author/editor/editor-raw.twig @@ -45,7 +45,8 @@