SnippetMaster Support Forums
Return to main website
 
September 19, 2009, 06:59:11 AM
* Show unread posts since last visit.
* Show new replies to your posts.
Welcome, Guest. Please login or register.
Did you miss your activation email?
September 19, 2009, 06:59:11 AM

Login with username, password and session length
Search:  
Advanced search
* Home Help Search Login Register
SnippetMaster Support Forums  |  General  |  General Discussion & Support  |  Topic: WYSIWYG Editor Content Disappears « previous next »
Pages: [1] Print
Author Topic: WYSIWYG Editor Content Disappears  (Read 1700 times)
oregondude

Posts: 5


[-] WYSIWYG Editor Content Disappears
« on: October 22, 2007, 09:47:50 PM »

Hello, I'm new to Snippetmaster and this forum. I have installed the PRO version. When I open PHP pages that have a form with a submit button, the page content (everything including pixs, text, links, and login boxes) shows for a few seconds, and then the entire content disappears. The WYSIWYG editor remains, but the content is gone. Any ideas what I've done to cause this? Thanks.
Report to moderator   Logged
Jenkinhill
Beta Tester

Posts: 389



[-] Re: WYSIWYG Editor Content Disappears
« Reply #1 on: October 23, 2007, 12:36:57 AM »

The tinyMCE editor used by SnippetMaster runs in a form textbox, so is not able to edit a snippet containing a textbox. It is possible to edit snippets containing all form elements except a textbox if you enter some valid elements in admin/config.

See http://www.snippetmaster.com/forums/index.php/topic,1032.msg4841.html#msg4841
Report to moderator   Logged

Kelvyn
oregondude

Posts: 5


[-] Re: WYSIWYG Editor Content Disappears
« Reply #2 on: October 23, 2007, 04:32:14 AM »

Thanks for the info and possible solution. When I did as directed in the forum post you referred me to, I still get the problem. I've attached the PHP code with my Snippetmaster begin/edit codes for review. Hope someone can tell me why the content appears for a few seconds and then disappears. I thought that putting the snippet codes around a paragraph of text would cause the editor to only focus on and show that code, and not the whole page. I still see the whole page and then it disappears. Apparently, the editor is frozen at this point because I cannot switch back and forth from the text edit and WYSIWYG modes. By the way, the file I've attached is the "content" file for the home page. There are header and footer files for each page that 'wrap" the content page.

* home_page.txt (12.41 KB - downloaded 56 times.)
Report to moderator   Logged
oregondude

Posts: 5


[-] Re: WYSIWYG Editor Content Disappears
« Reply #3 on: October 23, 2007, 04:59:17 AM »

I found that if I use the limited XML, the content remains in the WYSIWYG editor. However, the submit button for my form has the PHP code for the value, rather than "submit" I'll search the forums to see if I can find how to fix this. Haven't tried to save the page yet to see if it screws up the public view. And, I still see the entire page although I only put the snippet tags around one paragraph on the page.
« Last Edit: October 23, 2007, 05:01:07 AM by oregondude » Report to moderator   Logged
oregondude

Posts: 5


[-] Re: WYSIWYG Editor Content Disappears
« Reply #4 on: October 23, 2007, 05:11:28 AM »

Sorry to go on and on...but, I found that after the first edit try and save, when I open the page again for editing...only the content with the snippet tags shows. That's what I wanted...so, I guess I'll have to go through this initial step each time.
Report to moderator   Logged
Jenkinhill
Beta Tester

Posts: 389



[-] Re: WYSIWYG Editor Content Disappears
« Reply #5 on: October 23, 2007, 05:48:11 AM »

Were you opening the whole file instaed of the snippet? That is a common error with new users. The best way to test the editing function is to log in as a Power user, so you are not presented with the option of editing the whole file.

In the text example you provided there is a problem with the placement of the snippet tags. If you place the start tag before a <p> tag then the end snippet tag should be immediately after a </p> tag. Howevere you code seems to be missing some paragraph closing tags to start with - and the code is not vaild XHTML. It is advisable to make sure that the code within an editable snippet is valid before starting to edit, as sometimes the editor will try to make sense of and correct errors, but get it wrong.....
Report to moderator   Logged

Kelvyn
oregondude

Posts: 5


[-] Re: WYSIWYG Editor Content Disappears
« Reply #6 on: October 23, 2007, 06:19:16 AM »

Thank you for your feedback. I ran the page through http://www.validome.org/validate. It was looking for XHTML that is contained in the separate header.php file that my index-home.php file calls through "include" statements. Does this mean that I will not be able to use Snippetmaster because my pages are divided into three files: header.php, index.php and footer.php? The index.php main part of the page does not have the encode statements, etc. that cause the page to fail validation. Every page on my site has this 3-separate file format. I really like Snippetmaster and hope the fact that I need to edit the index.php file (with none of the XHTML that is expected) but is contained in a separate header.php file will not keep me from using Snippetmaster. However, at this point...it seems from what you say and from the validation results, Snippetmaster will not work on my PHP conent pages, which is a bummer. Am I correct?
Report to moderator   Logged
Jenkinhill
Beta Tester

Posts: 389



[-] Re: WYSIWYG Editor Content Disappears
« Reply #7 on: October 23, 2007, 07:18:37 AM »

You certainly can use SnippetMaster, but only to edit snippets containing XHTML code (no JavaScript or PHP) if you are using WYSIWYG. The only problem with editing a file without a head element is that the editor cannot pick up and use the style sheet for the page, so the area being edited may not appear as it does on the full page.

It may be possible to edit sections containing JS&PHP (not something I have ever needed to do!) if you stick strictly to code view for editing - you can force this in the snippet tags. See the attributes list.

For validation surely you can check the full page (ie on the server) at http://validator.w3.org/
Report to moderator   Logged

Kelvyn
Pages: [1] Print 
SnippetMaster Support Forums  |  General  |  General Discussion & Support  |  Topic: WYSIWYG Editor Content Disappears « previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!