I am working my best to set up FCKEditor to work properly with my CMS, and my smary variables look like this:
<!--{smarty content}-->
I used the comment style to work with other wysiwyg editors, and when I have a smarty tag that looks like <!--{if $myvariable == "this"}-->
the "s around the info is always messed up, and I think the tags are converted to < & >
I have the editor working flawlessly in a situation where the content on a page has no smarty variables, and I use a <!--BEGIN--> <!--END--> type comment to add in smarty code after a template has been edited in the wysiwyg... I'd just think there'd be an easier way than me creating a class that could strip out smarty tags, and reinsert them in place after an edit...
THere has to be a simpler way.... any smarty users around here???
<!--{smarty content}-->
I used the comment style to work with other wysiwyg editors, and when I have a smarty tag that looks like <!--{if $myvariable == "this"}-->
the "s around the info is always messed up, and I think the tags are converted to < & >
I have the editor working flawlessly in a situation where the content on a page has no smarty variables, and I use a <!--BEGIN--> <!--END--> type comment to add in smarty code after a template has been edited in the wysiwyg... I'd just think there'd be an easier way than me creating a class that could strip out smarty tags, and reinsert them in place after an edit...
THere has to be a simpler way.... any smarty users around here???
RE: smarty variables in FCKEditor
Only an bad idea, that I've tested, that solves the problem but causes an other one:
Write a php function that filters the output before saving it:
$value = str_replace(""", '"', $value);
Of course here will be replaced any quote in the whole html content. So our code is no longer XHTML conform. Also there are other problems e.g. with Javascript-Code that uses an " (myvar = "here come the problem: " ";)
I hope anyone has a good workaround idea for this problem.
RE: smarty variables in FCKEditor
I was testing devedit for a while, which only works in IE, and is around 300$, so it didn't quite work for my purpose, but it had a feature built in near the color coded source code that was a regular expression that would ignore anything between custom tags you defined in the expression... it worked perfectly for my smarty vars, but the overall application wouldn't suffice for what I wanted.
I would think that there would have to be a way to do the same with FCKeditor... just a regular expression to skip ANY section that starts with my smarty tags. <--{ and }--->