The following warnings occurred:
Warning [2] Undefined array key "threadviews_countguests" - Line: 745 - File: showthread.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php 745 errorHandler->error_callback
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/inc/functions_post.php 830 postParser->parse_message
/showthread.php 916 build_postbit
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/inc/functions_post.php 861 postParser->parse_message
/showthread.php 916 build_postbit
Warning [2] Undefined property: MyLanguage::$thread_modes - Line: 46 - File: showthread.php(1650) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php(1650) : eval()'d code 46 errorHandler->error_callback
/showthread.php 1650 eval




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom Styles not Displayed in Editor
#1
I'm wanting to give users the possibility of adding custom styles that are defined in the standard theme 'style.css' file.
(The 'standard' method of implementing custom styles via the GS's CKEditor's "Styles" drop-down selector:
Code:
{ name : 'Marker: Yellow'    , element : 'span', styles : { 'background-color' : 'Yellow' } },
results in in-line styles. However, IMO this method misses out on one of the key features of CSS - the ability to administer styles centrally.)

I've followed Connie's excellent "WYSIWYG-Editor" tutorial in the GS Wiki (http://get-simple.info/wiki/how_to:wysiwyg_editor) and made my own custom style sheet.
I've also found out that you can define your own CSS classes for the 'Styles' window using:
Code:
{ name : 'Footnote', element : 'p', attributes : { 'class' : 'footnote' } },

This works, in so far as the editor applies my 'footnote' class to the 'p' tag correctly and when I look at my newly coded page from outside I can see that the browser is correctly applying the formatting that I've specified in the 'style.css' file.

However, what doesn't work is that this isn't WYSIWYG. Whilst clicking on the 'Marker: Yellow' default custom style shows a yellow background behind the text once the focus is changed from the editor toolbar back to the editor window, users can only see that they've applied my 'Footnote' class when they switch over to the editor's 'Source' view.
Which means that chaos and therefore an unhappy customer is almost certain to occur sometime along the line.

Does anyone know how to get the CKEditor to read the GS 'style.css' file 'realtime'?
Web Developer and Translator (German > English)
Reply


Messages In This Thread
Custom Styles not Displayed in Editor - by Alan-A - 2011-09-18, 20:07:14
Custom Styles not Displayed in Editor - by Alan-A - 2011-09-18, 20:40:53
Custom Styles not Displayed in Editor - by Connie - 2011-09-18, 20:42:11
Custom Styles not Displayed in Editor - by mvlcek - 2011-09-18, 21:05:34
Custom Styles not Displayed in Editor - by Alan-A - 2011-09-19, 02:36:02
Custom Styles not Displayed in Editor - by Alan-A - 2011-09-28, 03:11:44
Custom Styles not Displayed in Editor - by Connie - 2011-09-28, 03:25:23
Custom Styles not Displayed in Editor - by Alan-A - 2011-09-28, 18:10:46
Custom Styles not Displayed in Editor - by Alan-A - 2011-09-30, 00:23:42
Custom Styles not Displayed in Editor - by mvlcek - 2011-09-30, 00:58:45
Custom Styles not Displayed in Editor - by Alan-A - 2011-09-30, 03:02:06
Custom Styles not Displayed in Editor - by mvlcek - 2011-09-30, 03:30:48
Custom Styles not Displayed in Editor - by Connie - 2011-09-30, 03:30:55
Custom Styles not Displayed in Editor - by Alan-A - 2011-10-03, 01:11:50
Custom Styles not Displayed in Editor - by mvlcek - 2011-10-03, 01:36:08
Custom Styles not Displayed in Editor - by Alan-A - 2011-10-03, 02:10:16



Users browsing this thread: 1 Guest(s)