-
1. Re: Facing problem in Rich text component
MatheusOliveira Jun 11, 2012 9:08 AM (in response to Lakshminarayana reddy sathi)Sorry, can't get your problem. Can you show us an exemple or be more specific?
Regards.
-
2. Re: Facing problem in Rich text component
Lakshminarayana reddy sathi Jun 11, 2012 9:52 PM (in response to MatheusOliveira)I am using rich text editor in my site to authoring content with rich features. When i edited the content using this editor and assign 'id' attribute to the <div> tag, after clicking Ok button of the editor, id attribute of the div tag is stripped.
Example:
i have given the text as shown below using rich text editor and clicked on Ok button.
<div id="ref_1"> reference text <div>
Again i opened the same text in rich text editor, now its looking like this
<div> reference text <div>
Please let me know if you need any other information.
I am looking to implement the following feature in my site.
Assigning a superscript at the end of the sentence which has a reference link to other content in the same page. when the user clicks on the superscript link, the page is adjusted to show that reference link. To implement this feature, i need to assign a id attribute to the div tag.
-
3. Re: Facing problem in Rich text component
CQQuest Jun 12, 2012 6:14 AM (in response to Lakshminarayana reddy sathi)Set component to use misctools -> sourceedit, then enable it.
Click on the source edit button to edit html, This should work without stripping div id.
http://dev.day.com/docs/en/cq/current/wcm/using_rich_text_editor.html#Source%20Editing%20M ode
-
4. Re: Facing problem in Rich text component
Lakshminarayana reddy sathi Jun 12, 2012 11:54 PM (in response to CQQuest)I had set the feature(misctools-> sourceedit) as suggested but the problem still persists.
-
5. Re: Facing problem in Rich text component
CQQuest Jun 13, 2012 5:30 AM (in response to Lakshminarayana reddy sathi)Have you tried second step, going into HTML Source Edit button and then adding HTML?
http://dev.day.com/docs/en/cq/current/wcm/using_rich_text_editor.html# Source%20Editing%20Mode
-
6. Re: Facing problem in Rich text component
Lakshminarayana reddy sathi Jun 13, 2012 6:41 AM (in response to CQQuest)Yes, i followed that step
I have clicked on the HTML source edit button and edit the source as in below
<div id="ref_1"> Reference </div> and Clicked on Ok button of the editor.
Again i opened the text in editor and clicked on HTML source edit button to see
whether my changes are reflected. The div tag is being displayed as in below without id attribute
<div> Reference </div>
-
7. Re: Facing problem in Rich text component
Sham HC Jun 15, 2012 9:47 PM (in response to Lakshminarayana reddy sathi)Setting property idAttribMode (on htmlRules -> serializer -> config) to "keep" should prevent removing the id attributes, but note that this might cause other problem. What is your use case?
-
8. Re: Facing problem in Rich text component
Lakshminarayana reddy sathi Jun 17, 2012 10:14 PM (in response to Sham HC)Hi Sham,
The solution which you given is working. id attributes are retaining after editing. You mentioned that it might cause other problem. Could you please mention the problems?
-
9. Re: Facing problem in Rich text component
Sham HC Jun 19, 2012 4:37 PM (in response to Lakshminarayana reddy sathi)In theory if I recall correctly, By design EXT (javascript framework) reserves id & gets generated automatically on the fly.
If the id matches with the one you supplied the ui may clutter. Test the component throughly.
-
10. Re: Facing problem in Rich text component
Wile-the-Coyote Aug 27, 2012 6:56 AM (in response to Sham HC)Hi Sham,
Can you specify how to :
Setting property idAttribMode (on htmlRules -> serializer -> config) to "keep" should prevent removing the id attributes?
under my text component
1). /my_text/dialog/items/text/, I create a node "htmlRules" , value = nt:unstructured (I also have another node called "rtePlugins")
2). do I need to create another node under "htmlRules" called "serializer"? then another node called "config" under "serializer"?
3). where and how I can set the value = "keep" for "config".
Thanks for your help.
-
11. Re: Facing problem in Rich text component
Sham HC Aug 27, 2012 6:11 PM (in response to Wile-the-Coyote)Steps:
1) Under /apps/<yourApplication>/my_text/dialog/items create htmlRules/serializer/config nodes of type nt:unstructured. So, will end up with /apps/<yourApplication>/my_text/dialog/items/htmlRules/serializer/config.
2) Under "config" node create idAttribMode property and set it to "keep".
It will be like
<htmlRules jcr:primaryType="nt:unstructured">
.
.
.
<serializer jcr:primaryType="nt:unstructured">
<config
jcr:primaryType="nt:unstructured"
idAttribMode="keep"/>
</serializer>
.
.
.</htmlRules>
-
12. Re: Facing problem in Rich text component
Wile-the-Coyote Aug 28, 2012 6:43 AM (in response to Sham HC)thanks for the details. It works!
I have another related question.
I used to able put the
<link href="design.css" rel="stylesheet" type="text/css" />
in the rich text editor in CQ5.3 (I know it is probably not the right way to do it but we have a lot ad-hoc pages come and go, so we cannot integrate the CSS stylesheets into our main page templates).
Now, given the CQ5.5 rich text editor can keep the CSS ids, but it removes the html <link> tag, as well as the <script> tag too.
Is there a way to configure the rich text editor to retain these tags?
If not, what will be the best alternative to handle it (beside keep modifying the head section in the page component with extra css and javascript files). It means what is the best practice to embed ad-hoc css file and javascript file in the page?
-
13. Re: Facing problem in Rich text component
Sham HC Aug 28, 2012 6:26 PM (in response to Wile-the-Coyote)will not be supporting use of the script, style, meta, and link tags in the product officially. This is due to the fact that it is not valid html to allow them in the document body.
-
14. Re: Facing problem in Rich text component
rosettakrb Sep 21, 2012 11:04 AM (in response to Wile-the-Coyote)I am facing the same problem in 5.5, in that, it is still stripping the ids from the RTE editor. I tried the solution above, in 5.5, and it didn't make a difference i.e. the ids are still being stripped.
-
15. Re: Facing problem in Rich text component
DreamShallNeverDie Jan 2, 2013 7:07 PM (in response to rosettakrb)I'm running into the same problem with CQ5.5. Did you get a response from support?
-
16. Re: Facing problem in Rich text component
DreamShallNeverDie Jan 3, 2013 6:26 AM (in response to DreamShallNeverDie)For those who might run into this issue, the htmlRules node needs to be created under the text node (the text node is the cq:Widget primary type with xtype as richtext).
I used this article to find the solution
http://dev.day.com/docs/en/cq/current/administering/configuring_rich_text_editor.html
Notice in the section titled "Styles and Protocols Allowed when Pasting Links", it says create the node under items/text
-
17. Re: Facing problem in Rich text component
cqvoyager May 1, 2013 2:10 PM (in response to DreamShallNeverDie)I am using CQ 5.6 and followed the instructions in the documentation, to create htmlRules node under the text node (the text node is the cq:Widget primary type with xtype as richtext).
But with no luck. Any suggestions would be appreciable.
-
18. Re: Facing problem in Rich text component
Dinu_Arya May 18, 2013 12:04 AM (in response to cqvoyager)Hi Sham,
I'm also facing the same problem with cq5.6. I followed the same approach but it was not worked in 5.6. Is there any other way to persist div ids in rte of cq5.6? Please suggest me the solutions.
Regards,
Arya.
-
19. Re: Facing problem in Rich text component
Dinu_Arya May 18, 2013 12:06 AM (in response to Dinu_Arya)Hi cqvoyager,
Did you find any solution for this? Please suggest me the solution if you got the solution.
Regards,
Arya
-
20. Re: Facing problem in Rich text component
cqvoyager May 19, 2013 10:14 PM (in response to Dinu_Arya)Hello Arya,
I used the htmleditor as I was not able to solve the problem with rich text editor. You can use xtype htmleditor and it is persisting the div ids.
--CQVoyager
-
21. Re: Facing problem in Rich text component
Dinu_Arya May 19, 2013 10:39 PM (in response to cqvoyager)Hi CQVoyager,
Okay. But I have requirement that I have to include images using rich text editor. But in htmleditor widget, we can not drag and drop the images into it. So I used rich text editor. Okay. Thank you for your response. Please let me know if there is any other solution for this problem except that replace rich text editor by htmleditor.
Regards,
Dinu_Arya.
-
22. Re: Facing problem in Rich text component
cqvoyager May 20, 2013 6:22 AM (in response to Dinu_Arya)Hello Arya,
Even I am looking into the solution and not sure about the approach.
Probably raise the seperate new issue in adobe forum, so that some one from Adobe would have a look at it and suggest some thing.
Pls let me know if you get to any solution/approach.
--CQ Voyager.
-
23. Re: Facing problem in Rich text component
slammerkin1 Jun 24, 2013 1:36 PM (in response to cqvoyager)Did anybody get a solution for this in 5.6? I used the htmlRules solution in 5.4 successfully, but in 5.6 it is not working.
-
24. Re: Facing problem in Rich text component
slammerkin1 Jul 24, 2013 10:37 AM (in response to slammerkin1)Arya posted a solution in another thread: http://forums.adobe.com/message/5331423
-
25. Re: Facing problem in Rich text component
Dinu_Arya Jul 25, 2013 6:21 AM (in response to slammerkin1)Here it is . . . . . .
Create a folder structure similar to "/libs/cq/ui/rte/core/HtmlSerializer.js" in apps as "/apps/cq/ui/rte/core/HtmlSerializer.js". Make sure that the folder structure and node types are as same as in libs. Then set "idAttribMode" to "keep" in "_init" function of HtmlSerializer.js. It will work
Thanks,
Arya.



