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

    q-editor color font

    Help
    3
    3
    939
    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.
    • O
      olivierph last edited by

      good pm,
      i dont see how to add color pickup in the toolbar of q-editor.
      is it possible ?

      1 Reply Last reply Reply Quote 2
      • S
        Sweetyy last edited by

        @olivierph i have the same question. Hard to insert it …

        1 Reply Last reply Reply Quote 0
        • P
          paoloar77 last edited by paoloar77

          It’s possible to add a button, up to the editor component and send an execCommand to change the foreColor to the selected text.

          vue file:

          <q-btn rounded size="sm" color="primary" >
              <q-icon name="colorize" class="cursor-pointer">
                  <q-popup-proxy>
                      <q-color v-model="mycolor" @change="setcolor"></q-color>
                  </q-popup-proxy>
              </q-icon>
          </q-btn>
          <q-editor
              ref="editor_ref"
              v-model="myvalue"
              .........others props .... >
          </q-editor>
          
          

          In the .ts file:

            public myvalue = ''
          
            public mounted() {
              this.myvalue = this.value
              this.editor = this.$refs.editor_ref
            }
            public setcolor() {
              document.execCommand('foreColor', false, this.mycolor)
            }
          
          

          Color_QEditor.png

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