CKEditor classes to multiple block elements - ckeditor

In CKEditor I need to be able to add the classes .h1, .h2, .h3 ... to my headers, to render them as those different sizes.
Example:
<h1 class="h3">h1 shown at same size as h3</h1>
I could add the following to my stylesSet, which seems pretty verbose:
config.stylesSet = [
// Headers as h1
{ name: 'h2 as h1', element : 'h2', attributes: {'class': 'h1'} },
{ name: 'h3 as h1', element : 'h3', attributes: {'class': 'h1'} },
{ name: 'h4 as h1', element : 'h4', attributes: {'class': 'h1'} },
{ name: 'h5 as h1', element : 'h5', attributes: {'class': 'h1'} },
{ name: 'h6 as h1', element : 'h6', attributes: {'class': 'h1'} },
// Headers as h2
{ name: 'h1 as h2', element : 'h1', attributes: {'class': 'h2'} },
{ name: 'h3 as h2', element : 'h3', attributes: {'class': 'h2'} },
{ name: 'h4 as h2', element : 'h4', attributes: {'class': 'h2'} },
{ name: 'h5 as h2', element : 'h5', attributes: {'class': 'h2'} },
{ name: 'h6 as h2', element : 'h6', attributes: {'class': 'h2'} },
// Headers as h3
{ name: 'h1 as h3', element : 'h1', attributes: {'class': 'h3'} },
{ name: 'h2 as h3', element : 'h2', attributes: {'class': 'h3'} },
{ name: 'h4 as h3', element : 'h4', attributes: {'class': 'h3'} },
{ name: 'h5 as h3', element : 'h5', attributes: {'class': 'h3'} },
{ name: 'h6 as h3', element : 'h6', attributes: {'class': 'h3'} },
// Headers as h4
{ name: 'h1 as h4', element : 'h1', attributes: {'class': 'h4'} },
{ name: 'h2 as h4', element : 'h2', attributes: {'class': 'h4'} },
{ name: 'h3 as h4', element : 'h3', attributes: {'class': 'h4'} },
{ name: 'h5 as h4', element : 'h5', attributes: {'class': 'h4'} },
{ name: 'h6 as h4', element : 'h6', attributes: {'class': 'h4'} },
// Headers as h5
{ name: 'h1 as h5', element : 'h1', attributes: {'class': 'h5'} },
{ name: 'h2 as h5', element : 'h2', attributes: {'class': 'h5'} },
{ name: 'h3 as h5', element : 'h3', attributes: {'class': 'h5'} },
{ name: 'h4 as h5', element : 'h4', attributes: {'class': 'h5'} },
{ name: 'h6 as h5', element : 'h6', attributes: {'class': 'h5'} },
// Headers as h6
{ name: 'h1 as h6', element : 'h1', attributes: {'class': 'h6'} },
{ name: 'h2 as h6', element : 'h2', attributes: {'class': 'h6'} },
{ name: 'h3 as h6', element : 'h3', attributes: {'class': 'h6'} },
{ name: 'h4 as h6', element : 'h4', attributes: {'class': 'h6'} },
{ name: 'h5 as h6', element : 'h5', attributes: {'class': 'h6'} }
];
In other StackOverflow questions I have found answers like to add them like this, but it doesn't work.
config.stylesSet = [
{ name: 'as h1', element : ['h2', 'h3', 'h4', 'h5', 'h6'], attributes: {'class': 'h1'} },
{ name: 'as h2', element : ['h1', 'h3', 'h4', 'h5', 'h6'], attributes: {'class': 'h2'} },
{ name: 'as h3', element : ['h1', 'h2', 'h4', 'h5', 'h6'], attributes: {'class': 'h3'} },
{ name: 'as h4', element : ['h1', 'h2', 'h3', 'h5', 'h6'], attributes: {'class': 'h4'} },
{ name: 'as h5', element : ['h1', 'h2', 'h3', 'h4', 'h6'], attributes: {'class': 'h5'} },
{ name: 'as h6', element : ['h1', 'h2', 'h3', 'h4', 'h5'], attributes: {'class': 'h6'} }
];
In the docs, there is nothing about this method.
Am I missing something, is there another method or is the first method the only way?

