Welcome Guest! To enable all features please Login or Register.
Options
View
Go to last post Go to first unread
Offline francoz  
#1 Posted : 03 September 2015 14:10:52(UTC)
francoz


Rank: YAF Lover

Reputation:

Joined: 10/03/2011(UTC)
Posts: 56

Thanks: 35 times
Was thanked: 11 time(s) in 8 post(s)
I am using YAF 2.2.3 BETA 20150707
There is no way I can post a table from CKEditor HTML. Is it a problem of my version? Is there a way to use the old CKEditor I had on version 1.9?

Edited by user 26 August 2016 18:23:23(UTC)  | Reason: Not specified

Sponsor
Offline Zero2Cool  
#2 Posted : 03 September 2015 14:12:08(UTC)
Zero2Cool


Rank: YAF Leader

Reputation:

Medals: Medal of Honor for the Support Knight: Given to a community member who has assisted lots and lots of people!

Joined: 26/04/2011(UTC)
Posts: 1,069
Man
United States
Location: in a van down by the river

Thanks: 235 times
Was thanked: 101 time(s) in 92 post(s)
Originally Posted by: francoz Go to Quoted Post
I am using YAF 2.2.3 BETA 20150707
There is no way I can post a table from CKEditor HTML. Is it a problem of my version? Is there a way to use the old CKEditor I had on version 1.9?


I am not 100% on this, but I think you have to allow the table HTML tags. I'll see what I can find.


Edit. We can post tables with CKEditor HTML. We have to click Source and do it the long way though using the HTML tags.

Code:

<table><tbody><tr><td>Hello
</td><td>World
</td></tr>
<tr>
<td>stuff goes here
</td>
<td>
more stuff is placed here</td>
</tr></tbody></table>

Edited by user 03 September 2015 14:16:53(UTC)  | Reason: Not specified

thanks 1 user thanked Zero2Cool for this useful post.
francoz on 03/09/2015(UTC)
Offline francoz  
#3 Posted : 03 September 2015 19:08:39(UTC)
francoz


Rank: YAF Lover

Reputation:

Joined: 10/03/2011(UTC)
Posts: 56

Thanks: 35 times
Was thanked: 11 time(s) in 8 post(s)
Indeed working, but far from an acceptable solution for users who do not know html. Hope it will be fixed in future versions.
Offline Zero2Cool  
#4 Posted : 03 September 2015 19:44:19(UTC)
Zero2Cool


Rank: YAF Leader

Reputation:

Medals: Medal of Honor for the Support Knight: Given to a community member who has assisted lots and lots of people!

Joined: 26/04/2011(UTC)
Posts: 1,069
Man
United States
Location: in a van down by the river

Thanks: 235 times
Was thanked: 101 time(s) in 92 post(s)
Originally Posted by: francoz Go to Quoted Post
Indeed working, but far from an acceptable solution for users who do not know html. Hope it will be fixed in future versions.


You can add the Table option by editing the ckeditor_init.js file.

If you examine the code I copied below you will see I added the ['Table'], parameter right after Source.

File can be found here.
...\forum\scripts\ckeditor\ckeditor_init.js

Code:

