Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript [Solved] Apply CKEDITOR to all elements

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #185822
    Anonymous
    Inactive

    I want to apply the ckeditor inline editing to all elements with a specific attribute.

    The problem is that its only applying to the very first element with the attribute, and not the rest.

    How can i apply the ckeditor inline text editing to all elements with a specific attribute?

    $("#page.edit-on [data-PB-editable-text]").ckeditor();

    PS: im using ckeditor on elements that have contenteditable=”true” and not textareas.

    #185853
    jamygolden
    Member

    Try this:

    $('[contenteditable="true"]').each(function(){
        $(this).ckeditor();
    })
    
    #185867
    Anonymous
    Inactive

    Weird. I already tried this and it didn’t work, I tried it again and it worked perfectly. Thanks

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.