In the capsule-info.bxb file, there's two keys called actionFgColor and actionBgColor and I'm unsure what they do. Is this used inside the app if there's interactive elements or actions? Or is it related to the appearance of the capsule in the Bixby Marketplace?
Example Code
description {
displayName (Example)
companyName (Example, Inc.)
iconUrl (/images/icons/example.png)
description (Example allows you to see examples of things.)
websiteUrl (https://www.example.com)
termsUrl (https://www.example.com/TOS.html)
privacy-policy-url (https://www.example.com/privacy.html)
search-keywords{
keywords (Example)
}
dispatch-name (Example)
dispatch-aliases {
alias (Example Site)
}
actionBgColor (#BF2519) // what does this do?
actionFgColor (#FFFFFF) // what about this?
}
Here's a screenshot of the (actionFgColor) and background (actionBgColor) colors being rendering on a confirmation button. You can use it to add your branding color to your capsule.
Here's some additional information about those keys in the documentation:
https://bixbydevelopers.com/dev/docs/dev-guide/release-notes/bixby-studio.2018-Q2-Bixby-Studio-Release-Notes
https://bixbydevelopers.com/dev/docs/reference/type/description.actionBgColor
Related
In Gitlab, I've been able to render an Entity Relationship Diagram with Mermaid in a Markdown file as specified here.
This is the Markdown I used:
```mermaid
erDiagram
CUSTOMER }|..|{ DELIVERY-ADDRESS : has
CUSTOMER ||--o{ ORDER : places
CUSTOMER ||--o{ INVOICE : "liable for"
DELIVERY-ADDRESS ||--o{ ORDER : receives
INVOICE ||--|{ ORDER : covers
ORDER ||--|{ ORDER-ITEM : includes
PRODUCT-CATEGORY ||--|{ PRODUCT : contains
PRODUCT ||--o{ ORDER-ITEM : "ordered in"
```
The mermaid interactive editor provides an example of configuration:
{
"theme": "default"
}
But I don't know where to locate that configuration information. I've tried putting it in the same directory, in a file called config.json or mermaid-config.json, but neither of those have worked. I also tried including it in the Markdown which defined the diagram, which only caused it to render incorrectly. Is there a way to specify the theme or other CSS elements for Gitlab?
Just tried it out and it worked
```mermaid
%%{init: { 'theme':'dark', 'sequence': {'useMaxWidth':false} } }%%
sequenceDiagram
alice ->> mark: Sent a flower
```
Edit: If you are using a recent enough version of GitLab (possibly 13.9.0 from February, 2021, which changes the shipped version of Mermaid from 8.5.2 to 8.9.0) you can use directives, as mentioned in the other answers:
```mermaid
%%{init: { 'logLevel': 'debug', 'theme': 'dark' } }%%
graph LR
%%{config: { 'fontFamily': 'Menlo', 'fontSize': 18, 'fontWeight': 400} }%%
A-->B
```
Note that Mermaid seems to be sensitive to newlines here. If I add a blank line between graph LR and the following %%{config line I get a syntax error.
Original answer for older versions of GitLab:
I don't believe you can, unless you want to self-host and modify the GitLab source code.
The Mermaid.js configuration in GitLab is largely hard-coded. It looks like it uses the neutral theme by default and switches to the dark theme if
the user is using dark or solarizedDark as their web IDE theme, and
if the user is on the IDE web page.
Unfortunately current GitLab uses mermaidjs version 8.5.2 as per merge request
From mermaid 8.6 onward you should be able to use directives to set the theme and/or other settings without touching the hard coded css. For example:
%%{init: { 'theme': 'forest' } }%%
erDiagram
...
I'm afraid we have to wait a little longer, until GitLab updates to this version. You can check in the meantime mermaids doc on the matter. You can includes this already in your markdown, as the %% is interpreted as comments and will not show up in the rendering. But when GitLab makes the move, your pages should immediately update.
I have a TLDR switch on my blog.
This switch is a javascript that hides any element with the class="tldr" attribute attached to it, or unhides it.
I've created custom block_formats in TinyMCE for Paragraphs that will let me create a Paragraph with the TLDR class attached.
However, when I insert a codesample using that plugin it will generate a pre block that I can not format afterward.
I've already tried to create a custom PRE block with the TLDR class but TinyMCE won't let me apply this format to the code sample block that has been created.
Does anyone have another solution for my problem or can you see if I'm doing anything wrong?
Is there another way in TinyMCE to add attributes to elements that have been added to the code already?
I've tried the code viewer but that doesn't allow me to modify the generated HTML code.
You can use formats and style_formats to customize the styling options available to users and how they operate.
To add a custom pre block with class="tldr", you can add this config to TinyMCE:
style_formats: [
// Adds a pre format to style_formats that applies a 'tldr' class
{ title: 'TLDR', block: 'pre', classes: 'tldr' }
]
See this TinyMCE fiddle: http://fiddle.tinymce.com/Ikhaab
On its own, this will override the default style formats, but you can add them back in and position the new TLDR option within the Blocks submenu as shown here: http://fiddle.tinymce.com/Jkhaab
Resources:
https://www.tiny.cloud/docs/configure/editor-appearance/#style_formats
https://www.tiny.cloud/docs/configure/content-formatting/#formats
https://www.tiny.cloud/docs/demo/format-custom/
I want to be able to change the value of a TV for Resources shown in a Collections grid using a dropdown select bo.
Can anyone provide an example of how to create a select box in a Collection grid that is either
populated from the options in an existing Template Variable
populated from a fixed list, simply options 1, 2, 3
I understand this is possible but can't find an example close enough to what I need to achieve that I can figure it out on my own.
Things I’ve tried are
I have seen Susan Otwell’s example of how to change Created By with a select box
http://modxcookbook.com/add-ons/collections/editable-grid-view.html
Discussion linked below addresses a similar problem but remains unanswered
https://forums.modx.com/thread/95984/adding-modx-combo-to-collections-list
MIGX configuration and syntax appear similar but not close enough that I can figure what I need to do
https://forums.modx.com/thread/91403/single-select-listbox-entries-in-migx
MODx.combo.ComboBox docs look like they have some relevant detail but I don’t know enough to understand if this is useful
https://docs.modx.com/revolution/2.x/developing-in-modx/advanced-development/custom-manager-pages/modext/modx.combo.combobox
I've looked for examples of similar dropdowns in the source code of other Extras. I see xtype references but am unable to reverse engineer them to figure what I need to create my own dropdown in the Collections grid.
Susan Otwell's example above creates a dropdown based on xtype modx-combo-user. This looks close to what I need but I can't figure how to adapt this to create a dropdown from either TV values or a fixed list.
{"xtype":"modx-combo-user","renderer":true,"fields": ["fullname","username","id"],"displayField": "fullname","baseParams": {"action": "security/user/getlist","usergroup":2}}
Can anyone provide an example or point me to another resource that may help?
I just answered this one on the MODX forums but here it is for anyone on StackOverflow:
Create a JS file in your assets directory. For simplicity sake,
create a file called test.js in your assets directory.
Go to the MODX system settings page and select the Collections namespace filter. Then in the collections.user_js setting, enter the
value: {assets_url}test.js. This will instruct Collections to load
your new test.js file whenever Collections is initiated.
For this example, copy and paste the following ZoomLevel (meant for Google Maps zoom) example into your new test.js file.
collections.combo.ZoomLevel = function(config) {
config = config || {};
Ext.applyIf(config,{
store: new Ext.data.ArrayStore({
id: 0
,fields: ['level']
,data: [
['1'],
['2'],
['3'],
['4'],
['5'],
['6'],
['7'],
['8'],
['9'],
['10'],
['11'],
['12'],
['13'],
['14'],
['15'],
['16'],
['17'],
['18'],
['19'],
['20'],
['21']
]
})
,mode: 'local'
,displayField: 'level'
,valueField: 'level'
,name: 'zoom_level'
,hiddenName:'zoom_level'
});
collections.combo.ZoomLevel.superclass.constructor.call(this,config);
};
Ext.extend(collections.combo.ZoomLevel,MODx.combo.ComboBox);
Ext.reg('collections-combo-zoomlevel',collections.combo.ZoomLevel);
Once pasted, save the file.
Go to your collections view page and add a new column for your collections grid. In the editor field, copy and paste the following JSON:
{
"xtype": "collections-combo-zoomlevel",
"renderer": true
}
You now have a combobox editor with the values we defined in the test.js file.
These combo-boxes are very configurable but it can be a bit of a steep learning curve to find out what setting does what.
Here you can see the combos that Collections itself defines:
https://github.com/modxcms/Collections/blob/9a328fa881b76e2ce355876156eaca3126065717/assets/components/collections/js/mgr/extra/collections.combo.js
I am out after adding a video element in the template level as it is possible to add a button element like the following;
{action:button}
Is there any way of doing it like this;
{media:video}
I am building a custom template, that's why I should statically give such elements in the HTML so that user can see that there is a video element in the content (it is mandatory) and s/he will edit the source of with the desired URL.
Unfortunately video is not a valid tag.
See:: https://dev.weebly.com/create-the-html-layout-templates.html
The only real option would be to use Weebly's built-in Sections feature, which allows the user to add a video as a background (if that was your intention).
The only other options would be to have them hardcode the URL of the video, in your Theme, have them use the Video Element or point them in the direction of the App Center so they can use an app that provides the feature.
In Liferay I have used the asset publisher to publish news on my news page. I want to fetch the 3 top news from the page and embed it into another page. How can I do this? The page URL containing the news links looks like the following:
Liferay.Widget({ url: 'http://test.com/testnews/101_INSTANCE_f22'});
Liferay itself has a property where one can share an asset publsiher instance any where else on a site, but that is not exactly what I want. So any help or guidance is appreciated. Thanks.
If you want only links then you can set display style 'title-list' (this will take you to the article on the main news page).
if you want to open the link in another page, change asset link behavior to 'View in a specific portlet'.
You can change the look of asset publisher to whatever design you want. follow the path look & feel --> advanced styling --> Copy the portlet id. Now by using mozilla firefox pick the class,tags,etc. and write your css code. This will override the basic design. E.g.
#p_p_id_101_INSTANCE_8f5JPIxv8ml0_ .asset-abstract {
width: 25%;
float: left;
}
Is there a particular reason why you don't want to configure another AssetPublisher on the second page? You can just use the identical configuration, but limit the number of results shown to 3 - done.
Problem solved. Here is the solution with jQuery:
$.get('http://test.com/news/', function(data) {
var top3links = $(data).find('a:lt(3)');
$('#top3').html(top3links); // });