Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Show in Mobile Theme and when editing existing Discussions

This discussion is related to the Vanilla CKEditor addon.
Dr_SommerDr_Sommer Dr. of tender Programing ;) ✭✭
edited August 2014 in Vanilla 2.0 - 2.8

Vanilla Ver. 2.1.1
Your Plugin is working with Crome, IE 11, Firefox, Opera 23
NOT working with Opera 12.x


great!!! Wonderfuulll!!! Thanks for doing this nice Editor... :smile:

I'm still searching for a working WYSIWYG Editor... with all the other plugins I have issues an my Users are getting more and more Impatient... ;(

My biggest Hope was the "Advanced Editor" for Vanilla, but unfortunately its postponed to Ver. 2.3... ;(

Two questions:

  1. Is it possible to activate the Plugin for Mobile Themes?
    I've tried the 'MobileFriendly' => TRUE, in default.php, but it's not working... how can I force it to show in Mobile Theme?

  2. When editing existing discussions, it's not showing up... all I can see is the Sourcecode of the Entry...

ThX in advance... ;)


  • Dr_SommerDr_Sommer Dr. of tender Programing ;) ✭✭

    With "existing discussions" I meant "existing Posts"... :blush::smiley:

  • K17K17 Français / French Paris, France ✭✭✭

    For the 2. That's an error. On my installation, it works (V2.1.1).
    Try to reinstall it.

  • Dr_SommerDr_Sommer Dr. of tender Programing ;) ✭✭
    edited August 2014

    hmm... tried reinstall and changed Theme to baseline+... no success... ;(

    Arghh... always so close, but then always something is not working... ;(

    other question:

    in default.php

    public function Base_Render_Before(&$Sender)

    shouldn't it be:

    public function Base_Render_Before($Sender) (whitout "&") ??

  • Yes, objects are passed by reference already in php so &$Sender is redundant an may cause errors.

    grep is your friend.

  • Dr_SommerDr_Sommer Dr. of tender Programing ;) ✭✭

    ThX, X00... ;)

    Found the Solution for problem Nr. 1:

    If you want to activate the Editor in Mobile Theme, find and change in default.php:

    <script type="text/javascript">
          $().ready(function() {


    <script type="text/javascript">
         CKEDITOR.env.isCompatible = true;
          $().ready(function() {

    Really a pitty that this one is NOT in the Documentation!!! ;(


    How can I research the error, that if I edit existing posts, the CKEditor is not showing up?
    I tried to enable DEBUG in Config, but there is no error showing up...


    ANY Help is appreciated... ;)

  • hgtonighthgtonight ∞ · New Moderator

    Editing comments inline?

    The editor is only attached once after the page has loaded.

    You need to attach the ckeditor as these elements are loaded:

    jQuery(document).on('change', 'textarea.BodyBox', function() {

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Dr_SommerDr_Sommer Dr. of tender Programing ;) ✭✭

    hmm... sorry... as you Know, I'm really at the beginning... no clue where to put the Code above... :blush::blush:
    Tried to put it into my above Script tag, but I think thats not the correct place as it is not working.. :open_mouth:

    Could you explain it to me in a noob language?
    Thank you... :* ;)

  • cant edit comment with html buttons

  • digit42digit42 New
    edited August 2014

    Put this somewhere in your template (page html) after jquery has been loaded:

    $(document).ready(function () { $("textarea.BodyBox").livequery(function () { var frm = $(this).closest("form"); ed = jQuery(this).ckeditor(); this.editor = ed; }); });

    An alternative approach could be to modify the default.php and change the function Base_Render_Before so that it looks like that:
    public function Base_Render_Before($Sender) { $Sender->AddJSFile('plugins/CKEditor/ckeditor.js'); $Sender->AddJSFile('plugins/CKEditor/adapters/jquery.js'); $Sender->Head->AddString(<<<EOF <script type="text/javascript"> CKEDITOR.env.isCompatible = true; jQuery(document).ready(function() { $('textarea.BodyBox').ckeditor(); $("textarea.BodyBox").livequery(function () { var frm = $(this).closest("form"); ed = jQuery(this).ckeditor(); this.editor = ed; }); }); </script> EOF ); }
    But this was not tested by me. I currently use the first approach.

    Credit: the snippet was taken from the cleditor plugin and modified a bit to work with ckeditor

  • @digit42 thanks, the alternative approach work like charm!!!

    I hope that @somwhatparanoid‌ add this by default.

  • Dr_SommerDr_Sommer Dr. of tender Programing ;) ✭✭
    edited August 2014

    YESS!!! Thats it!!!!
    Thanx hgtonight, Thanks sooooo much, digit42!!!!

    Finally a fully working Editor... :smile:

    If somebody needs Help with configuring the Editor, for example adding mew Smilies, changing Buttons etc., let me Know... did some digging with CKEditor, no problem sharing my findings... ;)

    I've also found a way how it works with Opera 12!!! ;)

  • @Dr_Sommer would love a quick tutorial on how to add a button that adds custom HTML markups to the editor! I have a plugin that is a dice roller that uses but users have to go to <>Source and manually type it in. Would love to add a little button with a die that has a popup similar to a URL that says something like "Dice roll" and then you type in the 2d6 or whatever and it adds the to the text.

    Also, has anyone else noticed the popup for URL on the CKeditor pops up way up the page and not above the text box?

  • Dr_SommerDr_Sommer Dr. of tender Programing ;) ✭✭

    @pfaff: when stable, you'll be switching to the Advanced Editor, the core editor of V2.2...
    Take a look at it on the beta... ;)

  • @Dr_Sommer, should I just wait for the stable release of V2.2? Is that going to be a relatively soonish release you think?

  • Dr_SommerDr_Sommer Dr. of tender Programing ;) ✭✭

    not sure... i'm using the beta live, no problems... but it is not recommended... ;)
    But the advanced editor is IMHO superior to CKEditor in terms of compatibility especially mobile devices...

Sign In or Register to comment.