Specifying multi-elements will not work. You can only specify one element for one style entry. This is because CKEditor needs to show a preview inside the dropdown how such styled element will look.
By allowing multiple elements in a single style entry, CKEditor would either need to show preview for for all elements (the same as your current solution) or preview for only one element what could help you get smaller code and smaller number of entries in styles dropdown but wouldn't be very practical from WYSIWYG point of view (the preview would not match what you get after applying the style).

Related

how to tell ckeditor5 to use my custom heading type by default

I am using a custom build of #ckeditor/ckeditor5-editor-classic#18.0.0
heading : {
options: [
{
model : 'inlineParagraph',
view : 'span',
title : 'Inline Paragraph',
class : 'ck-heading_paragraph_inline',
converterPriority: 'highest'
},
{ model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },
{ model: 'heading1', view: 'h1', title: 'Heading 1', class: 'ck-heading_heading1' },
{ model: 'heading2', view: 'h2', title: 'Heading 2', class: 'ck-heading_heading2' },
{ model: 'heading3', view: 'h3', title: 'Heading 3', class: 'ck-heading_heading3' },
{ model: 'heading4', view: 'h4', title: 'Heading 4', class: 'ck-heading_heading4' },
]
}
I want the inlineParagraph to be the default type when there is no text in the editor, by default editor chooses the paragraph.
I also tried this :
heading : {
options: [
{
model : 'inlineParagraph',
view : 'span',
title : 'Inline Paragraph',
class : 'ck-heading_paragraph_inline',
converterPriority: 'highest'
},
{ model: 'paragraph', view: 'span', title: 'Paragraph', class: 'ck-heading_paragraph' },
{ model: 'div', title: 'Div', class: 'ck-heading_div' },
{ model: 'heading1', view: 'h1', title: 'Heading 1', class: 'ck-heading_heading1' },
{ model: 'heading2', view: 'h2', title: 'Heading 2', class: 'ck-heading_heading2' },
{ model: 'heading3', view: 'h3', title: 'Heading 3', class: 'ck-heading_heading3' },
{ model: 'heading4', view: 'h4', title: 'Heading 4', class: 'ck-heading_heading4' },
]
}
But then it choose div as default ... I think it defaults to a block level element ... but I want to change it to a inline element like span ...

Single instance of full CKEditor v4 is shown with two toolbars

