Unable to add anchor link <a id=""></a> on RTE AEM - aem

On the custom component we built, we are not able to add <a id=""></a> in RTE by adding anchor. However, anchor link works fine on template level, but not WCB edit mode.
I compared CRXDE Lite between page and template and the only difference is the tag:
As you can see in the second screenshot, tag is not able to get generated when anchor link is configured. I tried to manually add to CRXDE Lite on the node, then anchor link shows up on the page. So I am guessing there might be some JavaScript code that prevents the to get generated.
What makes it strange is that for both template level and page level, they are using the same richtext component. Why would anchor show different outcomes?

Related

How do I replicate the tinymce link plugin's HTML markup behavior by adding succeeding text outside of the current node instead of inside?

When the user adds a link on selected text, it adds the URL markup only on the selected section and doesn't add the markup to any added text (after the markup is added) if the linked text is at the end of the string. This behavior differs from bold/italics/underline which adds added text to the bold/underline markup if the user adds more text at the end of a string.
I am implementing a custom button that should emulate the behavior of the link plugin. I have gone through the link/plugin.js file to no avail for which code block I need to re-use to get this behavior for my custom button.
How do I implement the link plugin's markup behavior? Are there any tinyMCE commands I should be using (setAttribs, etc)?
Video example of bold vs link plugin

Apache Sling content include - CQ5

I have cq5 content page below content tree in crxde.
The content page has a header, a footer and one component in the body section.
I am trying to get the only content that authored in that specific component (No header, No footer, No Edit bar of component)
I tried following, but it produced the whole page with header, footer and component.
<sling:include path="/content/site-content/disclaimers/risk-considerations.html" />
then, I tried this, there is no header, footer but it still displays Component edit bar.
<sling:include path="/content/site-content/disclaimers/risk-considerations.content.html" />
How could I achieve only returning authored content into another page?
Based on what you need, reference component as Abhishek said fits your use-case. Given that you won't want to hardcode a path within a component or page you would use a dialog to get the path to HTML to include, reference component does that for you in addition to that your use-case of disabling edit-bar/behavior is taken care of within the component.
But in case you are constrained to use your existing approach, then to disable editbar you would need to update your component script to change the mode prior and post inclusion. You can refer to reference component for same. You can also refer to stackoverflow answers here and here

HTML in Dygraph annotation descriptions

Under the Google charts visualization, there is an "allowHTML" option that allows for placing HTML tags inside annotation descriptions. Is there something similar in Dygraphs where the annotation allows an HREF tag that allows the user to link to another web page?
For example, a stock chart shows a split on a specific date. The annotation, on click, would bring up the press release announcing the split. The description field would be in HTML and include the appropriate HREF anchor to the press release.
It is my understanding that dygraphs doesn't support HTML annotations. However, I think it should be pretty easy to provide this type of functionality by using an additional tooltip library.
Dygraphs relies on the title attribute for the annotations. That is, when you hover over the annotation, the tooltip content is populated from the title attribute on the div. As an aside, you could presumably change which attribute it uses quite easily by editing the dygraph annotation source code. If you use a more comprehensive tooltip library (there are loads of jQuery tooltip libraries out there supporting HTML content), it will supercede the basic browser tooltip that dygraphs uses.
For a basic tooltip library that does the job, you could consider:
http://api.jqueryui.com/tooltip/#option-content
or
http://qtip2.com/plugins#ajax

Component without a dialog won't display in Sidekick

If a component is created, but a dialog.xml file isn't included within it, it will not show as available within the Sidekick, even if enabled in Design mode, and with a Component Group specified — why is this?
If you add a cq:editConfig node to the component it will show up in the sidekick, after being enabled in the design dialog of the parsys, without having a dialog.
As reference: http://dev.day.com/docs/en/cq/5-3/developing/components.html#Components and their structure
dialog boxes are meant for dynamically adding content to the components.
if there is no dialog box in a component there is no reason for component to display in sidekick .
u can directly hard code the component like this.
<cq:include path="par0" resourceType="/apps/...." />
Have you gone into the design portion to allow your component? I've often created a new component, and been unable to add it simply because I forgot to allow it in the design mode on that page.
EDIT
Good point - I do believe a dialog.xml file is required for it to show up in the sidekick. Otherwise you have to hard code the include of your component where you need it. I would suggest adding a dialog.xml file, even if it is only for the reason of showing it in the sidekick, so you can add it dynamically to different pages.

Advise for form CSS in Wordpress

I have a WP 3.2.1 site and use Gravity Forms 1.6.2 plugins. I make my first form, and the preview looks good (www.censin.com/form-preview.jpg)
But when view in actual page, the second input text field (Official Website) is not float to the right side of first input text (Company Name). Image in www.censin.com/form-live.jpg
You can visit the live page at: (protected page password: demo)
http://www.censin.com/marketplace/buyer-request/
I am not good at CSS styling, and I think the problem is in the theme style.css but i can't figure it out using firebug in firefox.
Seems like the last column of li is not define well and can't float to the right, or because the site theme css is do not have a usual definition for form input.
Any help to resolve this is appreciated.
The reason for the wrapping is that the list items are slightly too big to floated next to each other so are being pushed down.
In your CSS file add a new rule to set the width on the UL element.
#gform_fields_1
{
width:922px;
}