From 01ba169f3f38c2bd5063459f67aa4edf028f4ab1 Mon Sep 17 00:00:00 2001 From: Adam Dupaski Date: Thu, 2 Apr 2020 13:57:53 +0200 Subject: [PATCH] Add link to documentation So that the documentation is easily available and only needs to be maintained in one place, the README for this component should feature a link to the proper component doc published in the App Store Guide. This is also the content that should appear on the **Documentation** tab in the App Store for the component upon the next and all future releases. Please update the App Store Guide as you update the component. You can contact me with any questions. --- README.md | 51 +-------------------------------------------------- 1 file changed, 1 insertion(+), 50 deletions(-) diff --git a/README.md b/README.md index ab348a4..78b9769 100644 --- a/README.md +++ b/README.md @@ -1,50 +1 @@ -# HTMLSnippet - -This widget is useful to add a piece of HTML or JavaScript to a form. For example to embed a YouTube or Flash object. Furthermore it can be used to enhance styling by adding arbitrary HTML elements. - -## Contributing - -For more information on contributing to this repository visit [Contributing to a GitHub repository](https://docs.mendix.com/howto/collaboration-requirements-management/contribute-to-a-github-repository)! - -## Typical usage scenario - -- Display a predefined HTML document -- Load a Java Applet -- Manipulate the styling using JavaScript rather than theming. - -## Features and limitations - -- Embed raw HTML -- Embed raw JavaScript -- Load external HTML / JS file - -## Dependencies - -- Mendix 5.x environment - -## Properties - -- **Content Type [ HTML, JavaScript, JavaScript with jQuery ] :** - Select how the snippet should be rendered. The JavaScript with jQuery option will make sure that your code can leverage [jQuery v3.3.1](https://blog.jquery.com/2018/01/20/jquery-3-3-1-fixed-dependencies-in-release-tag/) for example: - -```js -//e.g. this code snippet will set the color of all your paragraph tags on the page to red. -$('p').css('color', 'red') -// or -jQuery('p').css('color', 'red') -``` - -- **Contents :** - The HTML or Javascript to embed. -- **External File :** - The path to the HTML or JavaScript file you want to add. The root is the theme folder. Will override the Contents section if used. With the newly added "/p/" native deeplinks, you may want to start your file path with a "/" to prevent any 404s caused by this deeplink. -- **On click microflow :** - The microflow which should be executed on click. This can be used to, for example, show a page when the snippet is being clicked. -- **Documentation :** - Documentation of this widget. Should explain its purpose. -- **Refresh on context change:** - Refresh when the context changes -- **Refresh on context update:** - Refresh when the context updates (works only when context change is true) -- **Enclose HTML with DIV:** - When adding HTML, the widget will wrap it with a DIV. If this is set to false, it will just replace the content of the widget. (For compatibility purposes this is set true on default) +Please see [HTML/JavaScript Snippet](https://docs.mendix.com/appstore/widgets/html-javascript-snippet) in the Mendix documentation for details.