I am working with a task right now which I need to display the existing features of a "table" plugin. However, I am having a hard time enabling it. When using this code below, I only get to have the table properties feature. That's the only displayed tool/icon I have on my richtext editor. Can somebody help me enable/display other features/icons such as (insertcolumn, insertrow, etc)?
<tableField jcr:primaryType="cq:Widget" xtype="richtext">
<rtePlugins jcr:primaryType="nt:unstructured">
<table jcr:primaryType="nt:unstructured" features="*" />
</rtePlugins>
</tableField>
I have tried doing this (below) but I still failed.
<tableField jcr:primaryType="cq:Widget" xtype="richtext">
<rtePlugins jcr:primaryType="nt:unstructured">
<table jcr:primaryType="nt:unstructured" features="[insertcolumn,insertrow]" />
</rtePlugins>
</tableField>
http://dev.day.com/docs/en/cq/current/administering/configuring_rich_text_editor.html
That's the only toolbar button that the table plugin provides. To use the other features, right-click on the table itself:
Related
I am trying to insert ArgsTable inside an MDX file but it does not show the table.
The components are developed with Litelement.
Have you also encountered the same problem?
<ArgsTable story="name-story" />
I think if you want to use the ArgdTable in MDX, you need to do this:
<Story name="Foo Bar"> ... </Story>
<ArgsTable story="Foo Bar" />
What is the name on your Story?
this one is kind of complicated. Basically I am using Material Design Lite css by google and firing an ajax request to add input fields dynamically using primefaces.
<h:commandLink value="+ Add something>
<f:ajax listener="#{bean.method()}"
execute="#form"
process="#form"
render="#form" />
</h:commandLink>
The method called adds a new div in ui:repeat by adding a new entry to a list in my bean.
<h:form>
<ui:repeat value="#{bean.list}" var="v">
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<h:inputText value="#{v.value}" id="valuetitle"/>
<label class="mdl-textfield__label" for="valuetitle">valuetitle</label>
</div>
</ui:repeat>
</h:form>
Problem: The CSS is not getting updated properly. It does not initiate the class I gave to the div.. any one knows a solution?
Some months ago I had this very same problem. This situation happens because MDL applies their style only once, during the rendering of the HTML.
To fix it you must explicitly ask MDL to re-render the view to reapply the styles. To do this you must call the following MDL function on the success status of the AJAX request:
componentHandler.upgradeAllRegistered()
Your code should look like this:
<h:commandLink value="+ Add something>
<f:ajax listener="#{bean.method()}"
execute="#form"
process="#form"
render="#form"
onevent="function(data){if (data.status === 'success'){componentHandler.upgradeAllRegistered();}}"/>
</h:commandLink>
You can later better encapsulate this solution for a more clean approach, but for now this can solve your problem.
For more info about this situation you can check this issue on the MDL's GitHub page.
xsml file as below its display good in web browser but not showing in Android Emulator.
<Alloy >
<Window id="readWin" class="bg">
<TableView id="tableView">
<TableViewRow class="titlebar"></TableViewRow>
<TableViewRow></TableViewRow>
<TableViewRow>
<TextField class="serachbar"></TextField>
</TableViewRow>
<TableViewRow></TableViewRow>
<TableViewRow center="center" width="190" height="63">
<Button class="sbtn" id="subbtn"></Button>
</TableViewRow>
</TableView>
</Window>
</Alloy>
my index.tss code is like
'#tableView':{
separatorColor:'none'
}
"View":{
layout:'vertical',
},
".bg":{
backgroundImage:'images/bg.png',
},
".titlebar":{
backgroundImage:'images/logo.png',
width:'339dp',
height:'71dp',
top:'140dp'
},
'.serachbar':{
backgroundImage:'images/searchbar.png',
width:'400dp',
height:'50dp',
borderStyle:'none',
},
'.sbtn':{
backgroundImage:'images/btn.png',
width:'187dp',
height:'60dp',
borderStyle:'none',
}
my index.js file code is
$.readWin.open();
bg css is applying at window successfully but tableview data is not showing in Andriod Emulator event its good display in Web Browser. what can be the problem please help
Kind of an old post, but I thought I'd add my 2 cents. First, there's no way we can test this code because we don't have the referenced images. Second, remove all the dp references in your code by adding this line to your tiapp.xml <property name="ti.ui.defaultunit" type="string">dp</property>. Finally, explain what you've tried, and what you're trying to accomplish. Your post lacks a great deal of information that would allow others to help you.
I have a requirement where I need to show a an alert/popup when an editor clicks on the Unpublish menu command. I will show the popup with an Yes/No Button, if Yes is selected we proceed and show the existing UnPub screen. If No is selected No activity happens and the user return back to the screen.
How this can be achieved ?
Can we extend/override the existing CME command's without creating a new Command for ourselves?
I just learned how to do this yesterday (Thank to Nuno Linhares) - you need to be familiar with making a new Editor for the GUI first.
Next step is to find the name of the command that you want to overwrite (Probably "UnPublish" in your case). The easiest way to do that is to use "inspect element" with Chrome or FieFox in the GUI, and look for something like c:command="UnPublish" on the button you wish to extend.
Once you have a basic editor set up, you need to add your new command to overwrite your existing one something like this:
<extensions>
<ext:dataextenders />
<ext:editorextensions>
<ext:editorextension target="CME">
<ext:editurls />
<ext:listdefinitions />
<ext:taskbars />
<ext:commands />
<ext:commandextensions>
<ext:commands>
<ext:command name="UnPublish" extendingcommand="CustomUnPublishCommand"/>
</ext:commands>
<ext:dependencies>
<cfg:dependency>CustomUnPublish.CommandSet</cfg:dependency>
</ext:dependencies>
</ext:commandextensions>
<ext:contextmenus />
<ext:lists />
<ext:tabpages />
<ext:toolbars />
<ext:ribbontoolbars />
</ext:editorextension>
</ext:editorextensions>
</extensions>
Add all your dependencies (JS and CSS etc) and command references in the normal way.
Then write your JS execute function as you would any other GUI command, and call the existing command after you have worked on your popup, something like this:
CustomUnPublish.prototype._execute = function CustomUnPublish$_execute(selection, pipeline) {
//Insert some logic to make a popup and confirm
blnOkToProceed = true;
//
if (blnOkToProceed) {
//EDIT: Original code
$cme.getCommand("UnPublish")._execute(selection, pipeline);
//EDIT: Or using the suggestion from #Peter below
$commands.executeCommand("UnPublish", selection, pipeline);
//End Edit
}
return;
};
I want to be able to do something like this
<test:TabControl id="" runat="server"....>
<ItemTemplate>
<tabItem label="tab1" />
<tabItem label="tab2" />
</ItemTemplate>
</test>
The idea being here is that the only acceptable items in "ItemTemplates" are the tabitem types. There are many asp.net controls that use this, for example the ScriptManager class only allows you to specify certain types of objects under its various collections. Maybe thats the key to this.. I want to add a collection as opposed to a template.
The idea is that in code I will then iterate over each "tabItem" and create the tab as I want it to look (probably rendering div's etc).
Ive had a look at most of MSDN link on how to create templated controls but it doesnt seem to do exactly what I want it to.
Would be grateful for some assistance.
You need either a templated control or a custom control that can parse its content (Read about ParseChildrenAttribute(typeof())). Take a look at this article. Although not exactly your case it can inspire you.