I have created a page with full build CKEditor v4. I have one instance on page, but it has two toll bars??? It is classic instance (no in-line) and 1 (custom toolbar) in a static on page, but second toolbar showing only when i focused on text, I put an attachments of a screenshot bottom and my build-config.js and config on page. Have any ideas why?
build-config.js:
var CKBUILDER_CONFIG = {
skin: 'moono-lisa',
preset: 'full',
ignore: [
'.DS_Store',
'.bender',
'.editorconfig',
'.gitattributes',
'.gitignore',
'.idea',
'.jscsrc',
'.jshintignore',
'.jshintrc',
'.mailmap',
'.npm',
'.travis.yml',
'bender-err.log',
'bender-out.log',
'bender.ci.js',
'bender.js',
'dev',
'gruntfile.js',
'less',
'node_modules',
'package.json',
'tests'
],
plugins : {
'a11yhelp' : 1,
'about' : 1,
'allowsave' : 1,
'base64image' : 1,
'basicstyles' : 1,
'bidi' : 1,
'blockquote' : 1,
'colorbutton' : 1,
'colordialog' : 1,
'contextmenu' : 1,
'dialogadvtab' : 1,
'divarea' : 1,
'enterkey' : 1,
'entities' : 1,
'filebrowser' : 1,
'find' : 1,
'floatingspace' : 1,
'font' : 1,
'format' : 1,
'forms' : 1,
'horizontalrule' : 1,
'htmlwriter' : 1,
'indentblock' : 1,
'indentlist' : 1,
'justify' : 1,
'link' : 1,
'list' : 1,
'liststyle' : 1,
'lite' : 1,
'loremipsum' : 1,
'magicline' : 1,
'maximize' : 1,
'pagebreak' : 1,
'pastefromword' : 1,
'pastetext' : 1,
'removeformat' : 1,
'resize' : 1,
'selectall' : 1,
'showborders' : 1,
'showprotected' : 1,
'specialchar' : 1,
'stylescombo' : 1,
'tab' : 1,
'tableresize' : 1,
'tableresizerowandcolumn' : 1,
'tableselection' : 1,
'tabletools' : 1,
'texzilla' : 1,
'undo' : 1,
'uploadimage' : 1,
'wordcount' : 1,
'zoom' : 1
},
languages : {
'en' : 1
}
};
config on page:
CKEDITOR.replace(editorId, {
on: {
instanceReady: function (ev) {
console.log('CKE4 Editor Was Initialized', editorId);
var writer = ev.editor.dataProcessor.writer;
writer.indentationChars = ' ';
var dtd = CKEDITOR.dtd;
for (var e in CKEDITOR.tools.extend({}, dtd.$block, dtd.$listItem, dtd.$tableContent)) {
ev.editor.dataProcessor.writer.setRules(e, {
indent: false,
breakBeforeOpen: false,
breakAfterOpen: false,
breakBeforeClose: false,
breakAfterClose: false
});
}
for (var e in CKEDITOR.tools.extend({}, dtd.$list, dtd.$listItem, dtd.$tableContent)) {
ev.editor.dataProcessor.writer.setRules(e, {
indent: true,
});
}
ev.editor.dataProcessor.writer.setRules('table',
{
indent: true
});
ev.editor.dataProcessor.writer.setRules('form',
{
indent: true
});
}
,
fileUploadResponse: function (evt) {
// Prevent the default response handler.
evt.stop();
// Get XHR and response.
var data = evt.data,
xhr = data.fileLoader.xhr,
response = xhr.responseText.split('|');
var json = JSON.parse(evt.data.fileLoader.xhr.responseText);
if (json.message != undefined) {
// An error occurred during upload.
data.message = json.message;
evt.cancel();
} else {
data.url = json.url;//response[0];
}
//var url = JSON.parse(evt.data.fileLoader.xhr.responseText).url;
CKEDITOR.instances[editorId].insertHtml('<img alt="' + json.fileName + '" data-cke-saved-src="' + json.url + '" src="' + json.url + '">');
}
},
filebrowserImageUploadUrl: ImageUploadUrl,
filebrowserUploadMethod: 'form',
toolbarLocation: 'top',
disableNativeSpellChecker: true,
title: false,
allowedContent: true,
pasteFromWordCleanupFile: WordCleanupFile,
baseFloatZIndex: 15000,
height: 500,
wight: 1500,
wordcount: {
showCharCount: true,
showWordCount: true,
countSpacesAsChars: true,
countHTML: true,
countLineBreaks: true,
wordLimit: 'unlimited'
}
,
toolbar: [
{ name: 'tools', items: ['Maximize'] },
{ name: 'document', items: ['Preview', 'Print'] },
//{ name: 'clipboard', items: [ 'Paste', 'PasteText', 'PasteFromWord' ] },
{ name: 'clipboard', items: ['Cut', 'Copy', '-', 'Undo', 'Redo'] },
{ name: 'styles', items: ['Styles', 'Format', 'Font', 'FontSize'] },
{ name: 'basicstyles', items: ['Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript'] },
{ name: 'basicstyles', items: ['RemoveFormat'] },
{ name: 'colors', items: ['TextColor', 'BGColor'] },
{ name: 'paragraph', items: ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'] },
{ name: 'links', items: ['Link', 'Unlink', 'Anchor'] },
{ name: 'paragraph', items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'bidiltr', 'bidirtl'] },
{ name: 'insert', items: ['base64image', 'Image', 'Table'] },
{ name: 'uploadimage', items: ['uploadimage'] },
{ name: 'insert', items: ['HorizontalRule', 'PageBreak', 'IPCom'] },
{ name: 'texzilla', items: ['texzilla'] },
{ name: 'editing', items: ['SelectAll', '-', 'Scayt'] },
{ name: 'zoom', items: ['Zoom'] },
{ name: 'editing', items: ['Find', 'Replace', ] },
{ name: 'tools', items: ['ShowBlocks'] },
{ name: 'lite', items: ['lite-acceptall', 'lite-rejectall', 'lite-acceptone', 'lite-rejectone'] }
]
});
This is how it currently looks like:

