Permalink
Browse files

Version 0.48

Added:
* language support
* theme rolling in demo
  • Loading branch information...
1 parent 51c4864 commit 6e7044f9b6162a1a96d3e7e71bff066d582ca8aa @bordeux committed May 6, 2012
Showing with 280 additions and 908 deletions.
  1. +4 −2 README.mediawiki
  2. +41 −41 h5w/h5w.css
  3. +23 −0 h5w/h5w.js
  4. +2 −1 h5w/h5w.min.js
  5. BIN { → h5w}/img/add.png
  6. BIN { → h5w}/img/attributes.png
  7. BIN { → h5w}/img/bold.png
  8. BIN { → h5w}/img/copy.png
  9. BIN { → h5w}/img/createlink.png
  10. BIN { → h5w}/img/cut.png
  11. BIN { → h5w}/img/delete.png
  12. BIN { → h5w}/img/font_color.png
  13. BIN { → h5w}/img/fontsize.png
  14. BIN { → h5w}/img/fonttype.png
  15. BIN { → h5w}/img/hilitecolor.png
  16. BIN { → h5w}/img/hrule.png
  17. BIN { → h5w}/img/indent.png
  18. BIN { → h5w}/img/insertimage.png
  19. BIN { → h5w}/img/italic.png
  20. BIN { → h5w}/img/justify.png
  21. BIN { → h5w}/img/justifycenter.png
  22. BIN { → h5w}/img/justifyleft.png
  23. BIN { → h5w}/img/justifyright.png
  24. BIN { → h5w}/img/listordered.png
  25. BIN { → h5w}/img/listunordered.png
  26. BIN { → h5w}/img/options.png
  27. BIN { → h5w}/img/optionsx.png
  28. BIN { → h5w}/img/outdent.png
  29. BIN { → h5w}/img/paragraph.png
  30. BIN { → h5w}/img/paste.png
  31. BIN { → h5w}/img/paste_m.png
  32. BIN { → h5w}/img/quit.png
  33. BIN { → h5w}/img/redo.png
  34. BIN { → h5w}/img/removeformat.png
  35. BIN h5w/img/selectall.png
  36. BIN { → h5w}/img/seperator.png
  37. BIN { → h5w}/img/strike.png
  38. BIN { → h5w}/img/subscript.png
  39. BIN { → h5w}/img/superscript.png
  40. BIN { → h5w}/img/table.png
  41. BIN { → h5w}/img/underline.png
  42. BIN { → h5w}/img/undo.png
  43. BIN { → h5w}/img/unlink.png
  44. +54 −0 h5w/langs/lang_en.js
  45. +54 −0 h5w/langs/lang_pl.js
  46. BIN img/selectall.png
  47. +102 −65 index.html
  48. +0 −16 js/jquery-1.5.1.min.js
  49. +0 −783 js/jquery-ui-1.8.12.custom.min.js
