mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-10-22 03:45:38 +00:00
Support Reopen as HTML preview
#1690
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using QuickLook.Common.Plugin;
|
||||
using QuickLook.Common.Plugin.MoreMenu;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
@@ -27,7 +28,7 @@ using System.Windows.Media;
|
||||
|
||||
namespace QuickLook.Plugin.TextViewer;
|
||||
|
||||
public class Plugin : IViewer
|
||||
public partial class Plugin : IViewer, IMoreMenu
|
||||
{
|
||||
private static readonly HashSet<string> WellKnownExtensions = new(
|
||||
[
|
||||
@@ -35,9 +36,12 @@ public class Plugin : IViewer
|
||||
]);
|
||||
|
||||
private TextViewerPanel _tvp;
|
||||
private string _currentPath;
|
||||
|
||||
public int Priority => -5;
|
||||
|
||||
public IEnumerable<IMenuItem> MenuItems => GetMenuItems();
|
||||
|
||||
public void Init()
|
||||
{
|
||||
}
|
||||
@@ -82,6 +86,7 @@ public class Plugin : IViewer
|
||||
else
|
||||
{
|
||||
_tvp = new TextViewerPanel();
|
||||
_currentPath = path;
|
||||
_tvp.LoadFileAsync(path, context);
|
||||
context.ViewerContent = _tvp;
|
||||
}
|
||||
|
Reference in New Issue
Block a user