Script tags in RTE AEM 6.1 - aem

I am trying to create a Editor component that will take inline javascript.
I understand that I can use clientlibs folder for loading JS, but some of the video CDN folks require you to put embed tags with JavaScript in the editor, and I think some of that is also used for rapid development. Currently with the state of RTE, I cannot put a script <script/> tag even after extending it, as it strips it out and only takes the html tags.
Could you please provide any insight if this could be doable in AEM 6.1
Here's what I have tried:
I looked at several post didn't got a clue
extended RTE using Adobe's documentation, but see a script button, that only takes html tags.
looked for hacks that could tell me what part of the code is tripping out </script> tags or could not execute js.
looked for some components out there that does that, found nothing
so far.

Related

Can a GitHub wiki embed HTML

I would like to create a wiki page that is a preamble (standard markdown) followed by an HTML/JS code listing followed by (in a frame I suppose) the page that this code would generate.
Is this possible?
PS The code is: http://pipad.org/MathBox/slides_simple.html
Github Wikis allow you to embed HTML, but not all HTML tags are supported.
To embed supported HTML:
Edit a wiki page.
Ensure the edit mode is on "Markdown".
Type the html directly into the main content area (there's no "code" view, like you often see in tools like Wordpress).
Which tags aren't supported?
I couldn't find documentation on this, but we have a few clues:
Github wikis are built on a software tool called Gollum. We can see which tags are supported in Gollum by default here in the Gollum docs. Github may customize these defaults for their use-case, but I'll bet it's pretty similar.
I went ahead and created a test wiki here with all the major visual html elements added to it (copied from Poor Man's Styleguide). It looks like the main tags that don't display are iframe, video, audio, and all of the various form inputs (textarea, input, select, etc).

CQ5/AEM - Certain links are not rewriting

We're experiencing some inconsistency with URLs on our publish instance. Some links are having the /content/project/ removed whilst others are not.
The /etc/map has been created and seems to be working as expected, except for these links.
An example of where the rewriting is links in the OOTB Text component.
Just highlighted the text and used the hyperlink in the RTE.
The output HTML on publish comes through as the desired
<a adhocenable="false" href="/path/support.html">My Link</a>
A link that's not being rewritten is from a component, in it's dialog we have a richtext xtype that is referenced in the jsp
<cq:text property="description">
This however is output on the publish as:
<a adhocenable="false" href="/content/project/path/support.html">Other Link</a>
I've had a look in /system/console/configMgr and the Day CQ Link Transformer Checker and this has a:href, area:href, from:action, input:value. So I thought this would pick up the links under anchors.
If anyone can suggest where I should be looking to resolve this, any help would be appreciated.
Upon further investigations I noticed that the links that were not working were contained in tags, and therefore not rewritten by AEM

Tinymce Richtext-editor not rendering macro RTE

I'm running a site with umbraco version 4.11.1 and is trying to render the info of a macro within a tinyMCE richtext-editor without any success.
In version 4.11.1 (and perhaps some other versions before this) Umbraco has a button for rendering macros within tinyMCE. If you click this button it will show all the macros that you have been able to render. If I add a macro, it will render out the stuff I've entered in the macro, within an orange-dotted border, which means that the editor understands that I've added the macro.
However, after I save and publish and enter the page where I've added the macro, it doesn't render anything. I came across some posts when I googled the problem and found out that I could trace the problem using a querystring (?umbDebugShowTrace=true) and look through the HTML and see what has been rendered. I found the following HTML:
<?UMBRACO_MACRO macroAlias="Testmacro" />
...which should render, if you ask the people in these posts.
If anyone had this problem, or know how to solve it. Please feel free to participate.
Thanks in advance.
David
Try
string macro = umbraco.library.RenderMacroContent("<?UMBRACO_MACRO macroAlias=\"Testmacro\" ReusableText=\"1112\" ></?UMBRACO_MACRO>", 1112);
string result = paragraph.Replace("<?UMBRACO_MACRO macroAlias=\"Testmacro\" ReusableText=\"1112\" />",macro);
Best regrads

How to load html head tags from one source

Okay, for static pages. Is there a way to load everything between the head tags (css,javascript,etc) from one source so we don't have to load it in every html file? I know this may be a stupid question but I couldn't find one on here and if there was already a post about it, I guess I was stupid to miss it.
If you environment permits you can use Server Side Includes http://httpd.apache.org/docs/current/howto/ssi.html which doesnt really involve using traditional dynamic scripting languages or servlet technology. In any case the HTML standard also allows you reference external CSS and JS - they dont have to be inline. If they are at the same URL they will only get loaded once by the browser.

Using Joomla 1.5 based site, I am experiencing a problem while making JAPopup plugin work with Template 29042 from template-help.com

JAPopup is a handy plugin for Joomla to render Youtube videos in a Modal Window so user cannot click on multiple Youtube videos at the same time. The website URL is www.multicorewareinc.com/29042 (hast not gone live yet!). If I use a standard Joomla template such as JA_Parity or rhuk_mllkyway, JAPopup plugin works fine. But instead if I use Template 29042 from template-help.com, JAPopup hangs up. I compared the index.php files of a working template (such as rhuk_milkyway) and Template 29042 and as far as I can tell, 29042 uses Javascript extensively and there appears to be an issue when it comes to launching JAPopup (which too is based on Javascript). I put print statements in all the JAPopup modules and verified that the code was getting executed in either templates. So I am at a loss as to why JAPopup won't execute. If anyone has a suggestion, I would be grateful. Once I fix this, I plan on publishing the problem and the fix on my web-site, www.sreeiyer.com.
What does Firebug say? It's obviously a jscript conflict so start narrowing down the options - does the template use jQuery or another library? Does JAPopup use a library? You can also remove the scripting from the template and start adding it back until the error comes back, then you know what needs to be rewritten.