[Petal] <![CDATA[ ... ]]> and HTML Elements

Chris Croome chris at webarchitects.co.uk
Tue Nov 9 11:20:39 GMT 2004


Hi

On Tue 09-Nov-2004 at 11:12:47AM +0000, Fergal Daly wrote:
> 
> What are these scripts that can't be put in a .js file anyway?

In MKDoc 1.8 there is a javascript WYSIWYG editor and it's
referenced like this:

    <!-- This loads the WYSIWYG editor for the HTML Component -->
    <script 
      type="text/javascript" 
      src="/.resources/xeditor.js"
    ></script>
    <script 
      type="text/javascript" 
      petal:condition="true: self; 
                       true: self/components --html"
    >
      // call this at body.onload:
      function init() {
        use_lang ('${self/language}');
        <?for name="element self/components --html"?>
        make_wysiwyg ('${element/block_name}');
        <?end?>
      }
    </script>

This works fine, it's a combination of an external file and also
some petal generated js that can't go in an external fail (as far as
I can see...).

As I said that works fine and isn't a problem... (though it's a bit
ugly...). 

Chris

-- 
Chris Croome                               <chris at webarchitects.co.uk>
web design                             http://www.webarchitects.co.uk/ 
web content management                               http://mkdoc.com/   


More information about the Petal mailing list