You are not logged in.
Pages: 1
Hi,
This must be a FAQ but I can't find any answer for it.
I want to edit html files that have scripting tags in them. The tags I use are <% and %> I have an escape function in my serverside mod_perl code that converts all < and > to < and > when they are in html tags but it preserves my <% %> tags, I use this to generate the contents for the textarea to be edited.
When editing the above with Xinha all remaining < > characters are translated and thus the source HTML view does not display my code tags correctly.
Is there a solution to this or should I hack the Xinha .js code?
Regards,
Martin
Offline
Xinha is an HTML editor, not a php, or asp, or jsp or whatever editor.
There is currently no built in way to do this, all HTML edited by xinha must be well formed valid html.
For example, this is not...
<table>
<? ... ?>
<tr>
</tr>
<? ... ?>
</table>
for two reasons, firstly <? ... ?> isn't valid HTML (the browser *might* let you away with it because <? is a processing instruction in XML, but I doubt it), and secondly because you can only put thead, tbody, tfoot and tr inside a table tag.
There has been talk in the past about making something like the dreamweaver "shielded" code, but it's not clear how that would work with keeping the HTML code valid for Xinha.
James Sleeman
Offline
There is no way to do this with XML, but there is with PHP. See http://xinha.python-hosting.com/ticket/4
Offline
We came across this last year when we were building our CMS. We ended up parsing out the php before it hit the editor, and putting it back in when the user hit submit. Place holders were put in place so the user knew where the PHP was. We use <span>'s for placeholders and style them with a background-image/border with CSS.
Offline
Pages: 1