PDA

View Full Version : Add 'Format' to CKEditor


Amit86
01-05-2012, 02:16 PM
Hi all,

I am using VB 4.1.x and im trying to add formart and style to my CKEditor
tried using google, looking at the website itself, couldnt find the way to add those 'already included' plugins to CKEditor
Ive added a picture of CKEditors demo (from their website) of the 2 features im looking for


https://vborg.vbsupport.ru/attachment.php?attachmentid=135487&stc=1&d=1325776595

Could anyone help out?

Thanks,
Amit

Amit86
01-07-2012, 12:39 AM
a clue would be nice :(

Lynne
01-07-2012, 04:07 PM
Adding the buttons is the easy part:
hook location - editor_toolbar_filter
$toolbar[] = array('Styles','Format');

Getting them to actual work is going to take some effort. If you get it working, it would be nice if you would post what you did.

Amit86
01-08-2012, 05:37 AM
CKEditor has been public for a while, Are you sure there is no available guide on how to enable all\part of its available plugins?

kh99
01-08-2012, 02:58 PM
Like Lynne said above, the problem is not enabling the features but integrating them with vb. I think the issue is that the CKEditor style and format features produce HTML, but vb saves posts as plain text with bbcode. So you can enable the style and format drop-down menus in the editor, but when you submit it the formatting will have to be converted to bbcode or else discarded.

Amit86
01-09-2012, 05:42 AM
what if HTML was enabled in the thread/article
would that do the trick?

kh99
01-09-2012, 12:26 PM
Well, I tried that and it still has problems, although I did get part of the colored text to post. So maybe what I posted above isn't the main problem, but I believe it has something to do with WYSIWYG to BBcode conversion.

Amit86
01-09-2012, 01:23 PM
Is it possible to use true CKEditor with vbulletin and disable the one vb offers?

on that note, you might assist me on another matter,
if i copy code that has tabs (or indents) WYS stips them, do you know a way to disable that strip?

kh99
01-09-2012, 01:31 PM
I tried it and I see what you mean about tabs, but I don't know. I do know that in html all strings of white space get condensed to a single space, so I don't think there's any easy way to represent tabs, except maybe a string of $nbsp;? It's not really my area, I'm more of a programmer.

Amit86
01-09-2012, 01:50 PM
but as you said vB uses plain text and should strip tabs as html does
in fact, it doesnt even add a space it just strips the tabs

kh99
01-09-2012, 01:55 PM
Oh...I didn't see that, what I saw was that the tabs became spaces.

Amit86
01-09-2012, 02:07 PM
hello no tabs
hello 1tab
hello2tabs
hello3tabs
hello space

try posting here at the forums with tabs, this is the result
ideas?

kh99
01-09-2012, 02:30 PM
I get this:

hello no tabs
hello 1tab
hello 2tabs
hello 3tabs
hello space

Edit: and when I edit this post I see it goes back to displaying the tabs, so it must be saving the tabs in the pagetext.
And if you view the source of this page you can see there's a difference between your post and mine - I have no idea why but I don't think it's vBulletin.

Anyway, I'm sorry I'm not being much help, I just don't know where the problem is.

coolegg
02-15-2012, 01:35 AM
This is just slightly off-topic but I am surprised there are not more requests and solutions for "CKEditor in vB" enhancements. I'm trying to find a way to enable the full image features of CKEditor in vB and running into a drought of information.

footnote: by "full image features of CKEditor" I mean like the below screenshot - images inserted ("inline") into the posts, resizing options, float left and right options, border and spacing options and such. The image capabilities of the default vB-CKEditor configuration are an embarrassment. Users are use to so much better on other websites such as Wordpress.

Lynne
02-15-2012, 03:52 PM
There are quite a few options already for attached images.

RedHotChili
02-15-2012, 09:21 PM
There are quite a few options already for attached images.

Where do you see those?

coolegg
02-16-2012, 04:38 PM
There are quite a few options already for attached images.

Lynne, I have never seen anything like that on my Forums. But I am excited! How do I get that? I've gone over my Editor Interface options and Attachment options and don't see anything that sounds like the right setting.

I am using vB 4.1.7.

Any suggestions are much appreciated.

coolegg
02-17-2012, 01:06 AM
There are quite a few options already for attached images.

Hi Lynne,

Okay I see I am able to get something similar to your screenshot by being in WYSIWYG mode and so I have switched my members over to WYSIWYG mode by default. But my image options are still a bit different than yours - not as many, in particular I am missing the ability to link images to a URL as yours screenshot shows. See my screenshot attached. Any idea how I can get the full(er) array of options that you have? Maybe you are a higher version than me, 4.1.8 or higher?

Thanks in advance for any help you can provide. And my apologies to the original poster for taking this thread a bit off-topic.

Lynne
02-17-2012, 01:20 AM
My screenshot was from the 4.1.10 WYSIWYG attachment editor.

coolegg
02-17-2012, 02:31 AM
Thanks Lynne!