View
@@ -3,8 +3,10 @@
<p align="center"><img src="http://img402.imageshack.us/img402/8499/html5logo.jpg" /></p>
= HTML 5 WYSIWYG Editor =
-.... in progress... 92% done ;] This is part of XVweb project
-What's new in 0.47? Now, you can paste screenshot to editor. Try - press PrintScreen? key and paste to edtior.
+This is part of XVweb project.
+What's new in 0.48?
+ * Now language support
+ * Now, you can paste screenshot to editor. Try - press PrintScreen key and paste to edtior.
= Do you want changes or new functions? =
Yes? Write your proposition <a href="https://github.com/bordeux/HTML-5-WYSIWYG-Editor/issues">HERE!</a>
View
@@ -203,7 +203,7 @@ height: 36px;
width: 100%;
}
.h5w-seperator {
- background: url(../img/seperator.png) center 2px no-repeat;
+ background: url(img/seperator.png) center 2px no-repeat;
display: block;
float: left;
height: 18px;
@@ -224,127 +224,127 @@ height: 36px;
width: 8px;
}
.h5w-bold {
- background: url(../img/bold.png) center center no-repeat;
+ background: url(img/bold.png) center center no-repeat;
}
.h5w-italic {
- background: url(../img/italic.png) center center no-repeat;
+ background: url(img/italic.png) center center no-repeat;
}
.h5w-underline {
- background: url(../img/underline.png) center center no-repeat;
+ background: url(img/underline.png) center center no-repeat;
}
.h5w-strike {
- background: url(../img/strike.png) center center no-repeat;
+ background: url(img/strike.png) center center no-repeat;
}
.h5w-subscript {
- background: url(../img/subscript.png) center center no-repeat;
+ background: url(img/subscript.png) center center no-repeat;
}
.h5w-superscript {
- background: url(../img/superscript.png) center center no-repeat;
+ background: url(img/superscript.png) center center no-repeat;
}
.h5w-paragraph {
- background: url(../img/paragraph.png) center center no-repeat;
+ background: url(img/paragraph.png) center center no-repeat;
}
.h5w-listordered {
- background: url(../img/listordered.png) center center no-repeat;
+ background: url(img/listordered.png) center center no-repeat;
}
.h5w-listunordered {
- background: url(../img/listunordered.png) center center no-repeat;
+ background: url(img/listunordered.png) center center no-repeat;
}
.h5w-hrule {
- background: url(../img/hrule.png) center center no-repeat;
+ background: url(img/hrule.png) center center no-repeat;
}
.h5w-insertimage {
- background: url(../img/insertimage.png) center center no-repeat;
+ background: url(img/insertimage.png) center center no-repeat;
}
.h5w-undo {
- background: url(../img/undo.png) center center no-repeat;
+ background: url(img/undo.png) center center no-repeat;
}
.h5w-redo {
- background: url(../img/redo.png) center center no-repeat;
+ background: url(img/redo.png) center center no-repeat;
}
.h5w-selectall {
- background: url(../img/selectall.png) center center no-repeat;
+ background: url(img/selectall.png) center center no-repeat;
}
.h5w-indent {
- background: url(../img/indent.png) center center no-repeat;
+ background: url(img/indent.png) center center no-repeat;
}
.h5w-outdent {
- background: url(../img/outdent.png) center center no-repeat;
+ background: url(img/outdent.png) center center no-repeat;
}
.h5w-removeformat {
- background: url(../img/removeformat.png) center center no-repeat;
+ background: url(img/removeformat.png) center center no-repeat;
}
.h5w-justifyleft {
- background: url(../img/justifyleft.png) center center no-repeat;
+ background: url(img/justifyleft.png) center center no-repeat;
}
.h5w-justifycenter {
- background: url(../img/justifycenter.png) center center no-repeat;
+ background: url(img/justifycenter.png) center center no-repeat;
}
.h5w-justifyright {
- background: url(../img/justifyright.png) center center no-repeat;
+ background: url(img/justifyright.png) center center no-repeat;
}
.h5w-fontcolor {
- background: url(../img/font_color.png) center center no-repeat;
+ background: url(img/font_color.png) center center no-repeat;
}
.h5w-hilitecolor {
- background: url(../img/hilitecolor.png) center center no-repeat;
+ background: url(img/hilitecolor.png) center center no-repeat;
}
.h5w-paste {
- background: url(../img/paste.png) top center no-repeat;
+ background: url(img/paste.png) top center no-repeat;
height: 45px;
margin-right: 5px;
padding-top: 46px;
text-align: center;
width: 45px;
}
.h5w-cut {
- background: url(../img/cut.png) center left no-repeat;
+ background: url(img/cut.png) center left no-repeat;
height: 16px;
margin-top: 4px;
padding-left: 17px;
width: 40px;
}
.h5w-copy {
- background: url(../img/copy.png) center left no-repeat;
+ background: url(img/copy.png) center left no-repeat;
height: 16px;
margin-top: 9px;
padding-left: 17px;
width: 40px;
}
.h5w-table {
- background: url(../img/table.png) top center no-repeat;
+ background: url(img/table.png) top center no-repeat;
height: 45px;
margin-right: 5px;
padding-top: 46px;
text-align: center;
width: 48px;
}
.h5w-insertimage {
- background: url(../img/insertimage.png) top center no-repeat;
+ background: url(img/insertimage.png) top center no-repeat;
height: 45px;
margin-right: 5px;
padding-top: 46px;
text-align: center;
width: 48px;
}
.h5w-createlink {
- background: url(../img/createlink.png) top center no-repeat;
+ background: url(img/createlink.png) top center no-repeat;
height: 45px;
margin-right: 5px;
padding-top: 46px;
text-align: center;
width: 48px;
}
.h5w-unlink {
- background: url(../img/unlink.png) top center no-repeat;
+ background: url(img/unlink.png) top center no-repeat;
height: 45px;
margin-right: 5px;
padding-top: 46px;
text-align: center;
width: 48px;
}
.h5w-fontsize {
- background: #FFF url(../img/fontsize.png) center left no-repeat;
+ background: #FFF url(img/fontsize.png) center left no-repeat;
width: 32px;
text-align:right;
padding-right:3px;
@@ -360,7 +360,7 @@ height: 36px;
border-right:none;
}
.h5w-fonttype {
- background: #FFF url(../img/fonttype.png) center left no-repeat;
+ background: #FFF url(img/fonttype.png) center left no-repeat;
width: 120px;
text-align:right;
padding-right:3px;
@@ -459,13 +459,13 @@ font-size:10px;
padding-left:20px;
}
-.h5w-context-menu .h5w-c-delete {background: url(../img/delete.png) center left no-repeat;}
-.h5w-context-menu .h5w-c-cut {background: url(../img/cut.png) center left no-repeat;}
-.h5w-context-menu .h5w-c-copy {background: url(../img/copy.png) center left no-repeat;}
-.h5w-context-menu .h5w-c-paste {background: url(../img/paste_m.png) center left no-repeat;}
-.h5w-context-menu .h5w-c-quit {background: url(../img/quit.png) center left no-repeat;}
-.h5w-context-menu .h5w-c-attributes {background: url(../img/attributes.png) center left no-repeat;}
-.h5w-context-menu .h5w-c-add {background: url(../img/add.png) center left no-repeat;}
-.h5w-context-menu .h5w-c-attrx {background: url(../img/options.png) center left no-repeat;}
-.h5w-context-menu .h5w-c-options {background: url(../img/optionsx.png) center left no-repeat;}
+.h5w-context-menu .h5w-c-delete {background: url(img/delete.png) center left no-repeat;}
+.h5w-context-menu .h5w-c-cut {background: url(img/cut.png) center left no-repeat;}
+.h5w-context-menu .h5w-c-copy {background: url(img/copy.png) center left no-repeat;}
+.h5w-context-menu .h5w-c-paste {background: url(img/paste_m.png) center left no-repeat;}
+.h5w-context-menu .h5w-c-quit {background: url(img/quit.png) center left no-repeat;}
+.h5w-context-menu .h5w-c-attributes {background: url(img/attributes.png) center left no-repeat;}
+.h5w-context-menu .h5w-c-add {background: url(img/add.png) center left no-repeat;}
+.h5w-context-menu .h5w-c-attrx {background: url(img/options.png) center left no-repeat;}
+.h5w-context-menu .h5w-c-options {background: url(img/optionsx.png) center left no-repeat;}
.h5w-context-menu .h5w-c-seperator {border-top:1px solid #9C9C9C;}
View
@@ -715,6 +715,29 @@
jQuery(this).find(".h5w-refresh-textarea").trigger("click");
return jQuery(this).find(".h5w-texarea").val().replace("<!--?php", "<?php");
},
+ loadLang : function (lang) {
+ jQuery(this).find("[data-h5w-lang]").each(function(){
+ var lang_options = $(this).data("h5w-lang").split("|");
+ var lang_word = lang_options[0];
+ var hthis = $(this);
+ if(typeof lang[lang_word] == "undefined")
+ return true;
+
+ lang_options.splice(0 ,1);
+ if (lang_options.length <1){
+ hthis.html(lang[lang_word]);
+ }else{
+ $.each(lang_options, function(index, value) {
+ if(value == "html"){
+ hthis.html(lang[lang_word]);
+ }else{
+ hthis.attr(value, lang[lang_word]);
+ };
+ });
+ }
+ });
+ return true;
+ },
setContent : function (cont) {
jQuery(this).find(".h5w-content").html(cont).trigger("change");
},
View

