Back to Devexpress

IInsertedFloatingImageOptions Interface

aspnetcore-js-devexpress-dot-richedit-20cb5010.md

latest11.5 KB
Original Source

IInsertedFloatingImageOptions Interface

Declares settings of a floating image.

Declaration

ts
export interface IInsertedFloatingImageOptions

Remarks

The inline image settings are used in the createFloating(position, options) method.

javascript
var imgUrl = 'your-image-URL';
var size = new DevExpress.RichEdit.Size(
  richEdit.unitConverter.centimetersToTwips(5), richEdit.unitConverter.centimetersToTwips(5)
);
var position = new DevExpress.RichEdit.HorizontalAlignedPosition(
  DevExpress.RichEdit.FloatingObjectHorizontalAlignment.Left, 
  DevExpress.RichEdit.FloatingObjectHorizontalAnchorElement.LeftMargin
);

richEdit.document.images.createFloating(richEdit.selection.active, {
  url: imgUrl, 
  actualSize: size, 
  wrapType: DevExpress.RichEdit.WrapType.BehindText, 
  horizontalPosition: position 
});

Properties

actualSize Property

Specifies the actual size of a floating image in the document.

Declaration

ts
actualSize: Size

Property Value

TypeDescription
Size

An object that contains an image size, in twips.

|

Remarks

javascript
var imgUrl = 'your-image-URL';
var size = new DevExpress.RichEdit.Size(richEdit.unitConverter.centimetersToTwips(12), 
    richEdit.unitConverter.centimetersToTwips(8));
richEdit.document.images.createFloating(richEdit.selection.active, {url: imgUrl, actualSize: size});

base64 Property

Specifies the image content that is encoded with base64 digits.

Declaration

ts
base64?: string

Property Value

TypeDescription
string

The image content.

|

callback Property

Specifies a function that is called after an image is loaded.

Declaration

ts
callback?: (image: FloatingImage) => void

Property Value

TypeDescription
(image: FloatingImage) => void

The JavaScript function code. The image parameter returns the newly created image.

|

Remarks

javascript
var imgUrl = 'your-image-URL';
var size = new DevExpress.RichEdit.Size(richEdit.unitConverter.centimetersToTwips(12), 
    richEdit.unitConverter.centimetersToTwips(8));
richEdit.document.images.createFloating(richEdit.selection.active, {
    url: imgUrl, description: 'An image', actualSize: size,
    callback: (function(img){console.log('The following image has been added: '+ img.description)})});

description Property

Specifies an image description.

Declaration

ts
description?: string

Property Value

TypeDescription
string

The description.

|

Remarks

javascript
var imgUrl = 'your-image-URL';
var size = new DevExpress.RichEdit.Size(richEdit.unitConverter.centimetersToTwips(12), 
    richEdit.unitConverter.centimetersToTwips(8));
richEdit.document.images.createFloating(richEdit.selection.active, {
    url: imgUrl, description: 'An image', actualSize: size,
});

distance Property

Specifies the distance between the image borders and the text that wraps around it.

Declaration

ts
distance?: IFloatingObjectDistance

Property Value

TypeDescription
IFloatingObjectDistance

An object that implements the IFloatingObjectDistance interface.

|

horizontalPosition Property

Specifies an image’s horizontal position settings.

Declaration

ts
horizontalPosition?: IHorizontalAlignedPosition | IHorizontalAbsolutePosition | IHorizontalRelativePosition

Property Value

TypeDescription
IHorizontalAlignedPosition

An object that contains settings of the image’s position that is aligned to an anchor element.

| | IHorizontalAbsolutePosition |

An object that contains settings of the image’s position that is specified in twips relative to an anchor element.

| | IHorizontalRelativePosition |

An object that contains settings of the image’s position that is specified as a percentage relative to an anchor element.

|

outlineColor Property

Specifies the image outline color.

Declaration

ts
outlineColor?: string

Property Value

TypeDescription
string

The color value.

|

Remarks

javascript
var imgUrl = 'your-image-URL';
var size = new DevExpress.RichEdit.Size(richEdit.unitConverter.centimetersToTwips(12), 
    richEdit.unitConverter.centimetersToTwips(8));
richEdit.document.images.createFloating(richEdit.selection.active, {url: imgUrl, actualSize: size,  
  outlineColor: 'green', outlineWidth: richEdit.unitConverter.pointsToTwips(3)});.

The following color formats are available:

  • 'Auto' and 'NoColor' values.
  • Hexadecimal notation (for example, '#31bb32').
  • RGB format (for example, 'rgb(51,187,51)').
  • Named colors (for example, 'darkturquoise').

Show allowed color names

