Convert Embedded Code Block Base to Base File (or Edit Base File Code Block?)

Use case or problem

I often create embedded code block bases to localize a base to a certain note. I only create a base file if I find I will use it across multiple notes or will make it abstractly referential (i.e., file.this).

I have found that on occasion I want to convert that code block base to a standalone base. Unfortunately, to do that I need to reproduce the entire base from scratch or open the base file in an external text editor.

Proposed solution

Two possible solutions:

Solution 1: Add a button that converts the existing embedded code block base to a base file.

Solution 2: (Preferred) Make Base files have editable code block inside of Obsidian. There is currently no way to edit the code block of a Base file via Obsidian.

Current workaround (optional)

The current way to do this is opening and editing the system file outside of Obsidian, i.e., on the Base file, selecting “More Options > Reveal in Finder > Open With…” [e.g., Sublime Text].

For converting embedded base code to base file you can use Shell commands: