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
Member
Hello,

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
TextLine.getBoundingClientRect:
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",
wrapMode:true,
wrappable:true

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

eclipse.org/orion/editor/releases/latest/built-editor-amd.min.js

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


Current Time: Tue Apr 16 19:45:04 GMT 2024

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

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

Back to the top