My application has a proprietary tag in the format [tag]content[/tag] for which the server processes the content.
Our problem is that although these tags are ignored quite nicely by FF and Opera, IE7 mangles them. When they are first entered, in source mode, and the results saved, all is well. However, if this item is later opened for editing (in IE7 only), the tags disappear as the item is opened.
So I created a (hopefully) protected source tag as follows:
The problem is that in addition to protecting the content, all of the area prior to the [tag] is protected as well - that is not visible or editable in WYSIWYG
Using
protects only [/tag] and nothing else. The [tag]content is visible and editable in WYSIWYG.
On the other hand
suffer from the original problem of proteceing everything that preceeds the tag with non of it visible in WYSIWYG.
I'm not great at regex so if anyone has any additional suggestions I would really appreciate it.
Our problem is that although these tags are ignored quite nicely by FF and Opera, IE7 mangles them. When they are first entered, in source mode, and the results saved, all is well. However, if this item is later opened for editing (in IE7 only), the tags disappear as the item is opened.
So I created a (hopefully) protected source tag as follows:
FCKConfig.ProtectedSource.Add( /[tag[\s\S]*\/tag]/i );
The problem is that in addition to protecting the content, all of the area prior to the [tag] is protected as well - that is not visible or editable in WYSIWYG
Using
FCKConfig.ProtectedSource.Add( /[tag[\s\S]?\/tag]/i ) ; or FCKConfig.ProtectedSource.Add( /[tag[\s\S]\/tag]/i ) ;
protects only [/tag] and nothing else. The [tag]content is visible and editable in WYSIWYG.
On the other hand
FCKConfig.ProtectedSource.Add( /[tag[\s\S]+\/tag]/i ) ; and FCKConfig.ProtectedSource.Add( /[tag[\s\S]+?\/tag]/i ) ;
suffer from the original problem of proteceing everything that preceeds the tag with non of it visible in WYSIWYG.
I'm not great at regex so if anyone has any additional suggestions I would really appreciate it.
Re: Using FCKConfig.ProtectedSource.Add to protect custom ta
I haven't tested that...