fontOperator.html 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <div class="font-operator">
  2. <div class="dropdown font-family-list" dropdown>
  3. <div class="dropdown-toggle current-font-item" dropdown-toggle ng-disabled="minder.queryCommandState('fontfamily') === -1">
  4. <a href class="current-font-family" title="{{ 'fontfamily' | lang: 'ui' }}">{{ getFontfamilyName(minder.queryCommandValue('fontfamily')) || '字体' }}</a>
  5. <span class="caret"></span>
  6. </div>
  7. <ul class="dropdown-menu font-list">
  8. <li ng-repeat="f in fontFamilyList" class="font-item-wrap">
  9. <a ng-click="minder.execCommand('fontfamily', f.val)" class="font-item" ng-class="{ 'font-item-selected' : f == minder.queryCommandValue('fontfamily') }" ng-style="{'font-family': f.val }">{{ f.name }}</a>
  10. </li>
  11. </ul>
  12. </div>
  13. <div class="dropdown font-size-list" dropdown>
  14. <div class="dropdown-toggle current-font-item" dropdown-toggle ng-disabled="minder.queryCommandState('fontsize') === -1">
  15. <a href class="current-font-size" title="{{ 'fontsize' | lang: 'ui' }}">{{ minder.queryCommandValue('fontsize') || '字号' }}</a>
  16. <span class="caret"></span>
  17. </div>
  18. <ul class="dropdown-menu font-list">
  19. <li ng-repeat="f in fontSizeList" class="font-item-wrap">
  20. <a ng-click="minder.execCommand('fontsize', f)" class="font-item" ng-class="{ 'font-item-selected' : f == minder.queryCommandValue('fontsize') }" ng-style="{'font-size': f + 'px'}">{{ f }}</a>
  21. </li>
  22. </ul>
  23. </div>
  24. <span class="s-btn-icon font-bold"
  25. ng-click="minder.queryCommandState('bold') === -1 || minder.execCommand('bold')"
  26. ng-class="{'font-bold-selected' : minder.queryCommandState('bold') == 1}"
  27. ng-disabled="minder.queryCommandState('bold') === -1"></span>
  28. <span class="s-btn-icon font-italics"
  29. ng-click="minder.queryCommandState('italic') === -1 || minder.execCommand('italic')"
  30. ng-class="{'font-italics-selected' : minder.queryCommandState('italic') == 1}"
  31. ng-disabled="minder.queryCommandState('italic') === -1">
  32. </span>
  33. <div class="font-color-wrap">
  34. <span class="quick-font-color"
  35. ng-click="minder.queryCommandState('forecolor') === -1 || minder.execCommand('forecolor', foreColor)"
  36. ng-disabled="minder.queryCommandState('forecolor') === -1">A</span>
  37. <span color-picker
  38. class="font-color"
  39. set-color="setDefaultColor()"
  40. ng-disabled="minder.queryCommandState('forecolor') === -1">
  41. <span class="caret"></span>
  42. </span>
  43. <span class="font-color-preview"
  44. ng-style="{ 'background-color': foreColor }"
  45. ng-click="minder.queryCommandState('forecolor') === -1 || minder.execCommand('forecolor', foreColor)"
  46. ng-disabled="minder.queryCommandState('forecolor') === -1"></span>
  47. </div>
  48. <color-panel minder="minder" class="inline-directive"></color-panel>
  49. </div>