Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [JavaScript][HTML]ckeditor ustawienia
-ckedit-
post
Post #1





Goście







witam
  1. <script src="./class/ckeditor/ckeditor.js"></script>
  2. <link rel="stylesheet" href="./class/ckeditor/sample.css">
  3. <textarea class="ckeditor" cols="80" id="editor1" name="editor1" rows="10"></textarea>
  4. CKEDITOR.replace( 'editor1', {
  5. uiColor: '#9AB8F3',
  6. extraPlugins = 'wpro_log',
  7. toolbar = [
  8. { name: 'document', items : [ 'Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates' ] },
  9. { name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
  10. { name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] },
  11. { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] },
  12. '/',
  13. { name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
  14. { name: 'links', items : [ 'Link','Unlink','Anchor' ] },
  15. { name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak' ] },
  16. '/',
  17. { name: 'styles', items : [ 'Styles','Format','Font','FontSize' ] },
  18. { name: 'colors', items : [ 'TextColor','BGColor' ] },
  19. { name: 'tools', items : [ 'Maximize', 'ShowBlocks','-','About','Timestamp'] }
  20. ]
  21. });

i nic nie zmienia.. wyświetla mi domyślny edytor
czemu?
Powód edycji: [Kshyhoo]: usunąłem tekst z textarea
Go to the top of the page
+Quote Post
Kshyhoo
post
Post #2





Grupa: Opiekunowie
Postów: 3 855
Pomógł: 317
Dołączył: 4.01.2005
Skąd: że




A co ma Ci zmieniać?
Po pierwsze, co co ta cała treść w textarea? Usunąłem, bo niepotrzebnie zaśmieca kod. Treść wklejasz w textarea w przeglądarce a nie w kod skryptu.
Po drugie, edytor dołączasz kodem:
w HEAD:
  1. <script src="./class/ckeditor/ckeditor.js"></script>

w BODY:
  1. <textarea cols="80" id="editor1" name="editor1" rows="10"></textarea>
  2. <script type="text/javascript">
  3. //<![CDATA[
  4. CKEDITOR.replace( "editor1",
  5. {
  6. // tu ustawienia
  7. });
  8. //]]>

Byś może to powoduje, że Twój edytor się nie włącza.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.08.2025 - 19:05