Skip to content

custom buttons in the tool bar of kolkov angular editor #571

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
tt-divya opened this issue Sep 10, 2024 · 4 comments
Open

custom buttons in the tool bar of kolkov angular editor #571

tt-divya opened this issue Sep 10, 2024 · 4 comments

Comments

@tt-divya
Copy link

i want to add two custom buttons in the tool bar of kolkov angular editor, can any one help

@merlinwarage
Copy link

merlinwarage commented Oct 16, 2024

 <angular-editor [config]="editorConfig">
            <ng-template #customButtons>
                <ae-toolbar-set>
                    <ae-button
                        iconClass="fa fa-anchor ae-button primary"
                        class="ae-button primary"
                        title="customBtn"
                        (buttonClick)="customBtnClick()"
                    >
                    </ae-button>
                </ae-toolbar-set>
            </ng-template>
 </angular-editor>

@kolkov
Copy link
Owner

kolkov commented Dec 26, 2024

Hi! The package was updated https://www.npmjs.com/package/@kolkov/angular-editor/v/3.0.0-beta.1
FontsAwesome was removed, using instead SVG icons.

@kolkov
Copy link
Owner

kolkov commented Dec 26, 2024

<angular-editor id="editor1" [(ngModel)]="htmlContent1" [config]="config1" (ngModelChange)="onChange($event)"
                  (blur)="onBlur($event)">
    <ng-template #customButtons let-executeCommandFn="executeCommandFn">
      <ae-toolbar-set>
        <button aeButton title="Angular editor logo" (click)="executeCommandFn('insertHtml', angularEditorLogo)">
          <svg viewBox="-8 0 272 272" xmlns="http://www.w3.org/2000/svg"
               preserveAspectRatio="xMidYMid" fill="#000000">
            <g id="SVGRepo_bgCarrier" stroke-width="0"></g>
            <g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g>
            <g id="SVGRepo_iconCarrier">
              <g>
                <path
                  d="M0.0996108949,45.522179 L125.908171,0.697276265 L255.103502,44.7252918 L234.185214,211.175097 L125.908171,271.140856 L19.3245136,211.971984 L0.0996108949,45.522179 Z"
                  fill="#E23237"></path>
                <path
                  d="M255.103502,44.7252918 L125.908171,0.697276265 L125.908171,271.140856 L234.185214,211.274708 L255.103502,44.7252918 L255.103502,44.7252918 Z"
                  fill="#B52E31"></path>
                <path
                  d="M126.107393,32.27393 L126.107393,32.27393 L47.7136187,206.692607 L76.9992218,206.194553 L92.7377432,166.848249 L126.207004,166.848249 L126.306615,166.848249 L163.063035,166.848249 L180.29572,206.692607 L208.286381,207.190661 L126.107393,32.27393 L126.107393,32.27393 Z M126.306615,88.155642 L152.803113,143.5393 L127.402335,143.5393 L126.107393,143.5393 L102.997665,143.5393 L126.306615,88.155642 L126.306615,88.155642 Z"
                  fill="#FFFFFF"></path>
              </g>
            </g>
          </svg>
        </button>
      </ae-toolbar-set>
    </ng-template>
  </angular-editor>

@DNAshx
Copy link

DNAshx commented Jan 9, 2025

it doesn't work for version 1 thought ( any advice, on how to add a custom button in the 1.0.0 version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants