sub new_from_template { my $template = shift; my $doc_nr = Kephra::Document::Internal::new_if_allowed('new'); Kephra::Document::Internal::reset(); return unless -e $template; my $panel = Kephra::App::EditPanel::_get(); my $src = Kephra::File::IO::open_buffer($template); $panel->SetText($src); my $doc_attr = $Kephra::document{open}[$doc_nr]; $doc_attr->{syntaxmode} = 'perl'; Kephra::Document::_set_current_nr( $doc_nr ); }