Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs issue report from "getting-started/installation/self-hosted/dotnet.html" #17705

Open
toiyabe opened this issue Jan 1, 2025 · 0 comments
Assignees
Labels
squad:core Issue to be handled by the Core team. status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. type:docs This issue reports a task related to documentation (e.g. an idea for a guide).

Comments

@toiyabe
Copy link

toiyabe commented Jan 1, 2025

Origin URL

https://ckeditor.com/docs/ckeditor5/latest/getting-started/installation/self-hosted/dotnet.html

Project version

44.1.0

Is the information outdated? How?

For .Net 9, the approach needs to change a bit for this to work. See this article for more information.

To place the <script type="importmap" asp-importmap="@data"></script> on the page, insert the following at the top of the razor page:

@{
    var data = new ImportMapDefinition(
    new Dictionary<string, string>
    {
        { "ckeditor5", "/lib/ckeditor/ckeditor5.js" },
        { "ckeditor5/", "/lib/ckeditor/" },
    }, null, null);
}

Then lower down in the page, add the import map like this:

<script type="importmap" asp-importmap="@data"></script>

This will render the following importmap:

<script type="importmap">
{
  "imports": {
    "ckeditor5": "/lib/ckeditor5/ckeditor5.js",
    "ckeditor5/": "/lib/ckeditor5/"
  }
}
</script>

Is there anything else you would like to add?

I posted a Github project that demonstrates this working with ASP.NET 9.

User agent

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0

@toiyabe toiyabe added squad:core Issue to be handled by the Core team. type:docs This issue reports a task related to documentation (e.g. an idea for a guide). labels Jan 1, 2025
@gorzelinski gorzelinski self-assigned this Jan 7, 2025
@CKEditorBot CKEditorBot added the status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
squad:core Issue to be handled by the Core team. status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. type:docs This issue reports a task related to documentation (e.g. an idea for a guide).
Projects
None yet
Development

No branches or pull requests

3 participants