I am not sure if this is going to be any thing you can controll or not, but I find that whenever I add collapsable text using yr module it works fine (by using the [collapse] and [/collapse] "tags") --- but fact being I use FCKeditor - I save the changes I made to my webpage, and sure enough everything works as planned. BUT once I go back to edit the same page, I find that (what I'm assuming FCKeditor is doing) FCKeditor is adding
and
tags to [collapse] and [/collapse] tags ;;
example: I create the following as per your basic example on the collapse_text project page for yr module ;
[collapse]
<h1>test</h1>
this is some test text
[/collapse]
-save my new webpage (using FCKeditor, since this is how I have my drupal site built)-
-viewing the website everything LOOKS GREAT
-BUT if I EVER choose to edit the same webpage again, FCKeditor (I assume) has added the following (when looking at the source) ;
<p>[collapse]</p>
<h1>test</h1>
this is some test text
<p>[/collapse]</p>
I am wondering if there is a fix for this, because once I save the webpage I notice that my collapible text gets all fubar'd - the text I originally chose to be collapible is no longer collapsible. I know it is because the
and
tags getting put there...
Any suggestions?
Comments
Comment #1
agentdcooper commentedthe next to last line should read ;
Comment #2
agentdcooper commentedthe REASON this is such a pain in the a55, is because I have to go in and remove all those p and /p tags for the collapible text to be collapsible in the proper spots. let me know if u need me to elaborate or anything. I woulda researched FCKeditor's site, but it is down right now! I got a feeling this is going to have to be something that gets done within FCKeditor module config...
love yr module tho' it is VERY elegant!
Comment #3
agentdcooper commentedwell, this is strange... I configured FCKeditor to EXCLUDE it from showing up anytime I edit this page I am using for testing (node/3/edit) - so now the plain-text drupal editor is showing, and this time it is NOT adding the p and /p tags - I made CERTAIN.
get this, I save my config as listed above, using very basic test. once I save it it works... the page comes up and I have my arrow that I can choose to expand or collapse the section I setup for collapsible text.... BUT once I refresh the page, I no longer have the ARROW to collapse the text! so weird... I just see "Use the arrow to expand or collapse this section" with no arrow once I refresh!
Looking at the source for the page, BEFORE and AFTER it doesnt appear to change at all, here it is ;
testUse the arrow to expand or collapse this section
this is some test text
I cannot explain why thats happening. My INPUT FORMAT config is using multiple filters, BUT I put "Collapse text" as -10 weight, for both Full HTML and Filtered HTML... this is just so strange. Any ideas on this? I am running Drupal 6.6, with the collapse_text-6.x-1.0
Any help is much appreciated! Thanks
Comment #4
agentdcooper commentedshooot! that SOURCE didn't come out right, here it what it looks like once I save it and the collapsible text arrow is there, and then once I refresh the page and the arrow is gone ;
this issue has me stumped! Any suggestions are more than welcome!
Comment #5
agentdcooper commentedI disabled ALL filters EXCEPT for collapsible text in my FULL HTML input format -- edit'd everything as I've mentioned all along, with FCKeditor module disabled entirely - saved my webpage. The arrows are there, and I can collapse and expand the areas I marked as collapsible - but as soon as I refresh the page (in Internet Explorer 6 and Firefox 3.0.4) the arrows disappear and I can no longer collapse or expand the areas... I just see the text "Use the arrow to expand or collapse this section"! The text is boxed properly, like it should be collapsible, but there just is no arrow to collapse it. I've tried different PCs and same issue.
Any ideas?
Comment #6
agentdcooper commentedone more update... I do NOT think this is a FCKeditor issue, that is something seperate altogether.
- I disabled ALL modules, expect for the following ;
- all Core - required
- Core - optional
:: Book
:: Color
:: Comment
:: Contact
:: Database logging
:: Forum
:: Help
:: Menu
:: Path
:: PHP filter
:: Profile
:: Search
:: Statistics
:: Tracker
:: Update status
:: Upload
- Input filters = Collapse Text
- Other = Diff
I still get the SAME issue, I save my NEW webapge with the text ;
Once I hit save - the arrows are there, and I can collapse and expand the areas I marked as collapsible! It WORKS
- but as soon as I REFRESH the page, or just open a NEW tab or browser (in Internet Explorer 6 and Firefox 3.0.4) the arrows disappear and I can no longer collapse or expand the areas... I just see the text "Use the arrow to expand or collapse this section"! The text is boxed properly, like it should be collapsible, but there just is no arrow to collapse it. I've tried different PCs and same issue.
Sooo strange. Any Ideas?
Comment #7
Tilt_11 commentedI'm running Drupal 6.6
I was using a modified version of collapsible text 5.x until yesterday when the official 6.x version was published.
I had exacly the same problem as you and thought it was FCK editor (that I'm using as well)
All I did is reinstall this "unsupported version" I found here:
http://drupal.org/node/231529
It's back to normal and works well with FCK editor.
Not an ideal solution, but I guess you could use this until this bug is fixed on the new version.
Comment #8
agentdcooper commentedTilt_11: u da man! that worked perfectly... will be watching for a new release of this module. thanks a million, I _really_ dig this drupal module - props!
Comment #9
agentdcooper commentedone thing of mention... even tho I used the code from http://drupal.org/node/231529 -- whenever I EDIT the page, and save my new edit it still seems that FCKeditor is adding OPEN and CLOSE PARAGRAPH tags before and after the OPEN and CLOSE "COLLAPSE tags", like so ;
<p>[collapse]</p><p>[/collapse]</p>I only see this when EDIT or make a NEW REVISION of any node. I wonder if there is a way to tell FCKeditor NOT to put PARAGRAPH tags around specific text... i.e. [collapse] and [/collapse] "tags".
Comment #10
pukku commentedHi! The problem here is actually a duplicate of #256354: Collapsible text works only ONCE. Regarding the interaction with FCKEditor, I have no good suggestions. I ran across multiple problems with FCKEditor and TinyMCE adding these extra tags to PHP code, Inline, and InlineViews, so I eventually went over to using Markdown.
Comment #11
agentdcooper commentedyep, working great -- ya, my FCKeditor problem remains, I am going to check out Markdown and see what I think, thanks for the recommendation, and the help!
Comment #12
versuvan commentedFound a solution!
Just realized that FCKeditor is formatting the HTML output by default.
Which automatically adds the
<p>or<br/>tags around the fieldset.This is the settings for Drupal 6.
Go to admin/settings/fckeditor/ and edit the Profiles you use.
Disable the option for Format Output under Cleanup and Output.
This would stop the
<p>or<br/>tags (depending on your default Enter mode) from being added to the HTML code.You can also amend the default tags for the enter mode and shift-enter under Cleanup and Output (instead of amending the fckeditor.config.js)
"Apply source formatting" adds linebreaks to make your source code more readable and should have minimal effect on most browsers. (IE 6 is space sensitive)
Hope this saves someone the countless headaches it caused me to find this option.
Comment #13
stefanhapper commentedRe comment #12
This only worked for me when also changing "Enter Mode" to "br" (also under fckeditor settings > cleanup and output)
Comment #14
phpsharma commentedComment 12 and 13 worked perfectly...