Updating inline writer field into object with vue component

Hello there,

I’m having trouble updating a field on an object in my Vue component. What I’m trying to achieve is saving inline text into my object’s title, like this in my block:

fields:
  title:
    type: object
    fields:
      # … other fields …
      text:
        type: writer
        inline: true
        nodes: false

Here is my Vue component file :

// template part …
<k-writer-input
  ref=“text”
  :marks=“false”
  :value=“content.title?.text”
  placeholder=“Saisissez le surtitre…”
  @input=“updateObject({ title: { …content.title, text: $event } })”
  class=“k-block-type-text”/>

// script part …
methods: {
  updateObject(content) {
    console.log(content.title.text); // Log my text with <p> element (ex: <p>hello world</p> instead of "hello world" 
    this.$emit(‘update’, {
      ...this.content,
      ...content

    })
  },
},

I don’t understand why the log outputs my text wrapped in a <p> element instead of just the plain text.

Any idea ?

Thanks !

In Kirby 5.3.0, a new string.sanitizeHtml helper was added: feat: New string.sanitizeHTML helper method by bastianallgeier · Pull Request #7922 · getkirby/kirby · GitHub to get rid of such nodes

Thank you, I updated to Kirby 5.3.1 and I use the this.$helper.string.stripHTML() method and it works fine !