NameHEXNameHEXNameHEXNameHEX
aliceblue#f0f8ffdarkturquoise#00ced1lightskyblue#87cefapeachpuff#ffdab9
antiquewhite#faebd7darkviolet#9400d3lightslateblue#8470ffperu#cd853f
aqua#00ffffdeeppink#ff1493lightslategray#778899pink#ffc0cb
aquamarine#7fffd4deepskyblue#00bffflightsteelblue#b0c4deplum#dda0dd
azure#f0ffffdimgray#696969lightyellow#ffffe0powderblue#b0e0e6
beige#f5f5dcdodgerblue#1e90fflime#00ff00purple#800080
bisque#ffe4c4feldspar#d19275limegreen#32cd32red#ff0000
black#000000firebrick#b22222linen#faf0e6rosybrown#bc8f8f
blanchedalmond#ffebcdfloralwhite#fffaf0magenta#ff00ffroyalblue#4169e1
blue#0000ffforestgreen#228b22maroon#800000saddlebrown#8b4513
blueviolet#8a2be2fuchsia#ff00ffmediumaquamarine#66cdaasalmon#fa8072
brown#a52a2againsboro#dcdcdcmediumblue#0000cdsandybrown#f4a460
burlywood#deb887ghostwhite#f8f8ffmediumorchid#ba55d3seagreen#2e8b57
cadetblue#5f9ea0gold#ffd700mediumpurple#9370d8seashell#fff5ee
chartreuse#7fff00goldenrod#daa520mediumseagreen#3cb371sienna#a0522d
chocolate#d2691egray#808080mediumslateblue#7b68eesilver#c0c0c0
coral#ff7f50green#00ff00mediumspringgreen#00fa9askyblue#87ceeb
cornflowerblue#6495edhoneydew#f0fff0mediumturquoise#48d1ccslateblue#6a5acd
cornsilk#fff8dchotpink#ff69b4mediumvioletred#c71585slategray#708090
crimson#dc143cindianred#cd5c5cmidnightblue#191970snow#fffafa
cyan#00ffffindigo#4b0082mintcream#f5fffaspringgreen#00ff7f
darkblue#00008bivory#fffff0mistyrose#ffe4e1steelblue#4682b4
darkcyan#008b8bkhaki#f0e68cmoccasin#ffe4b5tan#d2b48c
darkgoldenrod#b8860blavender#e6e6fanavajowhite#ffdeadteal#008080
darkgray#a9a9a9lavenderblush#fff0f5navy#000080thistle#d8bfd8
darkgreen#006400lawngreen#7cfc00oldlace#fdf5e6tomato#ff6347
darkkhaki#bdb76blemonchiffon#fffacdolive#808000turquoise#40e0d0
darkmagenta#8b008blightblue#add8e6olivedrab#6b8e23violet#ee82ee
darkolivegreen#556b2flightcoral#f08080orange#ffa500violetred#d02090
darkorange#ff8c00lightcyan#e0fffforangered#ff4500wheat#f5deb3
darkorchid#9932cclightgoldenrodyellow#fafad2orchid#da70d6white#ffffff
darkred#8b0000lightgray#d3d3d3palegoldenrod#eee8aawhitesmoke#f5f5f5
darksalmon#e9967alightgreen#90ee90palegreen#98fb98yellow#ffff00
darkseagreen#8fbc8flightpink#ffb6c1paleturquoise#afeeeeyellowgreen#9acd32
darkslateblue#483d8blightsalmon#ffa07apalevioletred#d87093windowtext#000000
darkslategray#2f4f4flightseagreen#20b2aapapayawhip#ffefd5

outlineWidth Property

Specifies the image outline width.

Declaration

ts
outlineWidth?: number

Property Value

TypeDescription
number

The width, in twips.

|

Remarks

javascript
var imgUrl = 'your-image-URL';
var size = new DevExpress.RichEdit.Size(richEdit.unitConverter.centimetersToTwips(12), 
    richEdit.unitConverter.centimetersToTwips(8));
richEdit.document.images.createFloating(richEdit.selection.active, {url: imgUrl, actualSize: size,  
  outlineColor: 'green', outlineWidth: richEdit.unitConverter.pointsToTwips(3)});.

url Property

Specifies the image URL.

Declaration

ts
url?: string

Property Value

TypeDescription
string

The image URL.

|

Remarks

javascript
var imgUrl = 'your-image-URL';
var size = new DevExpress.RichEdit.Size(richEdit.unitConverter.centimetersToTwips(12), 
    richEdit.unitConverter.centimetersToTwips(8));
richEdit.document.images.createFloating(richEdit.selection.active, {url: imgUrl, actualSize: size});

verticalPosition Property

Specifies an image’s vertical position settings.

Declaration

ts
verticalPosition?: IVerticalAlignedPosition | IVerticalAbsolutePosition | IVerticalRelativePosition

Property Value

TypeDescription
IVerticalAlignedPosition

An object that contains settings of the image’s position that is aligned to an anchor element.

| | IVerticalAbsolutePosition |

An object that contains settings of the image’s position that is specified in twips relative to an anchor element.

| | IVerticalRelativePosition |

An object that contains settings of the image’s position that is specified as a percentage relative to an anchor element.

|

wrapSide Property

Specifies the side of the floating object the text wraps around.

Declaration

ts
wrapSide?: WrapSide

Property Value

TypeDescription
WrapSide

The side where the text wraps around the object.

|

wrapType Property

Specifies the image’s wrap type.

Declaration

ts
wrapType?: WrapType

Property Value

TypeDescription
WrapType

A wrap type value.

|