thanks,Mikael,you are right. uninstall abp cli and re-install it resolve the problem
I add a method in webModel like this:
services
.AddSingleton(_ => new MarkdownPipelineBuilder()
.UseAutoLinks()
.UseBootstrap()
.UseGridTables()
.UsePipeTables()
.Build());
and it worked. thank you for your help @EngincanV,
thank you @EngincanV, now I encounter another question, how to Inject IMarkdownToHtmlRenderer? because When I run it,It show wrong msg:
An unhandled exception occurred while processing the request.
DependencyResolutionException: None of the constructors found with 'Volo.Abp.Autofac.AbpAutofacConstructorFinder' on type 'ZSHTech.IPMS.Web.Utils.MarkdownToHtmlRenderer' can be invoked with the available services and parameters:
Cannot resolve parameter 'Markdig.MarkdownPipeline markdownPipeline' of constructor 'Void .ctor(Markdig.MarkdownPipeline)'.
Autofac.Core.Activators.Reflection.ReflectionActivator.GetAllBindings(ConstructorBinder[] availableConstructors, IComponentContext context, IEnumerable<Parameter> parameters)
DependencyResolutionException: An exception was thrown while activating ZSHTech.IPMS.Web.Pages.CmsKit.Pages.ViewModel -> ZSHTech.IPMS.Web.Utils.MarkdownToHtmlRenderer.
Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action<ResolveRequestContext> next)
if I change the index.js like this:
{
text: l('View'),
visible: abp.auth.isGranted('CmsKit.Pages.Update'),
action: function (data) {
location.href = 'Pages/ViewModel/' + data.record.id;
}
},
and I write the ViewModel.cshtml like this:
@page "/Cms/Pages/ViewModel/"
@using ZSHTech.IPMS.Web.Utils
@using Volo.Abp.AspNetCore.Mvc.UI.Packages.HighlightJs
@using ZSHTech.IPMS.Web.Pages.CmsKit.Pages;
@model ViewModel
@inject IMarkdownToHtmlRenderer MarkdownRenderer
@{
}
<abp-card>
<abp-card-body>
@Html.Raw(await MarkdownRenderer.RenderAsync(Model.View.Content))
</abp-card-body>
</abp-card>
ViewModel.cshtml.cs:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Volo.CmsKit.Pages;
using Volo.CmsKit.Public.Pages;
namespace ZSHTech.IPMS.Web.Pages.CmsKit.Pages
{
public class ViewModel : IPMSPageModel
{
[BindProperty(SupportsGet = true)]
public Guid Id { get; set; }
[BindProperty]
public PageViewModel View { get; set; }
protected IPageRepository PageRepository { get; }
public ViewModel(IPageRepository pageRepository)
{
PageRepository = pageRepository;
}
public async Task OnGetAsync()
{
var Page = await PageRepository.GetAsync(Id);
View = new PageViewModel { Content = Page.Content, Title = Page.Title };
}
}
public class PageViewModel
{
public Guid Id { get; set; }
public string Title { get; set; }
public string Content { get; set; }
}
}
when I click the View button, I get the same wrong msg:
thank you, I do ask the same question in tui.editor, but receive no feedback.
I tried to update the tui-editor to the latest version, the tui-editor is not work .
I read the document, but because the tui-editor in abp v4.0 use the version 2.5.3, but the document is for version 3.0.2,and the api is not the same.so I can't add the button as the document. thanks
thanks, another question. how to upload file size more than 28M? I can't upload file more than 28M in FileManagement Module
hi @cotur, how to overriding DownloadAsync method of FileDescriptorController controller? I don't want to change the source code of FileManager Module.
thank you @cotur. for now, I can't get the Id of the file have uploaded to FileManager Module directly, So I want to add a CopyUrl method to achieve my request. thanks.