Skip to content

The OSINT investigator's workbench. One case, one folder, every tool. Local-first: your media and your investigations never leave your machine.

JavaScript
598 B
Raw Blame
export function insertNotebookText(text, value, start = text.length, end = start) {
  const before = text.slice(0, start);
  const after = text.slice(end);
  return { text: `${before}${value}${after}`, cursor: before.length + value.length };
}

import { fileUrl } from './fileUrl.js';
import { mediaReference } from './markdown.js';

export function notebookImageMarkdown(_caseId, item, entity) {
  return entity
    ? mediaReference(entity)
    : `![${item.filename}](${fileUrl(_caseId, item.path)})`;
}

export function notebookMediaMarkdown(_caseId, entity) {
  return mediaReference(entity);
}