Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Author Topic: [request] inline editor that applies css styles  (Read 9542 times)

Wim van Zijl

  • Newbie
  • *
  • Karma: 0
  • Posts: 39
    • http://iwonttelluntillitsdone.com
[request] inline editor that applies css styles
« on: November 20, 2006, 03:48:38 PM »

After looking at numerous inline editors one thing struck me,
they all mix up layout with content. even xstandard mixes the css info with the code (ie, creates in line css info with the tags itself). while that may be xhtml 1.1 strict. it is not what we want to achieve with running snews as a cms is it?

what I would like to see (and it is a request because i am not nearly a good enough programmer to implement something like this myself) is the basic buttons we have now, supplemented with a css selection box, that reads out all appropriate styles declared in the site's stylesheet file.
that way, we do not need to implement sloppy in-line editors, and our code stays squeeky clean!

let me know your opinions about this.

Maybe it is an idea to have a routine read out the css file we use for snews and create php variables that can be inserted on demand.
what do you think?
Logged
sessionmedia poorly chosen domainname, my playground
excercise!

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
[request] inline editor that applies css styles
« Reply #1 on: November 20, 2006, 04:15:49 PM »

Quote from: luchtkracht
Let me know your opinions about this.
Maybe it is an idea to have a routine read out the css file we use for snews and create php variables that can be inserted on demand.
what do you think?
Wow... now that would be a great feature. A few of my clients (now using sNews 1.4 on their sites) have wanted the ability to apply styles in the textarea(s) when composing their articles. My current solution has been to create an HTML file accessible with a button from the Admin Panels (new article and edit article). This page displays a sample of how each style looks along with the tags for that style, so they can copy & paste the style into the textarea as required. So far this works well for them.

But... let's think agout how we might implement this further in sNews 1.5 to make it more user-friendly. We now have a set of buttons under the textarea that we can use to insert tags into the textarea automatically... and we then put whatever we want into the tags. I think we should be able to create a complete set of CSS tag-insert buttons for as many css-styles as we want... so that we would simply hit the button for a given css style-tag-set and have it inserted into the textarea. Perhaps MIKA and or LUKA might verify if this would be the right approach.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

HvGo D CB

  • Newbie
  • *
  • Karma: 0
  • Posts: 12
[request] inline editor that applies css styles
« Reply #2 on: November 20, 2006, 06:23:00 PM »

Hi i would like to have this option... to administrate colors, pictures,comments, etc...
Logged

Wim van Zijl

  • Newbie
  • *
  • Karma: 0
  • Posts: 39
    • http://iwonttelluntillitsdone.com
[request] inline editor that applies css styles
« Reply #3 on: November 20, 2006, 10:12:00 PM »

What I was thinking about was something like the basic style applying done in dreamweaver  user interface.

Something extremely simple would do the trick. i think we could do with only a few extra buttons and a selection boxlike the photoshop example below:



the selection box reads the  class selectors from the snews styesheet and we have built in a simple way of keeping layout consistent troughout the site.

Mika, what do you think. is something like this a usefull adon / mod.  and what's your thought on the way these css calls could be made?
Logged
sessionmedia poorly chosen domainname, my playground
excercise!

piXelatedEmpire

  • MIA
  • ULTIMATE member
  • ******
  • Karma: 37
  • Posts: 1401
  • currently MIA
[request] inline editor that applies css styles
« Reply #4 on: November 20, 2006, 10:19:01 PM »

this would make a terrific mod!
Logged
my apologies to the sNews crew, but I will be MIA for the forseeable future

Wim van Zijl

  • Newbie
  • *
  • Karma: 0
  • Posts: 39
    • http://iwonttelluntillitsdone.com
[request] inline editor that applies css styles
« Reply #5 on: November 20, 2006, 10:22:57 PM »

t would, :P . Now all we need is somebody to program it. My PHP knowledge is way below the desired level to even touch anything like creating my own mods.
(however, i am beginning to understand code written by others more and more so please keep documenting it like most of the snews code, it helps a lot   ;) )
Logged
sessionmedia poorly chosen domainname, my playground
excercise!

HvGo D CB

  • Newbie
  • *
  • Karma: 0
  • Posts: 12
[request] inline editor that applies css styles
« Reply #6 on: November 20, 2006, 10:26:07 PM »

somebody speak spanish??... my english is very poor
Logged

Mika

  • Hero Member
  • *****
  • Karma: 9
  • Posts: 1377
    • http://www.ni5ni6.com/
[request] inline editor that applies css styles
« Reply #7 on: November 20, 2006, 11:01:43 PM »

I've created similar WYSWYG text editor back in the days when I was dealing with ASP/VBS, and that included some heavy javascripting... not to mention that those have evolved now.

