ejs-inplace-editor
represents the VueJS InPlaceEditor Component.
<ejs-inplaceeditor></ejs-inplaceeditor>
Specifies the action to be perform when user clicks outside the container, that is focus out of editable content. The possible options are,
Cancel
: Cancel’s the editing and resets the old content.Submit
: Submit the edited content to the server.Ignore
: No action is perform with this type and allows to have many containers open.Defaults to ‘Submit’
Specifies the adaptor type that are used DataManager to communicate with DataSource. The possible values are,
UrlAdaptor
: Base adaptor for interacting with remote data services.ODataV4Adaptor
: Used to interact with ODataV4 service.WebApiAdaptor
: Used to interact with Web api created with OData endpoint.<template>
<ejs-inplaceeditor :adaptor="adaptor"></ejs-inplaceeditor>
</template>
<script>
import Vue from "vue";
import {
InPlaceEditorPlugin
} from "@syncfusion/ej2-vue-inplace-editor";
Vue.use(InPlaceEditorPlugin);
export default Vue.extend({
data: () => {
return {
adaptor: "UrlAdaptor"
};
},
methods: {}
});
</script>
Defaults to ‘UrlAdaptor’
ButtonModel
Used to customize the “Cancel” button UI appearance by defining Button model configuration.
<template>
<ejs-inplaceeditor :cancelButton="cancelButton"></ejs-inplaceeditor>
</template>
<script>
import Vue from "vue";
import { InPlaceEditorPlugin } from "@syncfusion/ej2-vue-inplace-editor";
Vue.use(InPlaceEditorPlugin);
export default Vue.extend({
data: () => {
return {
cancelButton : { content: 'Cancel', cssClass: 'e-outline'};
};
},
methods: {}
});
</script>
Defaults to { iconCss: ‘e-icons e-cancel-icon’ }
string
Defines single/multiple classes (separated by space) to be used for customization of In-place editor.
Defaults to ”
boolean
Specifies whether to enable editing mode or not.
Defaults to false
Specifies the event action of input to enter edit mode instead of using edit icon. The possible values are:
Click
: Do the single click action on input to enter into the edit mode.DblClick
: Do the single double click action on input to enter into the edit mode.EditIconClick
: Disables the editing of event action of input and allows user to edit only through edit icon.<template>
<ejs-inplaceeditor :editableOn="editableOn"></ejs-inplaceeditor>
</template>
<script>
import Vue from "vue";
import { InPlaceEditorPlugin } from "@syncfusion/ej2-vue-inplace-editor";
Vue.use(InPlaceEditorPlugin);
export default Vue.extend({
data: () => {
return {
editableOn: "DblClick"
};
},
methods: {}
});
</script>
Defaults to ‘Click’
string
Sets the text to be shown when an element has ‘Empty’ value.
<template>
<ejs-inplaceeditor :emptyText="emptyText"></ejs-inplaceeditor>
</template>
<script>
import Vue from "vue";
import { InPlaceEditorPlugin } from "@syncfusion/ej2-vue-inplace-editor";
Vue.use(InPlaceEditorPlugin);
export default Vue.extend({
data: () => {
return {
emptyText: "text"
};
},
methods: {}
});
</script>
Defaults to ‘Empty’
boolean
Specifies to show/hide the editing mode.
<template>
<ejs-inplaceeditor :enableEditMode="enableEditMode"></ejs-inplaceeditor>
</template>
<script>
import Vue from "vue";
import { InPlaceEditorPlugin } from "@syncfusion/ej2-vue-inplace-editor";
Vue.use(InPlaceEditorPlugin);
export default Vue.extend({
data: () => {
return {
enableEditMode: true
};
},
methods: {}
});
</script>
Defaults to false
boolean
It enables or disables the parsing of HTML string content into HTML DOM elements for In-place Editor. If the value of the property is set to false, the In-place Editor value will be displayed as HTML string instead of HTML DOM elements.
Defaults to true
boolean
Defines whether to allow the cross-scripting site or not.
Defaults to true
boolean
Enable or disable persisting component’s state between page reloads. If enabled, following list of states will be persisted.
<template>
<ejs-inplaceeditor :enablePersistence="enablePersistence"></ejs-inplaceeditor>
</template>
<script>
import Vue from "vue";
import { InPlaceEditorPlugin } from "@syncfusion/ej2-vue-inplace-editor";
Vue.use(InPlaceEditorPlugin);
export default Vue.extend({
data: () => {
return {
enablePersistence: true
};
},
methods: {}
});
</script>
Defaults to false
boolean
Enable or disable rendering component in right to left direction.
Defaults to false
string
Overrides the global culture and localization value for this component. Default global culture is ‘en-US’.
Defaults to ”
Specifies the mode to be render while editing. The possible modes are :
Inline
: Editable content is displayed as inline text and ok/cancel buttons are displayed at right bottom corner of input.Popup
: Editable content and ok/cancel buttons are displayed inside popup while editing.<template>
<ejs-inplaceeditor :mode="mode"></ejs-inplaceeditor>
</template>
<script>
import Vue from "vue";
import { InPlaceEditorPlugin } from "@syncfusion/ej2-vue-inplace-editor";
Vue.use(InPlaceEditorPlugin);
export default Vue.extend({
data: () => {
return {
mode: "Inline"
};
},
methods: {}
});
</script>
Defaults to ‘Popup’
AutoCompleteModel
| ColorPickerModel
| ComboBoxModel
| DatePickerModel
| DateRangePickerModel
| DateTimePickerModel
| DropDownListModel
| MaskedTextBoxModel
| MultiSelectModel
| NumericTextBoxModel
| RichTextEditorModel
| SliderModel
| TextBoxModel
| TimePickerModel
Specifies the model object configuration for the integrated components like AutoComplete, DatePicker,NumericTextBox, etc.
<template>
<ejs-inplaceeditor :model="model" :type="type"></ejs-inplaceeditor>
</template>
<script>
import Vue from "vue";
import {
InPlaceEditorPlugin
} from "@syncfusion/ej2-vue-inplace-editor";
Vue.use(InPlaceEditorPlugin);
export default Vue.extend({
data: () => {
return {
model: {
placeholder: "Enter employee name"
}
type: 'Text';
};
},
methods: {}
});
</script>
Defaults to null
string
Specifies the name of the field which is used to map data to the server. If name is not given, then component ID is taken as mapping field name.
<template>
<ejs-inplaceeditor :name="name"></ejs-inplaceeditor>
</template>
<script>
import Vue from "vue";
import { InPlaceEditorPlugin } from "@syncfusion/ej2-vue-inplace-editor";
Vue.use(InPlaceEditorPlugin);
export default Vue.extend({
data: () => {
return {
name: "Editor"
};
},
methods: {}
});
</script>
Defaults to ”
Specifies the object to customize popup display settings like positions, animation etc.
<template>
<ejs-inplaceeditor :popupSettings="popupSettings"></ejs-inplaceeditor>
</template>
<script>
import Vue from "vue";
import {
InPlaceEditorPlugin
} from "@syncfusion/ej2-vue-inplace-editor";
Vue.use(InPlaceEditorPlugin);
export default Vue.extend({
data: () => {
return {
popupSettings: {
model: {
width: "auto"
}
};
};
},
methods: {}
});
</script>
Defaults to {}
string
| number
Defines the unique primary key of editable field which can be used for saving data in data-base.
<template>
<ejs-inplaceeditor :primaryKey="primaryKey"></ejs-inplaceeditor>
</template>
<script>
import Vue from "vue";
import { InPlaceEditorPlugin } from "@syncfusion/ej2-vue-inplace-editor";
Vue.use(InPlaceEditorPlugin);
export default Vue.extend({
data: () => {
return {
primaryKey:'';
};
},
methods: {}
});
</script>
Defaults to ”
ButtonModel
Used to customize the “Save” button UI appearance by defining Button model configuration.
<template>
<ejs-inplaceeditor :saveButton="saveButton"></ejs-inplaceeditor>
</template>
<script>
import Vue from "vue";
import { InPlaceEditorPlugin } from "@syncfusion/ej2-vue-inplace-editor";
Vue.use(InPlaceEditorPlugin);
export default Vue.extend({
data: () => {
return {
saveButton : { content: 'OK', cssClass: 'e-outline'};
};
},
methods: {}
});
</script>
Defaults to { iconCss: ‘e-icons e-save-icon’ }
boolean
Used to show/hide the ok/cancel buttons of In-place editor.
<template>
<ejs-inplaceeditor :showButtons="showButtons"></ejs-inplaceeditor>
</template>
<script>
import Vue from "vue";
import { InPlaceEditorPlugin } from "@syncfusion/ej2-vue-inplace-editor";
Vue.use(InPlaceEditorPlugin);
export default Vue.extend({
data: () => {
return {
showButtons: true;
};
},
methods: {}
});
</script>
Defaults to true
boolean
Sets to trigger the submit action with enter key pressing of input.
<template>
<ejs-inplaceeditor :mode="mode"></ejs-inplaceeditor>
</template>
<script>
import Vue from "vue";
import { InPlaceEditorPlugin } from "@syncfusion/ej2-vue-inplace-editor";
Vue.use(InPlaceEditorPlugin);
export default Vue.extend({
data: () => {
return {
mode: "Inline"
};
},
methods: {}
});
</script>
Defaults to true
string
| HTMLElement
| Function
Specifies the HTML element ID as a string that can be added as a editable field.
<template>
<ejs-inplaceeditor :template="template"></ejs-inplaceeditor>
</template>
<script>
import Vue from "vue";
import { InPlaceEditorPlugin } from "@syncfusion/ej2-vue-inplace-editor";
Vue.use(InPlaceEditorPlugin);
export default Vue.extend({
data: () => {
return {
template: '<p> Editor</p>';
};
},
methods: {}
});
</script>
Defaults to ”
Specifies the option to be set on initial rendering. It is applicable for DropDownList, AutoComplete, ComboBox, and MultiSelect component types. The possible options are:
Never
: The corresponding field value will never be set initially in the component.Always
: The corresponding field value will be set initially in the component.Defaults to ‘Never’
Specifies the type of components that integrated with In-place editor to make it as editable.
<template>
<ejs-inplaceeditor :type="type"></ejs-inplaceeditor>
</template>
<script>
import Vue from "vue";
import { InPlaceEditorPlugin } from "@syncfusion/ej2-vue-inplace-editor";
Vue.use(InPlaceEditorPlugin);
export default Vue.extend({
data: () => {
return {
type: 'Inline';
};
},
methods: {}
});
</script>
Defaults to ‘Text’
string
Gets the url for server submit action.
<template>
<ejs-inplaceeditor :url="url"></ejs-inplaceeditor>
</template>
<script>
import Vue from "vue";
import { InPlaceEditorPlugin } from "@syncfusion/ej2-vue-inplace-editor";
Vue.use(InPlaceEditorPlugin);
export default Vue.extend({
data: () => {
return {
url: 'https://ej2services.syncfusion.com/production/web-services/api/Editor/UpdateData';
};
},
methods: {}
});
</script>
Defaults to ”
{ : }
Maps the validation rules for the input.
<template>
<ejs-inplaceeditor :name="name" :validationRules="validationRules"></ejs-inplaceeditor>
</template>
<script>
import Vue from "vue";
import { InPlaceEditorPlugin } from "@syncfusion/ej2-vue-inplace-editor";
Vue.use(InPlaceEditorPlugin);
export default Vue.extend({
data: () => {
return {
name : 'Today';
validationRules : {
Today: { required: true }
};
},
methods: {}
});
</script>
Defaults to null
string
| number
| Date
| string[]
| Date[]
| number[]
Specifies the display value for input when original input value is empty.
<template>
<ejs-inplaceeditor :value="value"></ejs-inplaceeditor>
</template>
<script>
import Vue from "vue";
import { InPlaceEditorPlugin } from "@syncfusion/ej2-vue-inplace-editor";
Vue.use(InPlaceEditorPlugin);
export default Vue.extend({
data: () => {
return {
value: "Editor"
};
},
methods: {}
});
</script>
Defaults to null
Removes the control from the DOM and also removes all its related events.
Returns void
Submit the edited input value to the server.
Returns void
Validate current editor value.
Returns void
EmitType<ActionBeginEventArgs>
The event will be fired before the data submitted to the server.
The event will be fired when data submission failed.
The event will be fired when data submitted successfully to the server.
EmitType<BeforeSanitizeHtmlArgs>
Event triggers before sanitize the value.
The event will be fired before changing the mode from default to edit mode.
EmitType<MouseEvent>
Event triggers when click the cancel button.
The event will be fired when the integrated component value has changed that render based on the type
property
in the In-place editor.
EmitType<Event>
The event will be fired once the component rendering is completed.
EmitType<Event>
The event will be fired when the component gets destroyed.
The event will be fired when the edit action is finished and begin to submit/cancel the current value.
EmitType<MouseEvent>
Event triggers when click the submit button.
The event will be fired while validating current value.