GithubHelp home page GithubHelp logo

Comments (8)

kinetiq avatar kinetiq commented on June 14, 2024

The _content does exist by the way, if I browse directly to it, it is present. The links are just confused.

from blazormonaco.

serdarciplak avatar serdarciplak commented on June 14, 2024

Actually, there was a similar problem with the sample app of this project running at GitHub Pages. It runs at https://serdarciplak.github.io/BlazorMonaco/ and as this URL is not the root path, links like "_content/..." were failing just like you've mentioned. Adding the tag below to the html head solved the issue for me.

<base href="/BlazorMonaco/" />

By the way, if it's not private, I'd love to learn what that use case is.

from blazormonaco.

kinetiq avatar kinetiq commented on June 14, 2024

...Adding the tag below to the html head solved the issue for me.

<base href="/BlazorMonaco/" />

I see that in my original post, I had a formatting error, and it hid some important information. I was trying to share that I have an unusual base tag in my _Host. Fixed that so it's visible now. So this reveals my problem: this component wants to run in the root path, and I may be out of luck since my project already has a different base.

But I wonder why setting the base to /BlazorMonaco/ would fix the problem in your case? It seems like that would result in even stranger paths. Maybe there is a lead here... Or maybe it is possible to somehow build this as a standalone page that has its own base... I would need to do some research, although that might be a bit more invasive than I had hoped.

By the way, if it's not private, I'd love to learn what that use case is.

Sure. My project generates sophisticated reports, where (among other things) we generate language based on statistics. Each chunk of potential language is a small class called an insight. Insights are smart enough to report back a weight showing how interesting its result is. So we might run a hundred classes and return only the 3 most compelling results, by comparing weights.

I have the required code down to something very simple that (highly trusted) technical non-programmers inside my company could learn to use, greatly speeding up the iteration cycle on our language constructs. I want to build a page that allows them to write code and see the results. This editor would be a perfect solution for the editor part, if I can get it to work.

from blazormonaco.

serdarciplak avatar serdarciplak commented on June 14, 2024

Do you have your project in a public repo? I think I can try a few things and make it work.

from blazormonaco.

kinetiq avatar kinetiq commented on June 14, 2024

Ok, I made a public repo, check it out: https://github.com/kinetiq/MonacoExample

Thanks for your help with this!

from blazormonaco.

serdarciplak avatar serdarciplak commented on June 14, 2024

Hi @kinetiq
Sorry for replying too late. I've checked your repo. When I run it in VS, it runs at the root of "https://localhost:44363/" without any additional path like "/Blazor/". But the base tag tells the browser that all paths should have a prefix. So, the browser tries to load BlazorMonaco resources with that prefix, but as the app actually runs on the root path, the resources cannot be found in that sub directory. You should run the app in the "/Blazor/" path, or remove that base tag.

from blazormonaco.

kinetiq avatar kinetiq commented on June 14, 2024

Haha, it has been awhile but I appreciate the response.

from blazormonaco.

serdarciplak avatar serdarciplak commented on June 14, 2024

Closing due to inactivity.

from blazormonaco.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.