Wednesday, April 23, 2014

How do you set and get ckeditor value by javascript



How do you get data from ckeditor ?
use below code to get data from ckeditor , assume your editor name is 'description'

alert(CKEDITOR.instances.description.getData());

How do you set data in ckeditor ?
use below code to set data in ckeditor , assume your editor name is 'description'

CKEDITOR.instances.description.setData( '<h1>Hello Ubed Khan PHP programmer</h1>' );
Read More »

Monday, April 21, 2014

How to build cordova project

How to build  cordova project

Step 1) Make sure Node.js is installed on you computer. If not installed please install latest version from http://nodejs.org/

Step 2)  Open terminal and type the following command  to install the Cordova CLI
 sudo npm install -g cordova

Step 3) Change directory where you want to store project by following command
cd ~/project_directory

step 4) Create a project called “myfirstapp” by following command
cordova create myfirstapp com.yourname.myfirstapp myfirstapp

step 5)  Change directory to myfirstapp by following command
cd myfirstapp

step 6) Add platform support for your app here we are adding platform support for IOS by following command
cordova platforms add ios

step 7) Now build cordova project
You need the iOS SDK installed on your computer to build an iOS version of your application using the following command
cordova build ios


The project is built in the myfirstapp/platforms/ios folder. Double-click Workshop.xcodeproj to open the project in XCode, and run it in the emulator.

You will see "Device Ready".....

Note: this guide will work only on Mac operating system
Read More »