jQuery(document).ready(function() {
    var yafCKEditor = jQuery('textarea.YafTextEditor').ckeditor({
        extraPlugins: 'autosave,bbcodehtml,syntaxhighlight,bbcodeselector,codemirror,textselection,wordcount',
        autosave_saveDetectionSelectors: "a[id*='_PostReply'],a[id*='Cancel']",
        toolbar: [
            ['Source'],
            ['Table'],
            ['Cut', 'Copy', 'Paste'], ['Undo', 'Redo', '-', 'Find', 'Replace', '-', 'SelectAll', 'RemoveFormat'],
            ['-', 'NumberedList', 'BulletedList'],
            ['-', 'Link', 'Unlink', 'Image'],
            ['Blockquote', 'syntaxhighlight', 'bbcodeselector'],
            ['SelectAll', 'RemoveFormat'],
            ['About'],
            '/',
            ['Bold', 'Italic', 'Underline', '-', 'TextColor', 'Font', 'FontSize'],
            ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'PasteText', 'PasteFromWord'],
            ['Outdent', 'Indent']
        ],
        entities_greek: false,
        entities_latin: false,
        language: editorLanguage,
        contentsCss: 'Scripts/ckeditor/yaf_contents.css',
        codemirror:
        {
            mode: 'bbcodemixed'
        }
    });

    jQuery("a[id*='_PostReply'],a[id*='_Save']").click(function () {
        yafCKEditor.editor.updateElement();
    });

    yafCKEditor.editor.addCommand('highlight', {
        modes: { wysiwyg: 1, source: 1 },
        exec: function (editor) {
            var selection = editor.getSelection();
            if (!selection) {
                editor.insertHtml('[h]' + '[/h]');
            }
            var text = selection.getSelectedText();

            editor.insertHtml('[h]' + text + '[/h]');
        }
    });

    yafCKEditor.editor.addCommand('postmessage', {
        modes: { wysiwyg: 1, source: 1 },
        exec: function () {
            yafCKEditor.editor.updateElement();
            if (jQuery("a[id*='_PostReply']").length) {
                __doPostBack(jQuery("a[id*='_PostReply']").attr('id').replace('_', '$').replace('_', '$'), '');
            } else if (jQuery("a[id*='_Save']").length) {
                __doPostBack(jQuery("a[id*='_Save']").attr('id').replace('_', '$').replace('_', '$'), '');
            }
        }
    });
});

Edited by user 03 September 2015 19:52:28(UTC)  | Reason: Not specified

thanks 1 user thanked Zero2Cool for this useful post.
francoz on 03/09/2015(UTC)
Offline francoz  
#5 Posted : 04 September 2015 08:48:13(UTC)
francoz


Rank: YAF Lover

Reputation:

Joined: 10/03/2011(UTC)
Posts: 56

Thanks: 35 times
Was thanked: 11 time(s) in 8 post(s)
Tried this, but nothing changes. No button on the toolbar and no way to paste tables straight into the editor as it happened with YAF 1.9. Server rebooted after changes.
Have you tested this on your own install?
Offline Zero2Cool  
#6 Posted : 04 September 2015 15:20:23(UTC)
Zero2Cool


Rank: YAF Leader

Reputation:

Medals: Medal of Honor for the Support Knight: Given to a community member who has assisted lots and lots of people!

Joined: 26/04/2011(UTC)
Posts: 1,069
Man
United States
Location: in a van down by the river

Thanks: 235 times
Was thanked: 101 time(s) in 92 post(s)
Originally Posted by: francoz Go to Quoted Post
Tried this, but nothing changes. No button on the toolbar and no way to paste tables straight into the editor as it happened with YAF 1.9. Server rebooted after changes.
Have you tested this on your own install?


Yes. If you go to www.PackerPeople.com you can see it for yourself. You have to use the CKEditor HTML editor though.
Offline francoz  
#7 Posted : 07 September 2015 13:05:02(UTC)
francoz


Rank: YAF Lover

Reputation:

Joined: 10/03/2011(UTC)
Posts: 56

Thanks: 35 times
Was thanked: 11 time(s) in 8 post(s)
Working on my forum, too.
Up to version 1.9.X you could paste an existing table into the editor, taking it from Excel, for example, and that was really a nice feature. Now there is a workaround, but not as nice. Can live with that, anyway.
Offline francoz  
#8 Posted : 23 August 2016 09:23:05(UTC)
francoz


Rank: YAF Lover

Reputation:

Joined: 10/03/2011(UTC)
Posts: 56

Thanks: 35 times
Was thanked: 11 time(s) in 8 post(s)
Well, just to let everybody know that pasting tables from external apps (Excel, for example) straight into visual editor is now working on CK Editor HTML. Forum version 2.2.3.
thanks 1 user thanked francoz for this useful post.
Zero2Cool on 24/08/2016(UTC)
Rss Feed  Atom Feed
Users browsing this topic
guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Notification

Icon
Error