TinyMCE Spellcheck expected JSON Response in Rails -


i using tinymce , have rolled own spellchecker using ffi-hunspell.

i rendering hardcoded response when click spell check button in wysiwyg editor, says there aren't misspelled words.

render :json => {:id => "#{params[:id]}", :result => {"presents" => ["presnts"], "motor" => ["moors"]}}.to_json 

so, json supposed like?

i using tinymce_rails gem. have thought using newer version. anyways, found link describes in detail how request/response should look: https://github.com/spohlenz/tinymce-rails. effectively, response older version of tinymce this:

render :json => ({:id => nil, :result => ['badk', 'wirds'], :error => nil}).to_json

also, uses second request suggestions. , should like:

render :json => ({:id => nil, :result => ['bad', 'bed'], :error => nil}).to_json 

Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -