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

Re-add scripts to index.html/_Layout.cshtml, Update docs #697

Merged
merged 1 commit into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions examples/Demo/Client/wwwroot/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,14 @@
<a class="dismiss">🗙</a>
</div>
<script src="_framework/blazor.webassembly.js"></script>

<!-- Monaco Editor -->
<script src="_content/Microsoft.Fast.Components.FluentUI/lib/monaco-editor/min/vs/loader.min.js"></script>


<script>require.config({ paths: { 'vs': '_content/Microsoft.Fast.Components.FluentUI/lib/monaco-editor/min/vs' } });</script>
<script src="_content/Microsoft.Fast.Components.FluentUI/lib/monaco-editor/min/vs/editor/editor.main.js"></script>



<!-- highlight -->
<script src="https://cdn.jsdelivr.net/npm/@highlightjs/[email protected]/highlight.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/cshtml-razor.min.js"></script>
Expand Down
5 changes: 4 additions & 1 deletion examples/Demo/Server/Pages/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@

<!-- Monaco Editor -->
<script src="_content/Microsoft.Fast.Components.FluentUI/lib/monaco-editor/min/vs/loader.min.js"></script>

<script>require.config({ paths: { 'vs': '_content/Microsoft.Fast.Components.FluentUI/lib/monaco-editor/min/vs' } });</script>
<script src="_content/Microsoft.Fast.Components.FluentUI/lib/monaco-editor/min/vs/editor/editor.main.js"></script>


<!-- highlight -->
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@@highlightjs/cdn-assets@@11.6.0/highlight.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/highlightjs-cshtml-razor@@2.1.1/dist/cshtml-razor.min.js"></script>
Expand Down
10 changes: 7 additions & 3 deletions examples/Demo/Shared/Pages/CodeEditor/CodeEditorPage.razor
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@
<strong>Important:</strong> When using this component, make sure to add the following line to your <code>index.html</code> / <code>_Layout.cshtml</code> <strong>before</strong> where the Blazor script is added:
<br />
<br />
<code>&lt;script src="_content/Microsoft.Fast.Components.FluentUI/lib/monaco-editor/min/vs/loader.min.js">&lt;/script></code>
<code>
&lt;script src="_content/Microsoft.Fast.Components.FluentUI/lib/monaco-editor/min/vs/loader.min.js">&lt;/script><br/>
&lt;script>require.config({ paths: { 'vs': '_content/Microsoft.Fast.Components.FluentUI/lib/monaco-editor/min/vs' } });&lt;/script><br />
&lt;script src="_content/Microsoft.Fast.Components.FluentUI/lib/monaco-editor/min/vs/editor/editor.main.js">&lt;/script>
</code>
</p>
</blockquote>

Expand All @@ -22,9 +26,9 @@
An example of this can be found in this demo site's source code available on <a href="https://github.com/microsoft/fluentui-blazor/tree/dev/examples/Demo">GitHub</a>.
</p>

<ApiDocumentation Component="typeof(FluentCodeEditor)" />

<h2>Example</h2>

<DemoSection Component="typeof(CodeEditorDefaultExample)" Title="Default example" CollocatedFiles="@(new[] { "cs" })" />

<h2>API Documentation</h2>
<ApiDocumentation Component="typeof(FluentCodeEditor)" />