Changes To Cookbook
Not logged in

Changes to "Cookbook" between 2009-10-31 17:10:27 and 2009-11-01 10:42:30

551
552
553
554
555
556
557
558

559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578


579
580
581
582
583
584
585
551
552
553
554
555
556
557

558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576


577
578
579
580
581
582
583
584
585







-
+


















-
-
+
+







    mkdir tiny
    mkdir tiny/javascript
    fossil new tinymce.fsl
    fossil ui tinymce.fsl {configure the project)
    download tinymce
    unzip in tiny/javascript
    cd tiny
    fossil open ../tinymce/fsl
    fossil open ../tinymce.fsl
    fossil add javascript
    fossil commit -m "added timymce to the project"
    fossil ui
</pre>
Select admin/headers add after the &lt;/link&gt;
<pre class="verbatim">
   &lt;script type="text/javascript"
     src="/doc/tip/javascript/tinymce/jscripts/tiny_mce/tiny_mce.js"&gt;
   &lt;/script&gt;
</pre>
and save
select admin/footer add above the first line
<pre class="verbatim">
 &lt;script type='text/javascript'&gt;
  var m = document.getElementsByTagName('textarea')
  var l = m.length
  var n
  for(var i=0 ;i &lt; l;i++){
    n = m[i].name
    if( 'header' != n && 'footer' != n && 'css' != n){
    <nowiki>n = m[i].name</nowiki>
    if( 'comment' == n || 'cmappnd' == n || "w"  == n){
        tinyMCE.init({ mode : 'exact' , elements : n, theme: 'advanced'
        ,width : '90%' } );
    }
  }
 &lt;/script&gt;
</pre>

618
619
620
621
622
623
624
625

626
627
628
629
630
631
632
618
619
620
621
622
623
624

625
626
627
628
629
630
631
632







-
+







select admin/footer add above the first line

<pre class="verbatim">
    &lt;script type='text/javascript'&gt;
      var m = document.getElementsByTagName('textarea')
      var l = m.length
      var n
      var mySettings = {
      <nowiki>var mySettings = {
	nameSpace:       "html", // Useful to prevent multi-instances CSS conflict
	onShiftEnter:    {keepDefault:false, replaceWith:'&lt;br /&gt;\n'},
	onCtrlEnter:     {keepDefault:false, openWith:'\n&lt;p&gt;', closeWith:'&lt;/p&gt;\n'},
	onTab:           {keepDefault:false, openWith:'     '},
	markupSet:  [
	    {name:'Heading 1', key:'1', openWith:'&lt;h1(!( class="[![Class]!]")!)&gt;', closeWith:'&lt;/h1&gt;', placeHolder:'Your title here...' },
	    {name:'Heading 2', key:'2', openWith:'&lt;h2(!( class="[![Class]!]")!)&gt;', closeWith:'&lt;/h2&gt;', placeHolder:'Your title here...' },
650
651
652
653
654
655
656
657

658
659
660
661
662
663
664
650
651
652
653
654
655
656

657
658
659
660
661
662
663
664







-
+







	    {name:'Clean', replaceWith:function(h) { return h.selection.replace(/&lt;(.*?)&gt;/g, "") } },
	    {name:'Preview', call:'preview', className:'preview' }
	]
      }
      for(var i=0 ;i < l;i++){
	n = m[i].name
	if( 'comment' == n || 'cmappnd' == n || "w"  == n){
	    m[i].id = n
	    m[i].id = n</nowiki>
	    $(document).ready(function() {
	      $("#" + n).markItUp(mySettings);
	    });
	}
      }
    &lt;/script&gt;
 </pre>