-
Notifications
You must be signed in to change notification settings - Fork 561
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
improve designer docs to not hard code cdn versions #3256
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,11 +38,15 @@ To load the designer component you have 2 options: | |
<!-- REQUIRED: monaco-editor is required for the designer to work --> | ||
<script src="https://unpkg.com/[email protected]/min/vs/loader.js"></script> | ||
|
||
<!-- DESIGNER OPTION A: Card Designer + Standard Hosts --> | ||
<script src="https://unpkg.com/[email protected]/dist/adaptivecards-designer.min.js"></script> | ||
<!-- DESIGNER OPTION A: Card Designer + Standard Hosts | ||
(replace <VERSION> with the version you want to load, or "latest" for latest) | ||
--> | ||
<script src="https://unpkg.com/adaptivecards-designer@<VERSION>/dist/adaptivecards-designer.min.js"></script> | ||
|
||
<!-- DESIGNER OPTION B: Standalone Card Designer, without standard Hosts --> | ||
<!--<script src="https://unpkg.com/[email protected]/dist/adaptivecards-designer-standalone.min.js"></script>--> | ||
<!-- DESIGNER OPTION B: Standalone Card Designer, without standard Hosts | ||
(replace <VERSION> with the version you want to load, or "latest" for latest) | ||
<script src="https://unpkg.com/adaptivecards-designer@<VERSION>/dist/adaptivecards-designer-standalone.min.js"></script> | ||
--> | ||
|
||
<script type="text/javascript"> | ||
window.onload = function() { | ||
|
@@ -56,7 +60,8 @@ To load the designer component you have 2 options: | |
|
||
// The designer requires various CSS and image assets to work properly, | ||
// If you've loaded the script from a CDN it needs to know where these assets are located | ||
designer.assetPath = "https://unpkg.com/[email protected]/dist"; | ||
// Use the same <VERSION> that you used above | ||
designer.assetPath = "https://unpkg.com/adaptivecards-designer@<VERSION>/dist"; | ||
|
||
// Initialize monaco-editor for the JSON-editor pane. The simplest way to do this is use the code below | ||
require.config({ paths: { 'vs': 'https://unpkg.com/[email protected]/min/vs' } }); | ||
|
@@ -235,5 +240,13 @@ For advanced configuration of the designer use the following APIs. | |
] | ||
} | ||
); | ||
|
||
/* Modify the Element toolbox (BEFORE designer attached) */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Curious - what does "after/before designer attached" imply? #Closed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It means before/after the designer instance's |
||
Adaptive.AdaptiveCard.elementTypeRegistry.unregisterType("RichTextBlock"); | ||
ACDesigner.CardDesignerSurface.cardElementPeerRegistry.unregisterPeer(Adaptive.RichTextBlock); | ||
|
||
/* Modify the Actions flyout (AFTER designer attached) */ | ||
Adaptive.AdaptiveCard.actionTypeRegistry.unregisterType("Action.ToggleVisibility"); | ||
ACDesigner.CardDesignerSurface.actionPeerRegistry.unregisterPeer(Adaptive.ToggleVisibilityAction); | ||
}; | ||
``` |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this import? Don't see it being used here?