Trilium Notes[0] allows that. In fact I'm surprised that it's not mentioned here, because when I discovered it (via HN IIRC), it seemed to me that Trilium had already implemented everything I could have ever thought of for a note taking/personal knowledge management tool, and more.
[0] https://github.com/zadam/trilium