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


Rank: YAF Lover

Reputation:

Joined: 3/10/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 Friday, August 26, 2016 10:23:23 AM(UTC)  | Reason: Not specified

Sponsor
Offline Zero2Cool  
#2 Posted : Thursday, September 3, 2015 6:12:08 AM(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: 4/26/2011(UTC)
Posts: 1,062
Man
United States
Location: in a van down by the river

Thanks: 234 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 Thursday, September 3, 2015 6:16:53 AM(UTC)  | Reason: Not specified

thanks 1 user thanked Zero2Cool for this useful post.
francoz on 9/3/2015(UTC)
Offline francoz  
#3 Posted : Thursday, September 3, 2015 11:08:39 AM(UTC)
francoz


Rank: YAF Lover

Reputation:

Joined: 3/10/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 : Thursday, September 3, 2015 11:44:19 AM(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: 4/26/2011(UTC)
Posts: 1,062
Man
United States
Location: in a van down by the river

Thanks: 234 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 Thursday, September 3, 2015 11:52:28 AM(UTC)  | Reason: Not specified

thanks 1 user thanked Zero2Cool for this useful post.
francoz on 9/3/2015(UTC)
Offline francoz  
#5 Posted : Friday, September 4, 2015 12:48:13 AM(UTC)
francoz


Rank: YAF Lover

Reputation:

Joined: 3/10/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 : Friday, September 4, 2015 7:20:23 AM(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: 4/26/2011(UTC)
Posts: 1,062
Man
United States
Location: in a van down by the river

Thanks: 234 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 : Monday, September 7, 2015 5:05:02 AM(UTC)
francoz


Rank: YAF Lover

Reputation:

Joined: 3/10/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 : Tuesday, August 23, 2016 1:23:05 AM(UTC)
francoz


Rank: YAF Lover

Reputation:

Joined: 3/10/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 8/23/2016(UTC)
Rss Feed  Atom Feed
Users browsing this topic
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