RichTextEditor disabled

I have create a windows with some sections in. I try to drop an item on a section and then I create a RichTextEditor in the section. I see the editor, the controls in it works but I cannot enter any text, even the stuff I put in the value does not show up in the editor.

Firebug gives me this error:

isc.HiddenFrame has no properties

Any ideas?

Thanks
Dennis

isc.defineClass(“MyBook”, “Window”).addProperties({
width:“100%”, height: “100%”,
overflow:“hidden”,
title: “My Book”,
dropTypes:“dropTypeSection”,
showEdges: true,
keepInParentRect:true,
canDragReposition:true,
canDragResize:true,
dragAppearance:“target”,
edgeImage:“[SKIN]/rounded/frame/FFFFFF/4.png”,
edgeSize: 4,
animateMinimize: true,
contextMenu: isc.Menu.create({
autoDraw:false,
width:150,
data:[
{title:“Rename Book”, click:“isc.say(‘OK’)”},
{title:“Delete Book”, click:“isc.say(‘OK’)”}
]
}),

canAcceptDrop: true,
dropOver: "if (this.willAcceptDrop()) this.setBackgroundColor('#ffff80')",
dropOut: "this.setBackgroundColor('#ffffff')",
drop: function () {
		//Item 0 is the note stack
        this.items[0].addSection({
            title: "New Section", 
			canDragReposition:true,
            expanded: true,
			contextMenu: isc.Menu.create({
						    autoDraw:false,
						    width:150,
						    data:[
						        {title:"Rename Section", click:"isc.say('OK')"},
						        {title:"Delete Section", click:"isc.say('OK')"}
						    ]
			}),
			items: [
				isc.HStack.create({
				    width:"100%", height:"100%", 
					overflow:"hidden",
					dropTypes: ["dropTypeTextNote", "dropTypeVideoNote", "dropTypeMusicNote", "dropTypeScheduleNote"],				
					dragAppearance:"target",
				    edgeSize: 4,
				    showContextMenu: "return false",
				    canAcceptDrop: true,
				    dropOver: "if (this.willAcceptDrop()) this.setBackgroundColor('#ffff80')",
				    dropOut: "this.setBackgroundColor('#ffffff')",
				    drop: function () {
						var dragType = isc.Event.getDragTarget().dragType;

						if(dragType == "dropTypeTextNote") {

						this.addChild(
							isc.RichTextEditor.create({
							            autoDraw:false,
							            height: "200",
										width: "100%",
							            
							            overflow:"auto",
							            canDragResize:true, 
										showEdges:true,
							
							             // Standard control group options include
							             // "fontControls", "formatControls", "styleControls" and "colorControls"
							             controlGroups:["fontControls", "formatControls", "styleControls", "colorControls"],
										 value: "<html>test</html>"
							        })
								)
								
				    }
				})
            ]
    })
},
items: [
	isc.SectionStack.create({
	    visibilityMode: "multiple",
		dropLineProperties:{backgroundColor:"#40c040"},
		membersMargin:2, layoutMargin:2,
	 	animateSections: "true",
	    width: "100%",
	    height: "100%"
	})
]

})

Hi Jyden,

It looks like a chunk of code may be missing here, this has JavaScript syntax errors. If you could re-post with [ code ] tags it would be more obvious.

Sure, here is the whole page:

isc.defineClass("DragPiece", "Img").addProperties({
    width:32, height:32,
    cursor: "move",
    appImgDir: "icons/pastel/",
    canDrag: true,
    canDrop: true,
    dragAppearance: "tracker",
    setDragTracker: "isc.Event.setDragTracker(isc.Canvas.imgHTML('icons/pastel/' + this.src,16,16),24,24,15,15)"
})


isc.defineClass("LiferaBook", "Window").addProperties({
    width:"100%", height: "100%", 
	overflow:"hidden",
    title: "My Book",
	dropTypes:"dropTypeSection",	
    showEdges: true,
    keepInParentRect:true,
    canDragReposition:true,
	canDragResize:true,	
	dragAppearance:"target",
	edgeImage:"[SKIN]/rounded/frame/FFFFFF/4.png",
    edgeSize: 4,
	animateMinimize: true,
	contextMenu: isc.Menu.create({
				    autoDraw:false,
				    width:150,
				    data:[
				        {title:"Rename Book", click:"isc.say('OK')"},
				        {title:"Delete Book", click:"isc.say('OK')"}
				    ]
	}),

    canAcceptDrop: true,
    dropOver: "if (this.willAcceptDrop()) this.setBackgroundColor('#ffff80')",
    dropOut: "this.setBackgroundColor('#ffffff')",
    drop: function () {
			//Item 0 is the note stack
            this.items[0].addSection({
                title: "New Section", 
				canDragReposition:true,
                expanded: true,
				contextMenu: isc.Menu.create({
							    autoDraw:false,
							    width:150,
							    data:[
							        {title:"Rename Section", click:"isc.say('OK')"},
							        {title:"Delete Section", click:"isc.say('OK')"}
							    ]
				}),
				items: [
					isc.HStack.create({
					    width:"100%", height:"100%", 
						overflow:"hidden",
						dropTypes: ["dropTypeTextNote", "dropTypeVideoNote", "dropTypeMusicNote", "dropTypeScheduleNote"],				
						dragAppearance:"target",
					    edgeSize: 4,
					    showContextMenu: "return false",
					    canAcceptDrop: true,
					    dropOver: "if (this.willAcceptDrop()) this.setBackgroundColor('#ffff80')",
					    dropOut: "this.setBackgroundColor('#ffffff')",
					    drop: function () {
							var dragType = isc.Event.getDragTarget().dragType;

							if(dragType == "dropTypeTextNote") {

							this.addChild(
								isc.RichTextEditor.create({
								            autoDraw:false,
								            height: "200",
											width: "100%",
								            
								            overflow:"auto",
								            canDragResize:true, 
											showEdges:true,
								
								             // Standard control group options include
								             // "fontControls", "formatControls", "styleControls" and "colorControls"
								             controlGroups:["fontControls", "formatControls", "styleControls", "colorControls"],
											 value: "<html>test</html>"
								        })
									)
									
							} else if(dragType == "dropTypeVideoNote") {

							this.addChild(
								isc.VideoNote.create({
								            autoDraw:false,
								            height: "200",
											width: "100%",
							                overflow:"auto",
											showEdges:false
								        })
									)
							}
					    }
					})
                ]
        })
	},
    items: [
		isc.SectionStack.create({
		    visibilityMode: "multiple",
			dropLineProperties:{backgroundColor:"#40c040"},
			membersMargin:2, layoutMargin:2,
		 	animateSections: "true",
		    width: "100%",
		    height: "100%"
		})
    ]
	
})


isc.defineClass("DroppedPiece", "Canvas").addProperties({
    width:100, height:100, 
	overflow:"hidden",
    showEdges: true,
    keepInParentRect:true,
    canDragReposition:true,
	canDragResize:true,	
	dragAppearance:"target",
	edgeImage:"[SKIN]/rounded/frame/FFFFFF/4.png",
    edgeSize: 4,
    showContextMenu: "return false",
    canAcceptDrop: true,
    dropOver: "if (this.willAcceptDrop()) this.setBackgroundColor('#ffff80')",
    dropOut: "this.setBackgroundColor('#ffffff')",
    drop: function () {
        this.addChild(isc.LiferaBook.create({
            src: isc.Event.getDragTarget().src,
            left: this.getOffsetX()-15-this.edgeSize,
            top: this.getOffsetY()-15-this.edgeSize
        }))
    }
})

isc.defineClass("VideoNote", "Canvas").addProperties({
    width:100, height:100, 
	contents:
		'<p id="player1"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</p>' +
		'   <script type="text/javascript">' +
		'       var s1 = new SWFObject("libs/jw_flv_player/flvplayer.swf","single","300","170","7");' +
		'       s1.addParam("allowfullscreen","true");' +
		'       s1.addVariable("file","Longgreen-TheLongGreenLineMovieSample629.flv");' +
		'       s1.addVariable("image","libs/jw_flv_player/preview.jpg");' +
		'       s1.addVariable("width","300");' +
		'       s1.addVariable("height","170");' +
		'       s1.write("player1");' +
		'  </script>'
})


isc.defineClass("PieceBin", "Canvas").addProperties({
    width:"100%", height:"100%", 
	overflow:"hidden",
    showEdges: true,
    keepInParentRect:true,
    canDragReposition:true,
	canDragResize:true,	
	dragAppearance:"target",
	edgeImage:"[SKIN]/rounded/frame/FFFFFF/4.png",
    edgeSize: 4,
    showContextMenu: "return false",
    canAcceptDrop: true,
    dropOver: "if (this.willAcceptDrop()) this.setBackgroundColor('#ffff80')",
    dropOut: "this.setBackgroundColor('#ffffff')",
    drop: function () {
        this.addChild(isc.DroppedPiece.create({
            src: isc.Event.getDragTarget().src,
            left: this.getOffsetX()-15-this.edgeSize,
            top: this.getOffsetY()-15-this.edgeSize
        }))
    }
})

isc.VStack.create({
	ID:"diaryTools",	
	width: "50",
	height: "50",	
    showEdges: true,
	animateMembers:true,
	edgeImage:"[SKIN]/rounded/frame/FFFFFF/4.png",
	edgeSize: 4,
	layoutMargin:20, membersMargin:20, 
	layoutAlign:"top", 
	members:[
    isc.DragPiece.create({src:"docs-32x32.png", dragType:"dropTypeBook"}),
    isc.DragPiece.create({src:"folder-open-32x32.png", dragType:"dropTypeSection"}),
    isc.DragPiece.create({src:"text-file-32x32.png", dragType:"dropTypeTextNote"}),
    isc.DragPiece.create({src:"video-clip-32x32.png", dragType:"dropTypeVideoNote"}),
    isc.DragPiece.create({src:"wave-file-32x32.png", dragType:"dropTypeMusicNote"}),
    isc.DragPiece.create({src:"scheduled-tasks-32x32.png", dragType:"dropTypeScheduleNote"})	
	]
})
isc.HStack.create(
{	
	ID:"diaryBook",		
	membersMargin:20, 
	members:[
	    isc.PieceBin.create({ dropTypes:["b","y"]})
]})


isc.HLayout.create({
	ID:"diaryForm",	
    width: "100%",
    height: "100%",
    showResizeBar: false,
    canAcceptDrop: false,
    members: [
		diaryTools,
		isc.Canvas.create({
		    width:"100%", height:"100%", 
			overflow:"hidden",
			dropTypes:"dropTypeBook",				
			dragAppearance:"target",
		    edgeSize: 4,
		    showContextMenu: "return false",
		    canAcceptDrop: true,
		    dropOver: "if (this.willAcceptDrop()) this.setBackgroundColor('#ffff80')",
		    dropOut: "this.setBackgroundColor('#ffffff')",
		    drop: function () {
		        this.addChild(isc.LiferaBook.create({
//		            src: isc.Event.getDragTarget().src,
//		            left: this.getOffsetX()-15-this.edgeSize,
//		            top: this.getOffsetY()-15-this.edgeSize
		        }))
		    }
		})
		
    ]
});

I can recreate the problem very easily. Just like this and the RichTextEditor is disabled.

Can you show me how to create a section stack that has a RichTextEditor in each section?

var ajaxDefinition = 
    "<span style='font-size:22px;'>Ajax</span> " +
    "<b>A</b>synchronous <b>J</b>avaScript <b>A</b>nd <b>X</b>ML (AJAX) is a " +
    "Web development technique for creating interactive <b>web applications</b>. " +
    "The intent is to make web pages feel more responsive by exchanging small " +
    "amounts of data with the server behind the scenes, so that the entire Web " +
    "page does not have to be reloaded each time the user makes a change. " +
    "This is meant to increase the Web page's <b>interactivity</b>, <b>speed</b>, " +
    "and <b>usability</b>.<br>" +
    "(Source: <a href='http://www.wikipedia.org' title='Wikipedia' target='_blank'>Wikipedia</a>)";


isc.defineClass("NoteItem", "RichTextEditor").addProperties({
            autoDraw:false,
            ID:"contentEditor",
            height:155,
            
            overflow:"hidden",
            canDragResize:true, showEdges:true,

             // Standard control group options include
             // "fontControls", "formatControls", "styleControls" and "colorControls"
             controlGroups:["fontControls", "styleControls"],
             value:ajaxDefinition
})
		
isc.SectionStack.create({
	ID:"diaryForm",	
    width: "100%",
    height: "100%",
    showResizeBar: false,
    canAcceptDrop: false,
    visibilityMode: "multiple",
	membersMargin:2, layoutMargin:2,
 	animateSections: "true",
	sections: [
        {title: "Help 1", expanded: true, canCollapse: true, items: [ 
            isc.NoteItem.create({ ID:"help1", autoDraw:false })
        ]},
        {title: "Help 2", expanded: true, canCollapse: true, items: [ 
            isc.NoteItem.create({ ID:"help2", autoDraw:false })
        ]}
    ]
});

Hi Jyden,

We’re getting a “works for me” result in SmartClient 6.0, IE7 and Firefox 2.0. Where exactly are you seeing this problem?

I downloaded a fresh copy of the smartclientRuntime and now it is also working for me, so something must have been screwed up on my end.

Thanks for your support and sorry for the false alarm.

We’re getting the exact same error and behaviour here, with both RichTextEditor and RichTextItem.
We don’t load the entire SmartClient library though. Along with RichTextEditor, what else do we need to include?

Thanks

Hi msteninger,

Try loading Core, Foundation, Containers, Grids, Forms and RichTextEditor. Note also that the previous poster resolved this through a new download.

We are loading those, no luck though. This is a pretty fresh install of 6.0lgpl. It works fine when I jump back to 5.71.
I’m doing the simplest example possible.

        exampleText = "this is my example text.";

        this.myEditor = isc.RichTextEditor.create({
            value:exampleText,
            width:"100%",
            height:"100%"
        });

the response back is:
isc.HiddenFrame has no properties
redraw()FileServer.php (line 55)
22y()FileServer.php (line 47)
onload(load )

function () {
    var _1 = this.$22y();
    if (_1) {
        this.$229();
    }
    this.Super("redraw", arguments);
    if (_1) {
        this.$220 = true;
    }
}

-Matt

Try loading the DataBinding module as well (sorry, missed this before).

Not working in Open source SDK downloaded 13th Jan

Dear all,

I have followed the thread - but can’t get the RichTextEditor to work even in a basic example:

Below is a simple HTML page which “should” work (as far as my understanding goes).

I am loading the ISC_RichTextEditor.js from the Development Dir of the SDK as it is not in the module directory.

Any how - the error I get is the isc.HiddenFrame one mentioned by Jyden…

Sure I am missing something obvious but haven’t a clue what it is.

Any help gratefully recieved

<html><head>
		<SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/development/ISC_RichTextEditor.js></SCRIPT>
	<SCRIPT SRC=isomorphic/skins/SmartClient/load_skin.js></SCRIPT>
	
</head><body>


<SCRIPT>
	
isc.RichTextEditor.create({
autoDraw:true,
height: "200",
width: "100%",

overflow:"auto",
canDragResize:true, 
showEdges:true,

// Standard control group options include
// "fontControls", "formatControls", "styleControls" and "colorControls"
controlGroups:["fontControls", "formatControls", "styleControls", "colorControls"],
value: "<html>test</html>"
});

      </SCRIPT>

</body></html>

Hi StuartJ,

You can’t mix the system/development and system/modules files, that’s the reason for the JS error.

The 6.0 LGPL version included RichTextEditor.js in the source directory but unfortunately did not include a pre-built module for it. This will be corrected in 6.1. In the meantime, you could use the modules from the commercial evaluation build - they are cross-compatible for the features supported by the LGPL version.

Thanks - I had a Commercial Eval (on another drive) downloaded (I think) on 6th Jan 2007.

I have copied the ISC_RichTextEditor.js file from the runtime there - into the modules directory and altered the HTML in the code (above from last post) to reference the modules directory. Same problem exists…

A HTTP proxy trace (fiddler) reveals everything is being loaded correctly -

Do I need to copy another else across?

Hi StuartJ,

In general, you cannot mix modules across versions, development vs modules directories, or editions of SmartClient. You need to use all the modules from the Commercial Eval if you are going to use the RichTextEditor from the Commercial Eval.

Thanks for the quick reply.

So I can copy all the runtime modules from the Commercial Eval and it will still be under the “open source license”?

Another Question: When is 6.1 hoped for?

Thanks

Hello stuartj,

Copying the files around doesn’t change the license. The suggestion of copying the files was intended as a temporary workaround until 6.1 is available, which is expected within Q1, well within the 60 day evaluation period of the commercial license.

Thanks copying the isopmorphic directory from the commerical eval worked a treat.