File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
aceeditor/src/main/java/com/susmit/aceeditor Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -346,7 +346,7 @@ public void setText(String text)
346
346
347
347
public void setFontSize (int fontSizeInpx )
348
348
{
349
- loadUrl ("document.getElementById('editor').style.fontSize='" + String .valueOf (fontSizeInpx ) + "px';" );
349
+ loadUrl ("javascript: document.getElementById('editor').style.fontSize='" + String .valueOf (fontSizeInpx ) + "px';" );
350
350
}
351
351
352
352
public void insertTextAtCursor (String text )
@@ -447,6 +447,14 @@ public void endFind()
447
447
findString = null ;
448
448
}
449
449
450
+ public void setSoftWrap (boolean enabled )
451
+ {
452
+ if (enabled )
453
+ loadUrl ("javascript:editor.getSession().setUseWrapMode(true);" );
454
+ else
455
+ loadUrl ("javascript:editor.getSession().setUseWrapMode(false);" );
456
+ }
457
+
450
458
public void setTheme (Theme theme )
451
459
{
452
460
loadUrl ("javascript:editor.setTheme(\" ace/theme/" + theme .name ().toLowerCase () + "\" );" );
You can’t perform that action at this time.
0 commit comments