Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions ace-internal.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,16 @@ export namespace Ace {
offset: number,
height: number,
gutterOffset: number
fontMetrics: {
textWidth: (row: number, column: number) => number,
getRects: (start: Position, end: Position) => Rect[]
}
}
interface Rect {
left: number,
top: number,
width: number,
height: number,
}

interface HardWrapOptions {
Expand Down
10 changes: 10 additions & 0 deletions ace.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,16 @@ declare module "ace-code" {
offset: number;
height: number;
gutterOffset: number;
fontMetrics: {
textWidth: (row: number, column: number) => number;
getRects: (start: Position, end: Position) => Rect[];
};
}
interface Rect {
left: number;
top: number;
width: number;
height: number;
}
interface HardWrapOptions {
/** First row of the range to process */
Expand Down
10 changes: 10 additions & 0 deletions demo/kitchen-sink/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,16 @@ optionsPanelContainer.insertBefore(
"Open Dialog ",
["button", {onclick: openTestDialog.bind(null, false)}, "Scale"],
["button", {onclick: openTestDialog.bind(null, true)}, "Height"]
],
["div", {},
["button", {onclick: function() {
editor.setOption("fontFamily", "cursive");
session.setValue( session.getValue() + "שלום עולם בעברית123" +"\n" + "ジャパン + 八洲\n" + "𒐫𒈙⸻ဪ", 1);
}}, "cursive"],
["button", {onclick: function() {
editor.setOption("fontFamily", "Tahoma");
session.setValue( session.getValue() + "שלום עולם בעברית123" +"\n" + "ジャパン + 八洲", 1);
}}, "Tahoma"],
]
]),
optionsPanelContainer.children[1]
Expand Down
2 changes: 1 addition & 1 deletion demo/kitchen-sink/inline_editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ require("ace/commands/default_commands").commands.push({
return;
}

var rowCount = 10;
var rowCount = 5.5;
var w = {
row: row,
// rowCount: rowCount,
Expand Down
Loading
Loading