Large diffs are not rendered by default.

Oops, something went wrong.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
View
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
View
@@ -0,0 +1,54 @@
+var h5w_lang_pl = {
+ "home" : "Home",
+ "insert" : "Insert",
+ "htmlelements" : "HTML Elements",
+ "undo" : "Undo",
+ "redo" : "Redo",
+ "selectall" : "Select all",
+ "paste" : "Paste",
+ "cut" : "Cut",
+ "copy" : "Copy",
+ "fonttype" : "Font type",
+ "fonttypepicker" : "Select font type",
+ "fontsize" : "Font size",
+ "fontsizepicker" : "Select font size",
+ "bold" : "Bold",
+ "italic" : "Italic",
+ "underline" : "Underline",
+ "strike" : "Strike",
+ "subscript" : "Subscript",
+ "superscript" : "Superscript",
+ "setfontcolor" : "Set font color",
+ "fontcolorpicker" : "Select font color",
+ "highlight" : "Highlight",
+ "highlightcolorpicker" : "Select highlight color",
+ "removeformat" : "Delete formating",
+ "addrule" : "Add rule",
+ "addlistnumeric" : "Add numeric list",
+ "addlistbull" : "Add bull list",
+ "leftjustify" : "Left justify",
+ "centerjustify" : "Center justify",
+ "rightjustify" : "Right justify",
+ "ident" : "Ident",
+ "outdent" : "Outdent",
+ "paragraph" : "New paragraph",
+ "attributes" : "Attributes",
+ "delete" : "Delete",
+ "elementoptions" : "Element options",
+ "quit" : "Quit",
+ "sourcehtml" : "Source HTML",
+ "visual" : "Visual",
+ "inserthtmlform" : "Insert HTML form",
+ "image" : "Image",
+ "link" : "Link",
+ "unlink" : "Unlink",
+ "table" : "Tabele",
+ "insetfieldset" : "Insert fieldset",
+ "insertinputtext" : "Insert text field",
+ "insertinputpassword" : "Insert password filed",
+ "insertinputcheckbox" : "Insert checkbox",
+ "insertinputradio" : "Insert input radio",
+ "insertinputsubmit" : "Insert submit",
+ "insertinputbutton" : "Insert button",
+ "inserttextarea" : "Insert textarea"
+};
View
@@ -0,0 +1,54 @@
+var h5w_lang_pl = {
+ "home" : "Home",
+ "insert" : "Wstaw",
+ "htmlelements" : "Elementy HTML",
+ "undo" : "Cofnij",
+ "redo" : "Ponów",
+ "selectall" : "Zaznacz wszystko",
+ "paste" : "Wklej",
+ "cut" : "Wytnij",
+ "copy" : "Kopiuj",
+ "fonttype" : "Typ czcionki",
+ "fonttypepicker" : "Wybierz typ czcionki",
+ "fontsize" : "Rozmiar czcionki",
+ "fontsizepicker" : "Wybierz rozmiar czcionki",
+ "bold" : "Pogrubienie",
+ "italic" : "Kursywa",
+ "underline" : "Podkreślenie",
+ "strike" : "Przekreślenie",
+ "subscript" : "Dolny indeks",
+ "superscript" : "Górny indeks",
+ "setfontcolor" : "Ustaw kolor czcionki",
+ "fontcolorpicker" : "Wybierz kolor czcionki",
+ "highlight" : "Zaznaczenie",
+ "highlightcolorpicker" : "Wybierz kolor zaznaczenia",
+ "removeformat" : "Usuń formatowanie",
+ "addrule" : "Dodaj linie",
+ "addlistnumeric" : "Dodaj listę numeryczną",
+ "addlistbull" : "Dodaj listę wykropkowaną",
+ "leftjustify" : "Formatowanie do lewej",
+ "centerjustify" : "Wyśrodkowanie",
+ "rightjustify" : "Formatowanie do prawej",
+ "ident" : "Wcięcie",
+ "outdent" : "Usuń wcięcie",
+ "paragraph" : "Nowy paragraf",
+ "attributes" : "Atrybuty",
+ "delete" : "Usuń",
+ "elementoptions" : "Opcje elementu",
+ "quit" : "Wyjście",
+ "sourcehtml" : "Edytor HTML",
+ "visual" : "Edytor wizualny",
+ "inserthtmlform" : "Wstaw formularz HTML",
+ "image" : "Obrazek",
+ "link" : "Link",
+ "unlink" : "Usuń Link",
+ "table" : "Tabela",
+ "insetfieldset" : "Dodaj element fieldset",
+ "insertinputtext" : "Wstaw pole tekstowe",
+ "insertinputpassword" : "Wstaw pole na hasło",
+ "insertinputcheckbox" : "Dodaj checkbox",
+ "insertinputradio" : "Dodaj input radio",
+ "insertinputsubmit" : "Dodaj submit",
+ "insertinputbutton" : "Dodaj przycisk",
+ "inserttextarea" : "Dodaj textarea"
+};
View
Diff not rendered.
Oops, something went wrong.

0 comments on commit 6e7044f

Please sign in to comment.