The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
|||
|
|||
Yeah, I forgot that you were using vb3, but they just changed the functions into a class, so it's pretty much the same thing. Here's the modified parse_style_attribute function I came up with:
PHP Code:
Unfortunately, what doesn't work right is the font dropdown in the editor (at least in vb4). You can use the menu to set the size of selected text, but it won't showthe size of selected text or let you change the size if text already has a size (I think probably because it doesn't recognize the <span... way of doing it, so it just tries to add another on the outside, which does nothing). I don't know what to do about hat, or whether it needs to be fixed in js somewhere, but I don't have time to look at that. (Maybe it will work in vb3, or at least be an easier problem to fix). Edit: No, same problem in vb3. But you've already looked at the js so maybe you have a head start. It looks like color, font, bold, italics, etc are done with attributes, so maybe you can find where those are handled and add font-size like we did in the php. I think the goal of the Op was to change the sizes associated with the numbers, so if that's true you might be able to go back to using <font> and get everything to work just using the changes to the tag list, but maybe you have a different goal. |
#12
|
|||
|
|||
Thank you for your reply. It's working, but as you stated, dropdown problem and extra spans make it unusable at the moment. I'm still searching for the source of <font size="x"> tags (they are added when you select a text and choose a size for the first time, a refresh converts them to span).
I attached my uncompressed vbulletin_textedit.js. Two instances of font tags are converted to span and i really can't find where else <font size and <font face tags are generated. I also noticed that <font face, <font color and <font size tags are merged into one tag like: Code:
<font color="DeepSkyBlue" face="Franklin Gothic Medium" size="7">test</font> |
#13
|
|||
|
|||
I think for the ckeditor it might be in clientscript\ckeplugins\enhancedsourcearea\plugin. js, but I'm not sure if that file is used directly, because I seem to remember that all the ckeditor plugins are combined into one file. But I tried to search for a section of the code and it was only found once, so I could be wrong about that. I suppose I should just try changing something in that file and see if it has any effect.
|
#14
|
|||
|
|||
vBulletin 3 does not have a clientscript\ckeplugins\ folder It's really weird. I can't figure out what else building the WYSIWYG editor. I made a mass search in all *.js and *.php files but could not find any other <font tags.
|
#15
|
|||
|
|||
Oops, of course you're right. Then it looks like you must be looking in the right place. Maybe I'll look a little if I get a chance later (although I don't know anything about how the editor works).
|
Благодарность от: | ||
NeutralizeR |
#16
|
|||
|
|||
OK, I think the problem has to do with the section in vbulletin_textedit.js that starts with:
Code:
/** * Set Size Context */ this.set_size_context = function(sizestate) That section tries to call a function queryCommandValue('fontsize'), which I guess returns the numeric value of the font size of the selected text (like you set in a <font> tag), but doesn't know how to return the value if the font size is being set by CSS. A possible solution seem to have something to do with selection ranges, but I couldn't figure it out in the few minutes I spent on it. I figured maybe you know more js and could figure it out. |
#17
|
|||
|
|||
Yes, i'd seen that section but could not think of any ways to alternate the code. I posted a question @ stackoverflow and if i get an answer I will post here. Thanks.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|