|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
WYSIWYG Editor and Styles
Great article on the building your own HTML Editor -- one thing that the article didn't cover was integration with styles. Any advice on how to handle this would be much appreciated.
Regards. Gandalf |
|
#2
|
|||
|
|||
|
Hmmm... I wouldnt have a clue on that one. Maybe you can add style sheets to the top, grab them with JS and set the properties of a drop down list to show which style sheets there are. from there, when a user selects one, grab the individual properites of it and apply it to the selected text.
|
|
#3
|
|||
|
|||
|
I too was wondering how far you can go with customization of the editor. I've done quite a bit more with MSHTML, but have not found if it is possible to apply classes or other tags via a function or button click like the other executecommand functions. Anyone know about that?
|
|
#4
|
|||
|
|||
|
im working on a html editor (not WYSIWYG) where i can select from a list, and the selected text, will now be formatted by that class, once ive finished the code, ill post it so u guys can try and figure out how to use it for the WYSIWYG editor
|
|
#5
|
|||
|
|||
|
This editor you speak of is in DHTML or what? The thing I like about the MSHTML functions is that they are smart in the sense that they properly nest tags and add multiple tags when needed. For example, if I select part of two paragraphs and bold the selection, it won't improperly nest the tags, but rather insert two sets of bold tags inside of the block-elements where they belong.
That very same complexity is what's kept me from attemping to script in functionality of which you speak. I'm very curious to see how yours turns out now... |
|
#6
|
|||
|
|||
|
i decided to try try and add my style script to the wysiwyg editor, and it crashed, everything was right, choose a style it worked, but it crashed, ive tried it on server computers since, and they all crashed! so im guessing its a problem with IE. soz guys, but looks like you might have to do it the old fassioned way of editing the html!
argh! but being typicle MS they'll bring out 5 patches for IE 6 before its fixed back to the old drawin board! |
![]() |
| Viewing: Dev Articles Community Forums > Programming > Programming Tools > WYSIWYG Editor and Styles |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|