Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Orion (Archived) » [Editor] wrapMode = true triggers TypeError
[Editor] wrapMode = true triggers TypeError [message #1184288] Wed, 13 November 2013 10:52 Go to next message
Ken Wenzel is currently offline Ken WenzelFriend
Messages: 51
Registered: July 2009

I use built-editor-amd.js version 4.0.
If the editor is initialized with
var editor = edit({
  parent : parent,
  wrapMode : true
  // other options

a Javascript TypeError: result is undefined is thrown.

This error is due to the following code in
var rect = this.getBoundingClientRect();
if (!result) {
  if (view._wrapMode) {
    var rects = this.getClientRects();
    // rects is empty at this point
    result = rects[rects.length - 1];
    // result is undefined at this point
    result.left = result.right;

Either I am misusing wrapMode = true or this is really a bug?!
Do you have any suggestions for me?

Best regards,
Ken Wenzel
Re: [Editor] wrapMode = true triggers TypeError [message #1195096 is a reply to message #1184288] Mon, 18 November 2013 21:14 Go to previous message
Bogdan Gheorghe is currently offline Bogdan GheorgheFriend
Messages: 23
Registered: July 2009
Junior Member
Hi Ken -

There was indeed a bug with wrapping in the standalone editor. You will need to add the wrappable option to your list:

lang: "js",

You should be able to pick up the fix in tonight's build or you can access it from here:

- B
Previous Topic:Orion 3
Next Topic:Extending Orion with Plugin without using the Orion server
Goto Forum:

Current Time: Mon Dec 04 14:19:34 GMT 2023

Powered by FUDForum. Page generated in 0.02364 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top