Adding custom buttons to the Rich Text Editor in CQ

Hi,
I have added custom buttons to the rich text editor in order to allow our editors to add specific content, such as popovers, custom videos and other data necessary data.
I have successfully modifed the Rich Text editor so, that it includes the custom buttons in the actions panel.
I have also managed to make the buttons work and include the data where necessary, when user highlights the text and clicks on a certain button.
The last bit I am struggling with, is the visual feedback we give to the users when this text has associated action with it.
E.g. when we select this text and make it bold when we click on the word B the button B becomes highlighted in the actions panel, later when we continue typing our text and click again on "bold" the letter B becomes highlighted again.
Is there any button related callback/method I could overwrite to add this functionality and make my button highlighted ?
Thanks,
Puzanovs

After lot's of thinking found a solution....
Essentially the first step is to extend the CQ.form.rte.plugins.Plugin in your custom button.
Then during the UI initialisation we create our "custom"
var pressButton = new ui.TbElement("press-button", this, true,this.getTooltip("press-button")); // Essential extend of the button
setInterval(function() {
                 if(window.jQuery) {
                     window.jQuery(document).ready(function () {
                         window.jQuery(".x-edit-glossary-insert").css({width:45,"background-image":"none"}); // Ignore the background
                         window.jQuery(".x-edit-glossary-insert").text("Press Button"); // Set the name
                        $(document).on({
                            mouseenter: function(){
                              window.jQuery(".x-edit-glossary-insert").html("<b>Press Button</b>"); // Set the name bold                        
                            mouseleave: function(){                       
                           window.jQuery(".x-edit-glossary-insert").html("Press Button"); // Set the name normal
                         }}, '.press-button');
             }, 100);
tbGenerator.addElement("press-button", plg.Plugin.SORT_LISTS, pressButton, 10); // element is inserted
Every time the element is inserted I add the following html
<span class="press-button">Test peter</span>
Now, every time in the editor, the content editor mouse overs the custom button it is higlighted in the RTE))

Similar Messages

  • Hiding the rich text editor toolbar

    Hey all,
    I have an ADF page that contains a few rich text editors and it looks a little busy with all the toolbars. What I'd like to do is hide the toolbars when the rich text editor does not have focus. I couldn't find anything in jdev's property inspector that would help. How can this be done, if at all?
    I'm using JDeveloper 11.1.1.7.0.
    Thanks,
    Bill

    The toolboxLayout attribute may be used to remove some of the toolbar  buttons.
    Refer
    &amp;lt;af:richTextEditor&amp;gt;

  • Make changes to the rich text-editor toolbar

    I need to add and remove some functionality of the rich text-editor toolbar. Based on the documentation: "Oracle Portal 10g release 2 - enhanced rich text editor", I can modified the Rich Text Editor (RTE) by modifying a file located in http://<host>:<port>/images/buildUIembed.html. To remove or rearrange a button within the RTE toolbar, I need to modify the drawEditor() function. I was able to do this; however, now I need to add one functionality: add the header format. I want to add the functionality of having "h1", "h2", and "h3" in some type of combo box. I know how to remove, but I am not sure how to go ahead and add this functionality. Any help will be greatly appreciated.
    Thanks,
    Marcelo

    I need exactly this feature too...
    Have you find some information?
    I plan to change to other rich editors (as TinyMCE) but I have no documentation about how to do it...
    :-(

  • How to customize the Rich Text Editor task flow in the doc lib?

    Dear Experts in WCP forum,
    You know that webcenter portal has a feature is called customizing task flow.. so we have client request to customize the Rich Text Editor task flow of the Document library. Such as disable the Format, Font, Size drop down menu of the richtext editor UI.   But after I open the editHTML.jsff of the oracle.webcenter.doclib. the code is like this:
                        <f:facet name="richtext">
                               <af:panelGroupLayout layout="scroll" id="rtepng2">
                                  <rte:editor id="rte" value="#{pageFlowScope.rte.HTMLTextArea}" converter="#{pageFlowScope.rte.HTMLConverter}"/>
                                  <!-- keep region wrapped in the facet to be stretched-->
                                  <af:region value="#{bindings.linksResourcePicker.regionModel}" id="lpr"/>
                               </af:panelGroupLayout>
                            </f:facet>
    So likes that editor in fact is from <rte:editor tag.. my question is how to dig into this <rte:editor  to find its jsff code?  And change the menu inside to do the cusomization for them?
    Is that possible?
    A million thanks here in advance!
    wayne

    Based on the Tag TLD reference the editor tag has the following attributes:
    <tag>
        <description>An ADF Wrapper to use the CKeditor&gt;</description>
        <name>editor</name>
        <tag-class>oracle.webcenter.doclib.rte.internal.taglib.RteEditorTag</tag-class>
        <body-content>JSP</body-content>
        <attribute>
          <description>&lt;html&gt;the identifier for the component.  The identifier
    must follow a subset of the syntax allowed in HTML:
    &lt;ul&gt;
    &lt;li&gt;Must not be a zero-length String.&lt;/li&gt;
    &lt;li&gt;First character must be an ASCII letter (A-Za-z) or an underscore ('_').&lt;/li&gt;
    &lt;li&gt;Subsequent characters must be an ASCII letter or digit (A-Za-z0-9), an underscore ('_'), or a dash ('-').&lt;/li&gt;
    &lt;/ul&gt;&lt;/html&gt;</description>
          <name>id</name>
          <rtexprvalue>false</rtexprvalue>
        </attribute>
        <attribute>
          <description>The initial value of this component.</description>
          <name>value</name>
          <required>false</required>
          <rtexprvalue>false</rtexprvalue>
          <deferred-value>
            <type>java.lang.String</type>
          </deferred-value>
        </attribute>
        <attribute>
          <description>a converter object</description>
          <name>converter</name>
          <deferred-value>
            <type>javax.faces.convert.Converter</type>
          </deferred-value>
        </attribute>
        <attribute>
          <description>
            this is a pass through to get/set the CKEditor ToolbarSet property
          </description>
          <name>toolbarSet</name>
          <required>false</required>
          <rtexprvalue>false</rtexprvalue>
          <deferred-value>
            <type>java.lang.String</type>
          </deferred-value>
        </attribute>
        <attribute>
          <description>
            this is a pass through to get/set the CKEditor height property
          </description>
          <name>height</name>
          <required>false</required>
          <rtexprvalue>false</rtexprvalue>
          <deferred-value>
            <type>java.lang.String</type>
          </deferred-value>
        </attribute>
        <attribute>
          <description>
            this is a pass through to get/set the CKEditor width property
          </description>
          <name>width</name>
          <required>false</required>
          <rtexprvalue>false</rtexprvalue>
          <deferred-value>
            <type>java.lang.String</type>
          </deferred-value>
        </attribute>
      </tag>
    Which means that if you want to change the toolbar you have to check what is the type of toolbars the CKEditor uses, I can tell you that there are two defaults: Basic and Full and I believe the tag uses a custom toolbar called WC by default.
    So if you want to change the toolbar to only show basic, change the toolbarSet property to Basic to make the final result looks like <rte:editor id="rte" value="#{pageFlowScope.rte.HTMLTextArea}" converter="#{pageFlowScope.rte.HTMLConverter}" toolbarSet="Basic" />
    This is not tested, this is only a few insights I got reading about CKEditor

  • Display instantly the length of the text entered in the rich text editor

    Hi everybody,
    I'm developing an apex application with apex 4.1.1 and Oracle 11.2.
    I have a page in which I have a form that allows to create a new message on the database.
    A message has a title, description, text and date.
    For the text I use the item "rich editor text". The problem is that item doesn't show the length of characters entered (character counter for the textarea). In the database the corresponding column is varchar2(2000). What I do is a validation after submit that checks if the limit 2000 was exceeded or not.
    But what I want to do more is to display instantly the length of the text entered in the editor. I have tried to do that through a dynamic action. But the event "onChange" for the item "rich text editor" didn't work.
    Has anyone any idea about that issue?
    Thanks for helping.
    Kind regards,
    Edited by: Khadija Khalfallah on Apr 25, 2013 4:06 AM

    sorry about that, I missed that tidbit in your OP... well I think there is a good reason why there isn't a count character option -- due to the hidden "html" characters responsible for the "richness" (bold/color, etc) applied to the text would be difficult to count true characters.. if I was bent on doing this, I'd continue using the item you are using, but have a HIDDEN text area that is updated via javascript onkeyup for each keystroke (again, keeping in mind you'd have to filter certain keys) and then that intelligence could be used. I would probably dig through the javascript responsible for the rich text editor (is it still fckeditor??) -- there might already be code in there that isn't clearly visible to you that does this already.. alas, I see now the validity of your challenge.

  • SharePoint 2003 : Cannot open the Rich Text Editor in Content Editor Web Part

    Error message when you use the Rich Text Editor in a SharePoint Portal Server 2003 Service Pack 3 Content Editor Web Part: "Cannot open the Rich Text Editor"
    Mohamed Gamal Orief Senior Software Engineer ITWORX EGYPT Phone: +202.2673.6377 Mobile:+2010.0552.7971 www.itworx.com

    Hi Mohamed,
    Please check if your issue is the same as the following article cannot use Rich Text Editor in a CEWP on a Vista client, if yes, you can install the kb 941204 hotfix for your SharePoint 2003, then check result again.
    http://support.microsoft.com/kb/949604
    http://support.microsoft.com/kb/941204 (Description of the SharePoint Portal
    Server 2003 post-Service Pack 3 hotfix package: February 26, 2008)
    Thanks,
    Daniel Yang
    Forum Support
    If you have feedback for TechNet Subscriber Support, contact [email protected] 
    Daniel Yang
    TechNet Community Support

  • Is Content stored in the Rich Text Editor saved to the Database?

    Is Content stored in the Rich Text Editor saved to the Database? We are planning a migration from our Dev environment to our QA/Staging environment and would like to migrate our existing content. We were told that content stored in the Rich Text Editor is stored somewhere in the Plumtree database. Is this true? If so, where in the DB (table/field) is it stored?

    Some of the content from Publisher is stored in the file system.
    Look under: plumtree\ptcs\publishedcontent
    there you'll find your preview and published content.

  • Broken links because of the Rich Text Editor

    Hi.
    We are actually using the item type "text" to insert sorts of HTML code into our pages, specially when we need to create tables. Since we are using Internet Explorer we have enabled the rich text editor to use in item types text; it has a check box that allows the user to view the text in HTML format, so that is the way we build tables and also "href" links to other pages inside our site.
    The problem is this: when I write the path for the HREF links I don't specify the COMPLETE path (that is, without the server name and the portnumber), but when I open the item for edit, the Rich Text Editor seems to be including the server name and the port number in my href path, even when I didn't specify it when creating it.
    I need help with this, please. We are using this server for trial purposes, but what would happen when we move the entire site to another server? I guess Portal won't resolve the URLs, but we will have too many broken lists.
    Thank you all.

    hi guillermo,
    with the release of the 9.0.4.1 patchset we now support a new enhanced rich text editor that has very good table support as well as support for relative URLs.
    for detailed information please have a look at the following technote that we published recently on OTN:
    http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/OTN_CONTENT/MAINPAGE/PUBLISH_CONTMGMT/RICH_TEXT_EDITOR_TECH_NOTE.PDF
    this new rich text editor should adress your requirements.
    regards,
    christian

  • Editing the properties of the Rich text editor in WebCenter Portal

    I have a requirement to modify the properties and also to all a new plugin to the CKeditor (Or the Rich Text Editor) that we have in Webcenter. The rte-taglib.jar has the config.js where the change is required. How can this fiel and use the modified setting as per my reqirement.

    This is a known issue in both Portal 10.1.4.x and Portal 11.x :
    Bug 8708210 (11) NOT ABLE TO RENDER RICH TEXT EDITOR WITH FIREFOX 3.5 BROWSER
    This bug is not published on Metalink.
    There is no solution yet. Consider to use IE Tab (https://addons.mozilla.org/en-US/firefox/addon/1419) for editing file items until this bug is solved.

  • How to insert a picture into the Rich Text Editor

    hi,all
    I want to make a Press Releases page,that means I have to use the the Rich Text Editor.In this item,I dont know how to quote a picture into this field.though i know there is a picture icon in this field,and when i press it,it can pup up a window.That is the Image Properties Window,under this window,there is a URL text field.But I dont know what to fill in this field,I mean,I dont know what the URL link is .can you just give me a picture URL sample ?
    is it like "#APP_IMAGES#136_1_1.jpg" or something else ?
    hope to hear from you.thanks ...
    best regards
    hlee
    Edited by: hlee on 2011-3-30 下午8:04

    Hi,
    There is three types of images reference in oracle apex.
    1 Standard image -> url reference is -----> #IMAGE_PREFIX#menu/books_64.gif
    2 Workspace images -> url reference is ------> #WORKSPACE_IMAGES#java-icon.jpg
    3 Application images -> url reference is ------> #APP_IMAGES#JqueryIcon.jpg
    hope this helps you
    Thanks,
    Jaydip Bosamiya
    +91 - 76000 23053
    [http://jbosamiya.blogpost.com|http://jbosamiya.blogpost.com]

  • I use Juno for my email. How do I turn on the Rich Text Editor and how do I forward messages inline rather than having everything go as an attachment?

    Using Juno I find no way to turn on the Rich Text Editor. How do I turn it on?
    When I forward a message in Juno, everything goes as an attachment. How do I get messages to go inline?

    Another thing to remember is the phone is actually usable for 911 calls and maybe others. Not a real good idea. Especially for a child.
    It would depend however on the age of the child.
    Good Luck

  • Replacing the Rich Text Editor with FCKeditor

    Hi,
    I've seen a few people mention that they've replaced Portals RTE with FCKeditor in the Portal 10.1.2 release. As ever Oracles documentation is scant (that's being generous) as to how to do this. If anyone has, can you give me an example of how you have modified your buildUIembed.html file.
    I've currently got this partially working, the new RTE is displaying, but the page won't submit. Portals JS is trying to .save() the RTE content, a method which it apparently doesn't support!
    Any help would be much appreciated.
    Regards
    Dan

    Hi Dan,
    Per the OracleAS Portal User's Guide (available at http://www.oracle.com/technology/documentation/appserver1012.html)
    Possibility of extending or replacing the seeded rich text editor
    You can customize the OracleAS Portal rich text editor to support your needs: from simple changes, for example, replacement of buttons on the editor's toolbar, to more complex changes, for example, replacement of the seeded editor with one of your own.
    Such changes involve altering the files that comprise the user interface and functions of the seeded rich text editor. This being the case, this feature is intended for advanced OracleAS Portal administrators. Additionally, you should be aware that future upgrades of OracleAS Portal may impact any modifications made to these files. Support for this feature is offered through the Portal Content Area discussion forum and not through Oracle Support;
    You may want to pose this question in that forum.
    Regards,
    Pete

  • Configuration of the rich text editor not working as expected, can you help?

    Hi,
    I'm having a great deal of trouble customising the available features of teh rich text editor to the point where I believe there is either a bug, or the documentation is incorrect.
    I have  defined 3 plugins; edit, format and lists.
    I can configure edit to enable or disable features, but format and lists cannot be configured and always display as default no matter what I configure.
    Here is the configuration:
    <jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
        jcr:primaryType="cq:Dialog"
        xtype="dialog">
        <items jcr:primaryType="cq:WidgetCollection">
            <text
                jcr:primaryType="cq:Widget"
                fieldLabel="Text"
                hideLabel="{Boolean}false"
                name="./text"
                xtype="richtext">
                <rtePlugins jcr:primaryType="nt:unstructured">
                    <edit
                        jcr:primaryType="nt:unstructured"
                        features="[cut,copy]"/>
                    <format
                        jcr:primaryType="nt:unstructured"
                        features="[bold]"/>
                    <lists
                        jcr:primaryType="nt:unstructured"
                        features="[ordered,unordered]"/>
                </rtePlugins>
                <htmlRules jcr:primaryType="nt:unstructured">
                    <links
                        jcr:primaryType="nt:unstructured"
                        ensureInternalLinkExt="{Boolean}false"
                        protocols="[http://,https://,mailto:,javascript:]"/>
                </htmlRules>
            </text>
        </items>
    </jcr:root>
    As you can see I specify only bold for format, and ordered and unordered for lists, but all features are still present (edit however is configured as expected).
    Hopefully someone can point out a schoolboy error that I have made, or agree this is a bug.
    Thanks in advance
    Chris

    Nope, upgrade to 5.6.1 makes no difference.
    @Jr. Jason - What version of CQ5 are you running where you are seeing the above configured correctly?
    Also I've found that I can't enable the image plugin.
    I'll raise a support call.

  • How do I apply a style to the rich text editor in 10.1.2

    I am trying to add text items to a portlet. How do I maintain the style for item text?

    that implies to constrain the styles in the RTE (instead proposing too much choices : font, size etc..)
    A method:
    customize the RTE by reducing the styles to a choice between standard HTML styles (header 1, header 2, body text, paragraph,..).
    Then map these styles to the css styles propsed by Portal.
    As a sample, get all the css from your portal by typing:
    http://<you.machine>/pls/portal/PORTAL.wwv_setting.render_css?p_lang_type=NOBIDI&p_subscriberid=1&p_styleid=12&p_siteid=0&p_rctx=P
    for RTE customizing: http://www.oracle.com/technology/products/ias/portal/pdf/cm_rte_10gr2_features.pdf
    Patrick.

  • Using rich text editor (RTE) for custom applications

    Our users enter texts on two places:
    1) In Oracle Portal in text-items using the Rich Text Editor.
    2) In text-fields in a custom application using html-tags <textarea>blabla</textarea>. For formatting the users currently have to type in html-tags themselves. Now we want to provide them an html-editor.
    We would prefer to use the Rich Text Editor also for the custom application. However, that is integrated in Portal and the java-scripts are not easy to follow.
    Have you tried something similar? So, did you use the Rich Text Editor for your own application? If yes, how?
    If not, a very good alternative would be the qwebeditor (see http://www.qwebeditor.com). Did anybody replace the standard Portal rich text editor with the qwebeditor? In the Portal guides there are instructions about replacing the Portal rich text editor by another editor, but it is not clear if this will also work with the qwebeditor.
    Thanks for your respons !
    Best regards, Jan Willem Vermeer

    Hi Jan,
    I have configured FCKeditor in a few clients, and the process it's pretty straight forward, you can use the steps in the document (http://www.oracle.com/technology/products/ias/portal/pdf/cm_rte_1014_features.pdf) .
    Basically you download FCKeditor and put it in your apache server (you can put it unde rthe htdocs folder) after that, all you need to do is modify $ORACLE_HOME/portal/images/webword/buildUIHTML.html to reference the FCKeditor JS and CSS, and you can do the same type of reference for your custom apps.
    Regards,
    Juan

Maybe you are looking for

  • Problem in Printing HTML page

    While I am trying to print a HTML page using window.print(), the bgcolor of the table is not printing.

  • How to validate customer number in FD32 initial screen

    I need to validate customer number in FD32 initial screen. It should allow only Payers but not sold to

  • Status of an action PPF

    Hi, I used an action definition and it is called successfully when I save a document. But the status of this action is generated in error (red icon) although rp_status = 0 in my implementation. I want to make this action as unprocessed (Yellow icon).

  • Photoshop CC 3D: Using Objects As Cutters?

    Is there a function in Photoshop CC 3D that allows you to take say a cube and a cylinder, line them up, and then have the cylinder cut a "tunnel" through the cube? I've been unable to find this information anywhere. This would be similar to the pathf

  • Partial page print

    only partial page is printing and only in green. have cleaned and downloaded latest driver.