Skip to content

Commit

Permalink
Merge pull request #32 from netgine/repeatable
Browse files Browse the repository at this point in the history
Make editor id unique for nova repeater
  • Loading branch information
murdercode authored Jan 22, 2025
2 parents e4169e3 + 5055030 commit e093609
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/js/field.js

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions dist/js/field.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/

/*!
* vuex v4.1.0
* (c) 2022 Evan You
* @license MIT
*/

/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
4 changes: 3 additions & 1 deletion resources/js/components/FormField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
:show-help-text="showHelpText">
<template #field>
<editor
:id="currentField.attribute"
:id="uuid(currentField.attribute)"
v-model="value"
:api-key="currentField.options.apiKey"
:cloud-channel="currentField.options.cloudChannel ?? 6"
Expand All @@ -21,6 +21,7 @@
<script>
import { DependentFormField, HandlesValidationErrors } from 'laravel-nova'
import Editor from '@tinymce/tinymce-vue'
import { uuid } from '@tinymce/tinymce-vue/lib/es2015/main/ts/Utils'
export default {
mixins: [DependentFormField, HandlesValidationErrors],
Expand All @@ -37,6 +38,7 @@ export default {
},
methods: {
uuid,
setupProtectContent () {
if (this.field.options.init.protect) {
this.field.options.init.protect = this.field.options.init.protect.map((regex) => {
Expand Down

0 comments on commit e093609

Please sign in to comment.