{"id":20299761,"url":"https://github.com/ontopiccms/ontopic-editor-aspnetcore","last_synced_at":"2026-03-15T23:36:11.926Z","repository":{"id":40319148,"uuid":"106128979","full_name":"OnTopicCMS/OnTopic-Editor-AspNetCore","owner":"OnTopicCMS","description":"ASP.NET Core version of an editor for Ignia's OnTopic CMS.","archived":false,"fork":false,"pushed_at":"2023-02-04T13:44:14.000Z","size":3922,"stargazers_count":4,"open_issues_count":19,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-03T22:03:10.730Z","etag":null,"topics":["administration-interface","asp-net","asp-net-core","aspnetcore","cms","content-editor","content-management-system","editor","ignia","ontopic","ontopic-library","web-application"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OnTopicCMS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-07T20:39:30.000Z","updated_at":"2024-03-06T04:53:00.000Z","dependencies_parsed_at":"2023-01-24T17:16:24.436Z","dependency_job_id":null,"html_url":"https://github.com/OnTopicCMS/OnTopic-Editor-AspNetCore","commit_stats":null,"previous_names":["ignia/topic-editor-mvc"],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OnTopicCMS%2FOnTopic-Editor-AspNetCore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OnTopicCMS%2FOnTopic-Editor-AspNetCore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OnTopicCMS%2FOnTopic-Editor-AspNetCore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OnTopicCMS%2FOnTopic-Editor-AspNetCore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OnTopicCMS","download_url":"https://codeload.github.com/OnTopicCMS/OnTopic-Editor-AspNetCore/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248406909,"owners_count":21098325,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["administration-interface","asp-net","asp-net-core","aspnetcore","cms","content-editor","content-management-system","editor","ignia","ontopic","ontopic-library","web-application"],"created_at":"2024-11-14T16:16:12.741Z","updated_at":"2026-03-15T23:36:11.908Z","avatar_url":"https://github.com/OnTopicCMS.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OnTopic Editor\nThe `OnTopic.Editor.AspNetCore` project provides a web-based interface for the [**OnTopic Library**](https://github.com/OnTopicCMS/OnTopic-Library). The editor is distributed as a **Razor Class Library** via **NuGet** so it can easily be added to a website that implements the [`OnTopic.AspNetCore.Mvc`](https://github.com/OnTopicCMS/OnTopic-Library/tree/master/OnTopic.AspNetCore.Mvc) library.\n\n[![OnTopic.Editor.AspNetCore package in Internal feed in Azure Artifacts](https://igniasoftware.feeds.visualstudio.com/_apis/public/Packaging/Feeds/46d5f49c-5e1e-47bb-8b14-43be6c719ba8/Packages/682244bf-1062-48de-949e-16f9cb11a6cf/Badge)](https://www.nuget.org/packages/OnTopic.Editor.AspNetCore.All/)\n[![Build Status](https://igniasoftware.visualstudio.com/OnTopic/_apis/build/status/OnTopic-Editor-CI-V1?branchName=master)](https://igniasoftware.visualstudio.com/OnTopic/_build/latest?definitionId=8\u0026branchName=master)\n![NuGet Deployment Status](https://rmsprodscussu1.vsrm.visualstudio.com/A09668467-721c-4517-8d2e-aedbe2a7d67f/_apis/public/Release/badge/bd7f03e0-6fcf-4ec6-939d-4e995668d40f/2/2)\n\n### Contents\n- [Installation](#installation)\n- [Configuration](#configuration)\n  - [Services](#services)\n  - [Routes](#routes)\n  - [Dependencies](#dependencies)\n    - [`IControllerActivator`](#icontrolleractivator) \n    - [`IViewComponentActivator`](#iviewcomponentactivator) \n\n\n## Installation\nInstallation can be performed by providing a `\u003cPackageReference /\u003e` to the [`OnTopic.Editor.AspNetCore.All`](OnTopic.Editor.AspNetCore.All/README.md) **NuGet** metapackage.\n```xml\n\u003cProject Sdk=\"Microsoft.NET.Sdk.Web\"\u003e\n  �\n  \u003cItemGroup\u003e\n    \u003cPackageReference Include=\"OnTopic.Editor.AspNetCore.All\" Version=\"5.0.0\" /\u003e\n  \u003c/ItemGroup\u003e\n\u003c/Project\u003e\n```\n\n## Configuration\nThere are a lot of moving parts to the editor, and it requires the configuration of services, routes, and service dependencies. This process is aided by a set of extension methods, which are recommended.\n\n### Services\nThe editor necessitates a custom model binder�[`AttributeBindingModelBinderProvider`](OnTopic.Editor.AspNetCore/Infrastructure/AttributeBindingModelBinderProvider.cs)�in order to work properly. This can be manually configured via `AddMvcOptions()`, or can be added using the `AddTopicEditor()` extension method:\n```c#\npublic class Startup {\n  �\n  public void ConfigureServices(IServiceCollection services) {\n    services.AddControllersWithViews()\n      .AddTopicSupport()\n      .AddTopicEditor();\n  }\n}\n```\n\n### Routes\nThe editor lives in an area called `Editor` and a controller called `EditorController`. A custom route can be conigured using the `MapTopicEditorRoute()` extension method to setup the `/OnTopic` route (e.g., `/OnTopic/Edit/Root/Web`):\n```c#\npublic class Startup {\n  �\n  public void Configure(IApplicationBuilder app, IWebHostEnvironment env) {\n    app.UseEndpoints(endpoints =\u003e {\n      endpoints.MapTopicEditorRoute();\n    });\n  }\n}\n```\n\n### Dependencies\nThe editor is implemented through a set of **ASP.NET Core View Components**, some of which have external dependencies on a `ITopicRepository`. These should be configured via dependency injection. If you're using a _dependency injection container_, those dependencies should be the same as those required for the **OnTopic Library**. If you are manually configuring your dependencies, however, then the following provides a bare-bones example:\n\n#### `IControllerActivator`\n```c#\npublic class ControllerActivator : IControllerActivator {\n  �\n  public object Create(ControllerContext context) {\n    var type = context.ActionDescriptor.ControllerTypeInfo.AsType();\n    if (type == typeof(EditorController)) {\n      return new EditorController(_topicRepository, _topicMappingService);\n    }\n  }\n}\n```\n\u003e _Note:_ This assumes a `_topicRepository` and `_topicMappingService` have already been configured; see the [`OnTopic.AspNetCore.Mvc`](https://github.com/OnTopicCMS/OnTopic-Library/tree/master/OnTopic.AspNetCore.Mvc#composition-root) documentation for details.\n\n#### `IViewComponentActivator`\nThe [`StandardEditorComposer`](OnTopic.Editor.AspNetCore.Attributes/StandardEditorComposer.cs) class acts as a clearing house for accepting common dependencies and then composing the appropriate dependency graph for the view components:\n```c#\npublic class ViewComponentActivator : IViewComponentActivator {\n  �\n  public object Create(ViewComponentContext context) {\n\n    var standardEditorComposer = new StandardEditorComposer(_topicRepository, _webHostEnvironment);\n    var type                   = context.ViewComponentDescriptor.TypeInfo.AsType();\n\n    if (standardEditorComposer.IsEditorComponent(type)) {\n      return standardEditorComposer.ActivateEditorComponent(type, _topicRepository);\n    }\n  }\n} \n```\n\u003e _Note:_ For a full example, see the [`SampleActivator`](OnTopic.Editor.AspNetCore.Host/SampleActivator.cs) in the [`OnTopic.Editor.AspNetCore.Host`](OnTopic.Editor.AspNetCore.Host) project.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fontopiccms%2Fontopic-editor-aspnetcore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fontopiccms%2Fontopic-editor-aspnetcore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fontopiccms%2Fontopic-editor-aspnetcore/lists"}