mirror of
https://github.com/itflow-org/itflow
synced 2026-12-02 00:59:03 +00:00
Documents in Markdown: a document can be written in Markdown with Write and Preview or in the rich text editor and switched either way, pictures pasted or dropped into the Markdown are kept as files, New Document starts in the way last used, Import Markdown Files beside Upload makes a document from each .md file, a Markdown button beside PDF downloads a document as a .md file, and Markdown pasted into a document's rich text editor goes in as formatting; versions, restore, copy and the API carry the Markdown, and the API's document create and update no longer escape values twice; database 4.2.3 adds documents.document_markdown and document_versions.document_version_markdown, and league/commonmark 2.10 and league/html-to-markdown 5.2 are added to libs/vendor through composer; 26.12.3 changelog entries
This commit is contained in:
@@ -11,7 +11,7 @@ enforceUserPermission('module_support', 2);
|
||||
$document_id = intval($_GET['id'] ?? 0);
|
||||
|
||||
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT document_client_id, document_client_visible, document_content, document_description,
|
||||
document_folder_id, document_name, document_archived_at FROM documents WHERE document_id = $document_id LIMIT 1"));
|
||||
document_folder_id, document_name, document_archived_at, " . documentMarkdownSql() . " FROM documents WHERE document_id = $document_id LIMIT 1"));
|
||||
if (!$row) {
|
||||
echo json_encode(['error' => 'That document no longer exists.']);
|
||||
exit;
|
||||
@@ -23,6 +23,7 @@ $document_form_mode = 'edit';
|
||||
$document_name = escapeHtml($row['document_name']);
|
||||
$document_description = escapeHtml($row['document_description']);
|
||||
$document_content = escapeHtml($row['document_content']);
|
||||
$document_markdown = $row['document_markdown']; // raw - null for a document in the rich text editor
|
||||
$document_folder_id = intval($row['document_folder_id']);
|
||||
$document_client_visible = intval($row['document_client_visible']);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user