Jeremy,
It is pretty much up to how you want to do it. The code I posed would need
to go on in the page tag. Notice I'm directly adding the editor to a
specific tag, in this case ticket_problem. So I added it like so.
<extend tag="edit-page" for="Ticket">
<old-edit-page merge>
$(document).ready(function(){
$("#ticket_problem").kendoEditor();
});
</old-edit-page>
</extend>
This works fine but if you have a lot of fields you want to use the editor
on you'd have to extend a lot of page tags. Another option would be to add
it to the site wide page tag for all html fields like so.
<extend tag="page">
<old-page bottom-load-javascript merge >
<custom-javascript:>
$(document).ready(function(){
$(".html").kendoEditor({encoded: false});
});
</custom-javascript:>
</old-page>
</extend>
Notice now I'm adding it to all fields with the class of html. Hobo addes
the html class to all model fields with a type of :html so this would end
up adding the editor everyplace you have an html field on the entire site.
The down side to this is the code for the editor is added to all
pages wither you have an html field or not.
Bob
On Monday, October 8, 2012 12:27:02 PM UTC-4, Jeremy Savoy wrote:
>
> Thanks Bob -- looks easy enough. I've not used any custom javascript in
> hobo before - does that tag go into one of the site-wide dryml files or in
> your model specific index/new/show.dryml? Thanks again !
>
> On Saturday, October 6, 2012 5:03:09 PM UTC-4, Bob Sleys wrote:
>>
>> Just thought I would post I got this working at least I got the editor to
>> work on a textarea field quite easily.
>>
>> First I added the gem to the gem file
>> gem 'kendoui-rails'
>> and did a bundle install
>>
>> Now the docs say to run rails generate kendoui:install however that
>> bombed due to the css and js files now being where the installed extects
>> them so I just made the changes manually.
>>
>> To app/assets/javascripts/application.js I added
>> //= require kendo/kendo.web.min
>> right above the require_tree line
>>
>> To app/assets/stylesheets/front.scss I added
>> *= require kendo/kendo.common.min
>> *= require kendo/kendo.default.min
>> above the require_self line
>>
>> Then I just had to look at the ID hobo gave to my textarea field and
>> <custom-javascript:>
>> $(document).ready(function(){
>> $("#ticket_problem").kendoEditor();
>> });
>> </custom-javascript:>
>> to the tag that generates the field I wanted the Kendo editor on.
>>
>> Worked like magic. Note I haven't fully tested if the formatting the
>> editor added to the field all gets saved and output correctly
>> when viewed yet. But that would be a specific problem to the textarea
>> editor.
>>
>> Bob
>>
>> On Monday, October 1, 2012 3:25:36 PM UTC-4, Jeremy Savoy wrote:
>>>
>>> Vivek I don't really have any sample code - but a simple hobo app to
>>> demonstrate how to incorporate it might be quite useful - is this something
>>> that you could demonstrate ?
>>>
>>> On Wednesday, September 26, 2012 11:48:07 PM UTC-4, Vivek Sampara wrote:
>>>>
>>>> It seems to be pretty straight forward , Can you share the hobo code
>>>> you are using . I worked on lots of jquery plugins on hobo and 99% of the
>>>> problems were related to the jquery code itself.
>>>>
>>>> On Thu, Sep 27, 2012 at 2:21 AM, Jeremy Savoy <[email protected]>wrote:
>>>>
>>>>> I'm trying to use the Kendo UI widgets via the kendoui-rails gem, but
>>>>> having a hard time incorporating that into Hobo. I'm sure it must be
>>>>> simple, I've tried creating a tag definition for a single widget (per the
>>>>> example below) and using that tag in my "new.dryml" but without success.
>>>>>
>>>>> Here is the URL to the standard rails example ... maybe one of you can
>>>>> recommend a course of action. It would be nice to have an entire tag set
>>>>> for the Kendo UI widgets - perhaps something I can work on once I
>>>>> understand how to make any single widget run.
>>>>>
>>>>>
>>>>> http://docs.kendoui.com/getting-started/using-kendo-with/using-kendo-with-rails
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Hobo Users" group.
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msg/hobousers/-/SNLHiyc4MokJ.
>>>>> To post to this group, send email to [email protected].
>>>>> To unsubscribe from this group, send email to
>>>>> [email protected].
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/hobousers?hl=en.
>>>>>
>>>>
>>>>
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/hobousers/-/H3Nabu3R_goJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=en.