No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    formatting q-editor's url link input when wrapped in q-field

    Help
    2
    6
    825
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      rv last edited by

      I wanted to add some validations so wrapped q-editor in q-field but that messes up link input box as well. Any advise how I can fix this?

       <q-field label="Description" v-model="qeditor" outlined stack-label :rules="[val => !!val || 'Description is required']">
         <template v-slot:control>
            <q-editor
              flat
              v-model="qeditor"
              :toolbar="[
                ['bold', 'italic', 'strike', 'underline', 'subscript', 'superscript'],
                ['hr', 'link'],
                ['removeFormat' ],
                ['undo', 'redo']
              ]"
            ></q-editor>
          </template>
         </q-field>
      

      Output:
      377a4bfc-f3a8-417e-a24b-3a05babf2ca4-image.png

      https://codepen.io/anon/pen/aeBbMj?editors=1010

      1 Reply Last reply Reply Quote 0
      • metalsadman
        metalsadman last edited by

        This happens because qinput and qselect is already wrapped in a qfield internally. As you see in the warning https://quasar.dev/vue-components/field#Introduction

        1 Reply Last reply Reply Quote 0
        • R
          rv last edited by

          Thanks. I did not wrap either qinput or qselect in qfield. I believe qeditor is internally using qinput for URL which I am not sure how to fix!

          1 Reply Last reply Reply Quote 0
          • R
            rv last edited by

            Any help on how to fix this?

            1 Reply Last reply Reply Quote 0
            • R
              rv last edited by

              I have updated to Quasar version 1.1.4 and the above code is now giving error as soon as I hit the link button.

              "[Vue warn]: Error in nextTick: 'TypeError: Cannot read property 'selectNodeContents' of undefined'
              
              found in
              
              ---> <QEditor>
                     <QField>
                       <Root>"
              
              TypeError: Cannot read property 'selectNodeContents' of undefined
                  at VueComponent.<anonymous> (editor-caret.js:223)
                  at Array.<anonymous> (vue.runtime.esm.js:1980)
                  at flushCallbacks (vue.runtime.esm.js:1906)
              
              1 Reply Last reply Reply Quote 0
              • R
                rv last edited by

                Added issue on Github as a bug!
                https://github.com/quasarframework/quasar/issues/5134

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post