Posts: 166
Threads: 24
Joined: Jul 2012
2013-08-29, 00:07:39
(This post was last modified: 2013-08-29, 00:09:54 by lnickel .)
Hi all,
I was wondering if someone could help me. This has got to be easy but I can figure it out. I have looked though the wiki and read a few posts from Connie but still HAZY.
Problem: How in the heck do I get the gsconfig.php file to recognize the custom config file.
I went through the steps but I am unclear on this bit. What should I be calling in the [] area? Do I use the brackets? Do I put in the whole file-name of the js file ?
I basically need a custom file to get the line break problem out the code editor. I attached a screenshot - the code is really messy and hard to work with. I know this is not a GS thing BUT Im sure people have the same problem
Again thank you in advance for any help!!!!
PHP Code:
# WYSIWYG toolbars (advanced, basic or [custom config]) #define('GSEDITORTOOL', 'advanced'); & define ( 'GSEDITOROPTIONS' , "entities : false,customConfig : '../../../../theme/yourtheme-folder/yourconfigfile.js',skin: 'v2'" );
Attached Files
Thumbnail(s)
Posts: 6,266
Threads: 181
Joined: Sep 2011
hmm i have never seen source look liek that.
What gs version you on ?
and have you tried the beta ?
Posts: 166
Threads: 24
Joined: Jul 2012
(2013-08-29, 00:10:39) shawn_a Wrote: hmm i have never seen source look liek that.
What gs version you on ?
and have you tried the beta ?
Hi Shawn! I'm on 3.2.1 I haven't tried beta. Messy huh LOL!
Posts: 6,266
Threads: 181
Joined: Sep 2011
I know line breaking is annoying by why is your source indented so far ?
Posts: 6,266
Threads: 181
Joined: Sep 2011
PHP Code:
define ( 'GSEDITOROPTIONS' , "enterMode: CKEDITOR.ENTER_BR, shiftEnterMode : CKEDITOR.ENTER_P, customConfig : '../../../../theme/cke_custom.js' " )
The beta has some of these fixed in it already.
Posts: 166
Threads: 24
Joined: Jul 2012
2013-08-29, 00:16:27
(This post was last modified: 2013-08-29, 00:17:49 by lnickel .)
(2013-08-29, 00:14:43) shawn_a Wrote: PHP Code:
define ( 'GSEDITOROPTIONS' , "enterMode: CKEDITOR.ENTER_BR, shiftEnterMode : CKEDITOR.ENTER_P, customConfig : '../../../../theme/cke_custom.js' " )
So when I tell the config to use this file in this part...
define('GSEDITORTOOL', 'advanced');
Do I, for example, do this?
define('GSEDITORTOOL', 'cke_custom.js');
and....I dont know why its so indented! This is major reason I shy away from using editors.
Posts: 6,266
Threads: 181
Joined: Sep 2011
GSEDITORTOOL has nothing to do with GSEDITOROPTIONS
Posts: 166
Threads: 24
Joined: Jul 2012
So leave it as 'advanced'. I saw the [custom config] in comments and figured I needed to add something there. Sorry for the elementary questions!!
Posts: 166
Threads: 24
Joined: Jul 2012
2013-08-29, 00:23:41
(This post was last modified: 2013-08-29, 00:24:25 by lnickel .)
I am using DW to code in because its more table friendly and copying into the editor. I'm not copying from the design window only the code window. Perhaps that is what making the code indent that way
Posts: 6,266
Threads: 181
Joined: Sep 2011
toolbar custom config is for a custom toolbar as a button array.
Why not just turn off the editor entirely, or is this just for this page ?
Posts: 166
Threads: 24
Joined: Jul 2012
(2013-08-29, 00:25:54) shawn_a Wrote: toolbar custom config is for a custom toolbar as a button array.
Why not just turn off the editor entirely, or is this just for this page ?
I've got about 10 pages with tables of data on them
I might just turn it off.
Thanks Shawn!!!
Posts: 6,266
Threads: 181
Joined: Sep 2011
Yeah in settings for that user, uncheck htmleditor. I am not sure the editor is adding that level of indenting. it does do wierd indenting when editing, it also removes stuff, like empty tags.
3.2.4 has some fixes for block level breaking and indentation.
Posts: 166
Threads: 24
Joined: Jul 2012
Shawn! Thank you for help as always!! Yeah these editors can be frustrating! I'm updating to 3.2.3 right now to be close to up-to-date.
Posts: 6,266
Threads: 181
Joined: Sep 2011
"block level breaking" sounds like some new dance craze
Posts: 166
Threads: 24
Joined: Jul 2012
electric boogaloo style
Posts: 166
Threads: 24
Joined: Jul 2012
Solved Thanks Shawn!
I had to mess around with that relative link a little but got it working. I set the indent to false which made it much better. Not ideal - but better.
The difference that I could see when changing the indent was that when I changed it back to true - for some reason the tables, td's were not affected like the divs were.
Set it to false and everything including the tables, td's etc get shifted over.
Attached Files
Thumbnail(s)
Posts: 6,266
Threads: 181
Joined: Sep 2011
I wonder if there is a way to set the indentation method, say 2 spaces, instead of gigantic tabs.
Posts: 6,266
Threads: 181
Joined: Sep 2011
Can you post your source so i can test modifiying the cke writer ?
Posts: 6,266
Threads: 181
Joined: Sep 2011
This is what I added to 3.2.4 config
PHP Code:
// Override default block element source formatting CKEDITOR . on ( 'instanceReady' , function( ev ) { var blockTags = [ 'div' , 'h1' , 'h2' , 'h3' , 'h4' , 'h5' , 'h6' , 'p' , 'pre' , 'li' , 'blockquote' , 'ul' , 'ol' , 'table' , 'thead' , 'tbody' , 'tfoot' , 'td' , 'th' ,]; var rules = { indent : true , breakBeforeOpen : true , breakAfterOpen : false , breakBeforeClose : false , breakAfterClose : true }; for (var i = 0 ; i < blockTags . length ; i ++) { ev . editor . dataProcessor . writer . setRules ( blockTags [ i ], rules ); } });
Posts: 166
Threads: 24
Joined: Jul 2012
2013-08-29, 01:48:54
(This post was last modified: 2013-08-29, 01:50:48 by lnickel .)
(2013-08-29, 01:32:41) shawn_a Wrote: Can you post your source so i can test modifiying the cke writer ?
Sure! It's just a table with data in it
Code:
<table border="0" cellpadding="0" cellspacing="0" id="fund-information" width="100%">
<tbody>
<tr>
<td width="64%">Ticker (Investor Class)</td>
<td align="right" valign="middle" width="36%"> </td>
</tr>
<tr>
<td>Ticker (Institutional Class)</td>
<td align="right" valign="middle"> </td>
</tr>
<tr>
<td>CUSIP (Investor Class)</td>
<td align="right" valign="middle"> </td>
</tr>
<tr>
<td>CUSIP (Institutional Class)</td>
<td align="right" valign="middle"> </td>
</tr>
<tr>
<td>Minimum Investment (Investor Class)</td>
<td align="right" valign="middle">xxxxx</td>
</tr>
<tr>
<td>Minimum Investment (Institutional Class)</td>
<td align="right" valign="middle">xxxxx</td>
</tr>
<tr>
<td>Expense Ratio (Investor Class)</td>
<td align="right" valign="middle"> </td>
</tr>
<tr>
<td>Expense Ratio (Institutional Class)</td>
<td align="right" valign="middle"> </td>
</tr>
<tr>
<td>Net Assets</td>
<td align="right" valign="middle"> </td>
</tr>
<tr>
<td>Fund Inception</td>
<td align="right" valign="middle"> </td>
</tr>
<tr>
<td>Primary Benchmark</td>
<td align="right" valign="middle">S&P 500 Index</td>
</tr>
<tr>
<td>Secondary Benchmark</td>
<td align="right" valign="middle">Russell 3000 Index</td>
</tr>
<tr>
<td>Portfolio Managers</td>
<td align="right" valign="middle"> </td>
</tr>
</tbody>
</table>
Correct in the config js file I have it has your code you posted.
Posts: 166
Threads: 24
Joined: Jul 2012
If I disable the HTML editor will it default to codemirror or is there something I have to do perhaps that would be better
Posts: 6,266
Threads: 181
Joined: Sep 2011
nah its just a normal textarea
Posts: 6,266
Threads: 181
Joined: Sep 2011
aha textareas have a tabspace of 8 chars ( dumb )
some browsers you can modify
use admincss plugin and add this or something similar.
Code:
textarea, pre {
-moz-tab-size:4;
-o-tab-size:4;
tab-size:4;
}
will be added to 3.2.4 for sure.
Posts: 166
Threads: 24
Joined: Jul 2012
(2013-08-29, 02:33:54) shawn_a Wrote: aha textareas have a tabspace of 8 chars ( dumb )
some browsers you can modify
use admincss plugin and add this or something similar.
Code:
textarea, pre {
-moz-tab-size:4;
-o-tab-size:4;
tab-size:4;
}
will be added to 3.2.4 for sure.
Whoop!!! Thanks Shawn!!