Forum closed. New forum available at http://community.wymeditor.org/

Protecting (or hiding) text to prevent user editing?

Support forum for WYMeditor.

Protecting (or hiding) text to prevent user editing?

Postby moonlightinred on Thu Feb 10, 2011 1:12 pm

Is it possible to exclude, protect, or hide text from WYMeditor so that a user cannot edit it? For example, when I'm pulling information for the user to edit using the editor, there may be some PHP scripts on the page that I don't want to the user to be able to change. I could wrap all PHP in its own div or something when it's pulled into the editor, but how would I get WYMeditor to "lock" that text (or hide from the user's view) so that they can't make any changes to it? Is this possible?
moonlightinred
 
Posts: 4
Joined: Mon Nov 30, 2009 3:29 pm

Re: Protecting (or hiding) text to prevent user editing?

Postby moonlightinred on Thu Feb 10, 2011 4:47 pm

Okay, so I now realize that WYMeditor won't show anything that's hidden using HTML comments. I'm able to use str_replace to encapsulate all PHP and JavaScript tags in HTML comments, but WYMeditor is stripping them out upon submit. Why is this? I know they're being correctly encapsulated and being passed into the WYMeditor window, but when I update it by clicking the submission button, ALL commented-out text (including the HTML commenting text itself) is completely removed. Any way to change that behavior?
moonlightinred
 
Posts: 4
Joined: Mon Nov 30, 2009 3:29 pm


Return to Support

Who is online

Users browsing this forum: No registered users and 5 guests

cron