Adding "fontsize" to custom yaml file from ckeditor in TYPO3

I have the problem, that the "fontsize" field is not shown at my own custom configuration.
My YAML File looks like this:
# Load default processing options
imports:
- { resource: "EXT:rte_ckeditor/Configuration/RTE/Processing.yaml" }
- { resource: "EXT:rte_ckeditor/Configuration/RTE/Editor/Base.yaml" }
- { resource: "EXT:rte_ckeditor/Configuration/RTE/Editor/Plugins.yaml" }
# Add configuration for the editor
# For complete documentation see http://docs.ckeditor.com/#!/api/CKEDITOR.config
editor:
config:
contentsCss: ["EXT:rte_ckeditor/Resources/Public/Css/contents.css", "EXT:myext/Resources/Public/css/rte.css"]
format_tags: "p;h1;h2;h3;h4;h5;pre;div"
stylesSet:
# block level styles
- { name: "align-left", element: ['h1', 'h2', 'h3', 'h4','h5', 'h6', 'p', 'td', 'th'], attributes: { 'class': 'align-left' }}
- { name: "align-center", element: ['h1', 'h2', 'h3', 'h4','h5', 'h6', 'p', 'td', 'th'], attributes: { 'class': 'align-center' }}
- { name: "align-right", element: ['h1', 'h2', 'h3', 'h4','h5', 'h6', 'p', 'td', 'th'], attributes: { 'class': 'align-right' }}
- { name: "align-justify", element: ['h1', 'h2', 'h3', 'h4','h5', 'h6', 'p', 'td', 'th'], attributes: { 'class': 'align-justify' }}
- { name: "Interview", element: ['h5', 'p', 'span'], attributes: { 'class': 'ecx-interview' }}
- { name: 'Underline whole element', element: 'p', attributes: { 'class': 'p-carreer' } }
- { name: "Tiny Paragraph", element: "p", attributes: { 'class': 'p-tiny' }}
# Inline styles
- { name: 'Underline whole element', element: 'p', attributes: { 'class': 'p-carreer' } }
- { name: "Important", element: "span", attributes: { 'class': 'c-important' }}
- { name: "Tiny Word", element: "span", attributes: { 'class': 'c-tiny' }}
# List styles
- { name: 'Underline whole element', element: 'p', attributes: { 'class': 'p-carreer' } }
- { name: 'UL Style 2', element: 'ol', attributes: { 'class': 'ul-style2' } }
- { name: 'No UL Bullets', element: 'ul', attributes: { 'class': 'no-bullet' } }
# Link styles
- { name: "External Link", element: "a", attributes: { class: "external-link"} }
- { name: "Arrow-link", element: "a", attributes: { class: "ecx-explore-arrow-link more d-flex align-items-center"} }
# Form styles
- { name: "Table Responsive", element: "table", attributes: { 'class': 'contenttable table-responsive' } }
toolbar:
- [ 'Link', 'Unlink', 'Anchor', 'Table', 'SpecialChar', 'CodeSnippet', 'Youtube' ]
- [ 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock' ]
- [ 'NumberedList', 'BulletedList']
- [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord' ]
- [ 'Undo', 'Redo', 'RemoveFormat', 'ShowBlocks' ]
- "/"
- [ 'Format', 'Styles','Size' ]
- [ 'Bold', 'Italic', 'Underline', 'Blockquote', 'Subscript', 'Superscript']
- [ 'Source', 'Maximize', 'About']
extraPlugins:
- justify
- specialchar
- showblocks
- codesnippet
- font
justifyClasses:
- align-left
- align-center
- align-right
- align-justify
codeSnippet_theme: 'monokai_sublime'
removePlugins:
- image
processing:
allowTags:
- iframe
I've tried to import some other .yaml (full, processing, ... ) Files or to include the official font plugin from ckeditor but nothing work.
I'm using TYPO3 8.7.16.
The configuration looks like this in the backend: TYPO3 Backend custom configuration ckeditor
Thank you!
Using your configuration:
toolbar:
- [ 'Format', 'Styles','FontSize' ]
Instead of
toolbar:
- [ 'Format', 'Styles','Size' ]
See:
CKEditor 4 - how to add font family and font size controls to the toolbar

TYPO3 CKEditor – configuration not working

I have an TYPO3 8.7.7 installation and I am using rte_ckeditor. I am trying to configure the editor – but it seems not to work.
When I set RTE.default.preset = full or anything else nothing changes in my backend form.
But I need to configure some individual options. So I set the default preset to my own YAML file (RTE.default.preset = mytemplate) which is also registered in my extension ext_localconf.php with
$GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['mytemplate'] = 'EXT:mytemplate/Configuration/RTE/rte.yaml';
I have cleared typo3temp Folder, system caches via backend, all caches via install tool, deactivated and reactivated my template extension.
I also do not change anything in my backend form at the RTE.
The only thing it did sometimes, when I clear the system cache in backend and save the backend form TYPO3 shows me syntax error in my YAML file – which are all solved now, but it also do not show anything again. Just the default RTE...
My YAML file has nothing special... just come classes and the format tags "pre" relaced with "h6"
imports:
- { resource: "EXT:rte_ckeditor/Configuration/RTE/Processing.yaml" }
- { resource: "EXT:rte_ckeditor/Configuration/RTE/Editor/Base.yaml" }
- { resource: "EXT:rte_ckeditor/Configuration/RTE/Editor/Plugins.yaml" }
editor:
config:
contentsCss: ["EXT:mytemplate/Resources/Public/css/rte/rte.css"]
format_tags: "p;h1;h2;h3;h4;h5;h6"
stylesSet:
- { name: "align-left", element: ['h1', 'h2', 'h3', 'h4','h5', 'h6', 'p', 'td', 'th'], attributes: { 'class': 'align-left' }}
- { name: "align-center", element: ['h1', 'h2', 'h3', 'h4','h5', 'h6', 'p', 'td', 'th'], attributes: { 'class': 'align-center' }}
- { name: "align-right", element: ['h1', 'h2', 'h3', 'h4','h5', 'h6', 'p', 'td', 'th'], attributes: { 'class': 'align-right' }}
- { name: "align-justify", element: ['h1', 'h2', 'h3', 'h4','h5', 'h6', 'p', 'td', 'th'], attributes: { 'class': 'align-justify' }}
- { name: "Headline Stil 1", element: ['h1', 'h2', 'h3', 'h4','h5', 'h6'], attributes: { 'class': 'headline-style-1' }}
- { name: "Headline Stil 2", element: ['h1', 'h2', 'h3', 'h4','h5', 'h6'], attributes: { 'class': 'headline-style-2' }}
- { name: "Headline Stil 3", element: ['h1', 'h2', 'h3', 'h4','h5', 'h6'], attributes: { 'class': 'headline-style-3' }}
- { name: "Headline Stil 4", element: ['h1', 'h2', 'h3', 'h4','h5', 'h6'], attributes: { 'class': 'headline-style-4' }}
- { name: "Button-Link Primär", element: ['a'], attributes: { 'class': 'rte-btn-primary' }}
- { name: "Button-Link Sekundär", element: ['a'], attributes: { 'class': 'rte-btn-secondary' }}
- { name: "Button-Link Tertiär", element: ['a'], attributes: { 'class': 'rte-btn-tertiary' }}
toolbarGroups:
- { name: styles, groups: [ styles, format ] }
- { name: basicstyles, groups: [ basicstyles ] }
- { name: paragraph, groups: [ list, indent, blocks, align ] }
- { name: links, groups: [ links ] }
- { name: clipboard, groups: [ clipboard, cleanup, undo ] }
- { name: editing, groups: [ spellchecker ] }
- { name: insert, groups: [ insert ] }
- { name: tools, groups: [ table, specialchar ] }
- { name: document, groups: [ mode ] }
justifyClasses:
- align-left
- align-center
- align-right
- align-justify
extraPlugins:
- justify
removePlugins:
- image
removeButtons:
- Anchor
- Underline
- Strike
- Styles
What is the trick to get my config working?!
In my case I was using DCE Extension – an the preset got ignored. To use any preset use this DCE field Config:
<config>
<type>text</type>
<rows>5</rows>
<cols>30</cols>
<eval>trim,required</eval>
<enableRichtext>1</enableRichtext>
<richtextConfiguration>mypreset</richtextConfiguration>
</config>
I informed the Ext developer of DCE Ext and he updated the RTE Config "preset" already.

Sencha touch 2~add, delete, update a data record by using jersey

I am new for sencha touch. I need to add , update a data record detail. But I don't have any idea. Here is my sample code
View.js
Ext.define('bluebutton.view.BlueButton.Loyalty', {
extend: 'Ext.Container',
xtype: 'loyaltycard',
requires: [
'bluebutton.view.BlueButton.TransactionList',
'bluebutton.view.BlueButton.MemberPopUp',
'bluebutton.view.BlueButton.MemberDetail',
'Ext.ux.keypad.Keypad',
'Ext.Img'
],
config: {
// iconCls: 'add_black',
// title :'Loyalty Point',
styleHtmlContent: true,
cls: 'styledContent',
//
layout: 'hbox',
border: 3,
ui: 'round',
defaults: {
margin : '10 10 10 10',
padding : 10
},
items :[
{
flex: 1,
cls :'containerRadious' ,
xtype :'container',
items :[
{
xtype: 'fieldset',
title: 'Welcome, new member ~<i><u>Kenny</u></i>',
defaults: {
labelWidth: '35%',
style: 'font-size:1.0em'
},
items: [
{
xtype: 'image',
src: 'resources/images/user3.png',
height: 100,
margin:20
},
{
xtype: 'textfield',
name : 'Name',
label: 'Name',
value :'Kenny Chow',
readOnly: true
},
{
xtype: 'textfield',
name : 'Age',
label: 'Age',
value :'20',
readOnly: true
},
{
xtype: 'textfield',
name : 'Point Available',
label: 'Point Available',
value :'50',
id :'pointAvalaible',
readOnly: true
},
{
xtype: 'textfield',
name : 'Last Visited',
label: 'Last Visited',
value :'27/12/2012 11:53 AM',
readOnly: true
},
{
xtype:'button',
text: 'Add',
handler: function() {
}
},
{
xtype:'button',
text: 'Delete',
handler: function() {
}
},
{
xtype:'button',
text: 'update',
handler: function() {
}
}
]
}
]
},
{
flex: 2,
xtype :'container',
cls :'containerRadious' ,
items :[
{
centered : true,
xtype :'keypad',
margin : '30',
}
]
}
],
}
});
Model.js
Ext.define('bluebutton.model.BlueButton.MemberList', {
extend: 'Ext.data.Model',
config: {
idProperty: 'memberModel',
fields: [
{ name: 'memberId' },
{ name: 'name' },
{ name: 'messages' },
{ name: 'imgUrl' },
{ name: 'age' },
{ name: 'address' },
{ name: 'pointAvalaible' },
{ name: 'lastVisited' },
]
}
});
Store.js
Ext.define('bluebutton.store.BlueButton.MemberList', {
extend: 'Ext.data.Store',
requires: [
// 'bluebutton.model.BlueButton.MemberList'
],
config: {
grouper: {
groupFn: function (record) {
return record.get('name')[0];
}
},
proxy: {
type: 'ajax',
api: {
create : 'index.php?r=show/add',
read : 'index.php?r=show/read',
update : 'index.php?r=show/update',
destroy: 'index.php?r=show/delete'
}
},
model :'memberModel',
storeId :'memberStore',
autoLoad:false,
pageSize: 5,
clearOnPageLoad: false,
data: [{
memberId: 'Kenny',
name: 'Kenny Chow',
imgUrl: 'resources/images/user3.png',
age: '20',
address:'The Business Centre , 61 Wellfield Road , Roath, Cardiff, CF24 3DG',
pointAvalaible :'10',
lastVisited: '26/11/2012, 11:52 AM',
}, {
memberId: 'Anthony',
name: 'Anthony Tan',
imgUrl: 'resources/images/user3.png',
age: '21',
address:'3 Edgar Buildings , George Street , Bath , England , BA1 2FJ',
pointAvalaible :'45',
lastVisited: '27/11/2012, 09:52 AM'
},
{
memberId: 'Nicholas',
name: 'Nicholas Chen',
imgUrl: 'resources/images/user3.png',
age: '22',
address: '91 Western Road , Brighton ,East Sussex ,England ,BN1 2NW ',
pointAvalaible :'30',
lastVisited: '30/11/2012, 15:52 PM'
},
{
memberId: 'Admin2',
name: 'Admin2',
imgUrl: 'resources/images/user3.png',
age: '30',
address: '50 Eestern Road , Brighton ,West Sussex ,England ,BN1 34W ',
pointAvalaible :'120',
lastVisited: '01/12/2012, 15:52 PM'
},
{
memberId: 'Ahmad',
name: 'Ahmad Mohamad',
imgUrl: 'resources/images/user3.png',
age: '25',
address:'Office 33 ,27 Colmore Row ,Birmingham, England ,B3 2EW',
pointAvalaible :'32',
lastVisited: '30/11/2012, 18:52 PM'
}
,
{
memberId: 'AronTan',
name: 'Tan Wan Hua',
imgUrl: 'resources/images/user3.png',
age: '26',
address:'Office 33 ,27 Colmore Row ,Birmingham, England ,B3 2EW',
pointAvalaible :'32',
lastVisited: '30/11/2012, 18:52 PM'
},
{
memberId: 'Justin',
name: 'Wong Choon Wah',
imgUrl: 'resources/images/user3.png',
age: '25',
address:'Office 33 ,27 Colmore Row ,Birmingham, England ,B3 2EW',
pointAvalaible :'32',
lastVisited: '30/11/2012, 18:52 PM'
},
{
memberId: 'User5',
name: 'User2',
imgUrl: 'resources/images/user3.png',
age: '25',
address:'Office 33 ,27 Colmore Row ,Birmingham, England ,B3 2EW',
pointAvalaible :'32',
lastVisited: '30/11/2012, 18:52 PM'
}
]
}
});
Please provide me some example
I suspect you need to get started using Jersey for implementing the server side code.
Here's what I would suggest:
Start listing down the services that you would need. (Add/ Update data record detail)
Have a look at this tutorial by mkyong for getting started with Jersey.
Implement the first cut which works.
Try to improve and iterate by reading more about Jersey features (Annotations, POJO Mapping, ExceptionMapper etc.)

Resources