Jump to content

How change any thing on body text?


franciccio-ITALIANO
 Share

Recommended Posts

I often (have to) customize the Style drop-down list in CKEditor.

The styles applied can add classes to elements, like p for example. So these classes already exist if you are using a framework and/or you can add your own css rules, and you can add colors, align to the right, justify, etc.

You can see some summarized information here: 

 

Link to comment
Share on other sites

21 hours ago, franciccio-ITALIANO said:

mmm ok thank but I don't find the instructions for change color and text align. Is that in this page? I must study all this page? http://docs.ckeditor.com/#!/guide

Sorry for being unclear, I have meant the instructions on the textarea field input tab.

In my opinion, styling of colors or alignment should be handled via an separate css file or the custom styles section of CKEditor. The custom styles would probably be enough for you and shouldn't slow down the CKEditor too much. ;)

Link to comment
Share on other sites

Francicio, my opinion would not differ from the rest here. I have always thought that a good editor should have everything in it (color changes, anchors, and all the cool features), however I came to the conclusion that I am losing control over the content and if for some reason I decide to switch to another editor, then some or all of the codes, styles etc. might break and cause big headaches. That is why I am trying to type most of the commands manually, type the stylings manually and define them in separate CSS (depending on the case) so the code is clear having just the styles call and the rest is done by CSS.

In your case the code become much easier to read:  <p class="blablabla" ; >This is a paragraph.</p>

And in CSS you add the desired styling to .blablabla {....} Adding code inline would require you to change it on every instance once you change your mind for the appearance and in some cases having 10-20K of pages might be the worst nightmare. Having to change a few CSS lines of the .blablabla would be the cool and easy fix ;)

Link to comment
Share on other sites

Hi, 

exuse me I'm italian e I don'able to explain my problem.

My probem is:

1. How can I change the color of 1 word into the text? I can do it only by addon?
2. How can I change the align of 1 row into the text? I can do it only by addon?

For change the style of all document I use CSS, but I cant'use CSS per change the color of 1 word or the alignment of 1 row.

I don't know how to install addon of CKeditor into processwire. There is a guide for processwire?

I don't Know if is possible to put a blank row, a empty space, because CKeditor clean all and remove the empty row, but I need blank row.

With Repeater Matrix the site became more slowly?

 

Thanks!  


 

Link to comment
Share on other sites

51 minutes ago, franciccio-ITALIANO said:

My probem is:

1. How can I change the color of 1 word into the text? I can do it only by addon?
2. How can I change the align of 1 row into the text? I can do it only by addon?

I think you are much better off defining distinct "styles" for Ckeditor rather than allowing full manipulation - if you give editors free reign to change colors, you're likely to end up with a really ugly site.

You can read more about setting up styles here: https://github.com/processwire/processwire/blob/dev/wire/modules/Inputfield/InputfieldCKEditor/README.md#custom-editor-css-file

  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...

Thanks Flydev! 
I red your link, don't need install any CKE Addon!! :)

For new entry, the "CKEditor Toolbar" is in Setup -> Fields -> Body -> Imput. Here, add only words not plugin:

 

Save, NewPage, Preview, Templates
Cut, Copy, Paste, PasteText, PasteFromWord, -, Undo, Redo

Find, Replace, -, SelectAll, -, Scayt, -, Sourcedialog

Form, Checkbox, Radio, TextField, Textarea, Select, Button, ImageButton, HiddenField
Bold, Italic, Underline, Strike, Subscript, Superscript, -, RemoveFormat
NumberedList, BulletedList, -, Outdent, Indent, -, Blockquote, CreateDiv, -, JustifyLeft, JustifyCenter, JustifyRight, JustifyBlock, -, BidiLtr, BidiRtl, Language
PWLink, Unlink, Anchor
PWImage, Flash, Table, HorizontalRule, Smiley, SpecialChar, PageBreak, Iframe
Styles, Format, Font, FontSize
TextColor, BGColor
Maximize, ShowBlocks

 

For each word PW install one CKE Plugin. Remove the words for to remove the plugin! 

 

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...