-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from ianwesterfield/feature/display-rtf-articles
works
- Loading branch information
Showing
46 changed files
with
3,704 additions
and
3,010 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 0 additions & 8 deletions
8
projects/press/components/storyblok/src/components/article.component.html
This file was deleted.
Oops, something went wrong.
38 changes: 0 additions & 38 deletions
38
projects/press/components/storyblok/src/components/article.component.ts
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
projects/press/components/storyblok/src/components/components.ts
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
projects/press/components/storyblok/src/components/grid.component.html
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
projects/press/components/storyblok/src/components/grid.component.scss
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
projects/press/components/storyblok/src/components/grid.component.ts
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
projects/press/components/storyblok/src/components/page.component.html
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
projects/press/components/storyblok/src/components/page.component.ts
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions
8
projects/press/storyblok/src/components/article/article.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<editor | ||
[pressStoryblok]="_editable" | ||
contextmenu="true" | ||
apiKey="t5cdeua6d43g8mszp3sq4v2twgvsyfsjm5m4vv4syio5ozol" | ||
[init]="options" | ||
[initialValue]="copyText.content" | ||
> | ||
</editor> |
59 changes: 59 additions & 0 deletions
59
projects/press/storyblok/src/components/article/article.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import { CommonModule } from '@angular/common'; | ||
import { | ||
AfterViewInit, | ||
Component, | ||
Inject, | ||
Input, | ||
OnChanges, | ||
SimpleChanges, | ||
ViewChild, | ||
} from '@angular/core'; | ||
import { DomSanitizer } from '@angular/platform-browser'; | ||
import { EditorComponent, EditorModule } from '@tinymce/tinymce-angular'; | ||
import { TinyMCE } from 'tinymce'; | ||
import { StoryblokDirective } from '../../directives/storyblok.directive'; | ||
|
||
type EditorOptions = Parameters<TinyMCE['init']>[0]; | ||
|
||
@Component({ | ||
selector: 'press-storyblok-article', | ||
standalone: true, | ||
imports: [CommonModule, EditorModule, StoryblokDirective], | ||
templateUrl: './article.component.html', | ||
}) | ||
export class ArticleComponent implements AfterViewInit, OnChanges { | ||
@ViewChild(EditorComponent) editor: EditorComponent; | ||
|
||
@Input() name: string; | ||
@Input() component: any; | ||
@Input() _uid: any; | ||
@Input() _editable: any; | ||
@Input() copyText: any; | ||
@Input() title: any; | ||
@Input() publishDate: any; | ||
|
||
options: EditorOptions = { | ||
plugins: | ||
'anchor autolink charmap codesample emoticons image link lists media searchreplace table visualblocks wordcount checklist mediaembed casechange export formatpainter pageembed linkchecker a11ychecker tinymcespellchecker permanentpen powerpaste advtable advcode editimage advtemplate mentions tinycomments tableofcontents footnotes mergetags autocorrect typography inlinecss markdown', | ||
toolbar: | ||
'undo redo | blocks fontfamily fontsize | bold italic underline strikethrough | link image media table mergetags | addcomment showcomments | spellcheckdialog a11ycheck typography | align lineheight | checklist numlist bullist indent outdent | emoticons charmap | removeformat', | ||
tinycomments_mode: 'embedded', | ||
tinycomments_author: 'Author name', | ||
mergetags_list: [ | ||
{ value: 'First.Name', title: 'First Name' }, | ||
{ value: 'Email', title: 'Email' }, | ||
], | ||
} as EditorModule; | ||
|
||
constructor( | ||
@Inject('APP_CONFIG') appConfig, | ||
private sani: DomSanitizer, | ||
) {} | ||
ngOnChanges(changes: SimpleChanges): void { | ||
throw new Error('Method not implemented.'); | ||
} | ||
|
||
ngAfterViewInit(): void { | ||
console.log(this.editor); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { ArticleComponent } from './article/article.component'; | ||
|
||
const StoryBlokComponents = { | ||
Article: ArticleComponent, | ||
}; | ||
|
||
export { StoryBlokComponents }; |
1 change: 1 addition & 0 deletions
1
projects/press/storyblok/src/components/field-plugins/tiny-mce/.env.local.example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
STORYBLOK_PERSONAL_ACCESS_TOKEN= |
32 changes: 32 additions & 0 deletions
32
projects/press/storyblok/src/components/field-plugins/tiny-mce/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
.DS_Store | ||
node_modules | ||
|
||
# env files except for .env.local.example | ||
.env | ||
.env.* | ||
!.env.local.example | ||
|
||
# Log files | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
# Editor directories and files | ||
.idea | ||
.vscode | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw* | ||
|
||
# Yarn (https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored) | ||
.pnp.* | ||
.yarn/* | ||
!.yarn/patches | ||
!.yarn/plugins | ||
!.yarn/releases | ||
!.yarn/sdks | ||
!.yarn/versions |
1 change: 1 addition & 0 deletions
1
projects/press/storyblok/src/components/field-plugins/tiny-mce/.nvmrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
18.16.0 |
8 changes: 8 additions & 0 deletions
8
projects/press/storyblok/src/components/field-plugins/tiny-mce/.prettierrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"bracketSpacing": true, | ||
"printWidth": 80, | ||
"semi": false, | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"singleAttributePerLine": true | ||
} |
Oops, something went wrong.