Hello,
I am trying to use the protected source config option to make all form elements non-editable.
In my initial tests, I am not able to pass the regex via the inline config, thats the first problem. If I add the the regex in a custom config file, it seems to be recognized but all the form elements and form and then no longer visisble in the wysiwyg mode and are still editable in source mode:
My test regex added to the config file is:
I am trying to use the protected source config option to make all form elements non-editable.
In my initial tests, I am not able to pass the regex via the inline config, thats the first problem. If I add the the regex in a custom config file, it seems to be recognized but all the form elements and form and then no longer visisble in the wysiwyg mode and are still editable in source mode:
My test regex added to the config file is:
config.protectedSource.push( /<form[\s\S.]*?[>]|<input[.\s\S]*?[>]/g );
Re: Protected Source Config not working
Re: Protected Source Config not working
FYI, protectedSource will not display any code within the specified tags/characters in the WYSIWYG window - you will only see it in Source view.
Re: Protected Source Config not working
Thank you. I think that was my mistake was that I thought the elements would still be displayed in the WYSIWYG mode, but not be editable. That would be ideal behavior since it would support a template style layout where the template background or header image could not be edited but could still be viewed. Or in my case I want form fields un-editable (but displayed).
I got the form element regex working but unfortunately, now they are not displayed either... which will not work for my project....