Page 1 of 1

Wysiwyg editor w/basic set of tools into my appery.io application. Can it be done?

Posted: Thu May 29, 2014 1:11 pm
by Dave Troxel

Is there a plug in out there that offers the ability to provide a wysiwg html editor inside of my application? Simple features like a few fonts, font styles, alignment, background and image adds...

Can it be done?


Wysiwyg editor w/basic set of tools into my appery.io application. Can it be done?

Posted: Thu May 29, 2014 2:19 pm
by Evgene Karachevtsev

Hello Dave,

We haven't got such plugin in appery.io. But you can implement this logic with JavaScript or try searching something similar in the internet.


Wysiwyg editor w/basic set of tools into my appery.io application. Can it be done?

Posted: Sat Jun 21, 2014 11:21 am
by stevew

Hi Dave,

I have implemented this is another platform and hoping to use it here (when my brain finally takes in all the new stuff here):

https://getsatisfaction.com/applicati...

The procedure will be different here but this might point you in the right direction.

I add an iFrame Widget and set its properties as follows: (the random thing ensures we get the latest version).

app.setProperty('iFrameItem','URL','http://www.wilsea.com/ckeditor2/edito...);

I get / set the property with

Code: Select all

 var contextMenuId = 'iframe_' + app.w('iFrameItem').base()[0].id; 
 document.getElementById(contextMenuId).contentDocument.getElementsByClassName('cke_wysiwyg_frame')[0].contentDocument.body.innerHTML = itemData; 

var newData = document.getElementById(contextMenuId).contentDocument.getElementsByClassName('cke_wysiwyg_frame')[0].contentDocument.body.innerHTML

I also had to set a timer event on the iframe load event so the iframe had loaded before entering data.

Code: Select all

 setTimeout(function(){ 
 var contextMenuId = 'iframe_' + app.w('iFrameItem').base()[0].id; 
 document.getElementById(contextMenuId).contentDocument.getElementsByClassName('cke_wysiwyg_frame')[0].contentDocument.body.innerHTML = itemData; 

 },3000) 

Let me know how you go on.

Cheers

SteveW