You want to expand existing editor capabilities, right? Well, I don't think we'll develop it any further because it's not our primary goal. There are too many good editors on the market already and to develop another one would be reinventing the wheel (unless you prove me wrong ;) )

Here's another example that speaks in my favour: I've noticed that most of the tinymce (and similar products) users are using only basic text/image/url formatting features because lots of features aren't suitable for existing CSS setup. Applying different colour/size/font family... styles directly into your text body just isn't what you'd call a good text formatting, right?

Key's got the point, though: an example page with CSS snippets to copy/paste is a good course of action.

You see, template independency means that you can apply anything you want into your site, but that also means that you must build it from the scratch (or use available template). The result is something you've seen already - lots of unique sites built on sNews.

But hey, don't let me discourage you, guys :D
Here's a thing - provide some CSS template sheet (define names and appearances for certain styles), and I'll try to think of something, okay?
Logged
http://www.ni5ni6.com/ - Tutorials, Mods and How-To's about sNews CMS
sNews 1.6 Developers Edition - commented sNews 1.6 version

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
[request] inline editor that applies css styles
« Reply #8 on: November 20, 2006, 11:03:00 PM »

Quote from: luchtkracht
What I was thinking about was something like the basic style applying done in dreamweaver  user interface. --- Something extremely simple would do the trick.
Well... I came up with a solution that is simple enough to get you started. Your drop-down box idea is intriguing... I am not sure what would be involved with making that work. But - I have posted a new MOD that adds three of the most useful CSS tag-set functions to get you started. Check the mod out here - http://www.solucija.com/forum/viewtopic.php?id=2285. It was amazingly simple to create once I figured out how the tag-generators worked. :)

Of course... with this mod you'll still need to have a list of the css styles you'll want to use in articles... simply because it would be impractical to create... say... a dozen or so tag-set generators... one for each specific style. And... of course, we have to remember that style-naming is not the same from one template's stylesheet to another... so your list of tag-names would really be stylesheet and template-dependent.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Wim van Zijl

  • Newbie
  • *
  • Karma: 0
  • Posts: 39
    • http://iwonttelluntillitsdone.com
[request] inline editor that applies css styles
« Reply #9 on: November 20, 2006, 11:12:34 PM »

Mika,
Quote
You see, template independency means that you can apply anything you want into your site, but that also means that you must build it from the scratch (or use available template). The result is something you've seen already - lots of unique sites built on sNews.
that's exactly what this is for.

to make sure the styles i defined while designing the site, keep being used instead of generic bold, font and other unwanted tags.

when I have time (having a project management course tomorrow) I will supply you with some basic snews compatible stylesheet filled with different classes and ID's to fiddle with.

@Keyrocks.
man you are fast.
What you created is actually half of the solution.
if we are to use your buttons and then apply a selected style to it. I think that's exactly what is needed to supply basic css adding capability.

I think the hard part is to come up with a way to insert the part behind the "DIV id=" while tht is the piece from the actual stylesheet.

that's also exactly the piece where other editors go wrong (FCK editor for instance creates a "div style =" declaration which is not adding any value when updating your stylesheets while it adds inline styleinfo per item.
Logged
sessionmedia poorly chosen domainname, my playground
excercise!

Mika

  • Hero Member
  • *****
  • Karma: 9
  • Posts: 1377
    • http://www.ni5ni6.com/
[request] inline editor that applies css styles
« Reply #10 on: November 20, 2006, 11:22:59 PM »

Quote
when I have time (having a project management course tomorrow) I will supply you with some basic snews compatible stylesheet filled with different classes and ID's to fiddle with.
okay, I'll play with it then and post my findings in key's thread
Logged
http://www.ni5ni6.com/ - Tutorials, Mods and How-To's about sNews CMS
sNews 1.6 Developers Edition - commented sNews 1.6 version

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
[request] inline editor that applies css styles
« Reply #11 on: November 22, 2006, 10:52:47 PM »

HvGo... Welcome. Your post has nothing to do with this topic. You should move this post to the Web Programming Forum under Website Talk. I am unable to help you with this problem.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

HvGo D CB

  • Newbie
  • *
  • Karma: 0
  • Posts: 12
[request] inline editor that applies css styles
« Reply #12 on: November 22, 2006, 10:58:00 PM »

Ok
Logged

bramsyuur

  • Hero Member
  • *****
  • Karma: 23
  • Posts: 873
    • http://snews.vietbee.net
[request] inline editor that applies css styles
« Reply #13 on: April 12, 2007, 12:02:37 AM »

Quote from: HvGo
somebody speak spanish??... my english is very poor
HvGo, I speak spanish :)
Bienvenido a este maravilloso mundo del sNews. Sientase como en su casa! :)
Saludos!
Logged
La comunidad sNews en tu idioma!
Comunidad sNews en Espaņol