<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                [TOC] ## deleteText <!-- Deletes text from the editor, returning a [Delta](../guides/designing-the-delta-format.md) representing the change. [Source](/docs/api/#events) may be `"user"`, `"api"`, or `"silent"`. Calls where the `source` is `"user"` when the editor is [disabled](#disable) are ignored. --> 從編輯器中刪除文本,返回代表對應變化的[Delta](../guides/designing-the-delta-format.md)數據。[Source](事件events.md)可能是 `"user"`、 `"api"` 或者 `"silent"`。當編輯器不可用[disabled]#disable且`source`參數為“user”時,調用將被忽略。 **方法** ```javascript deleteText(index:Number, length: Number, source: String = 'api'): Delta ``` **示例** ```javascript quill.deleteText(6, 4); ``` ## getContents <!-- Retrieves contents of the editor, with formatting data, represented by a [Delta]() object. --> 返回編輯器的內容——包含格式數據的[Delta](../增量Delta.md)數據。 **方法** ```javascript getContents(index: Number = 0, length: Number = remaining): Delta ``` **示例** ```javascript var delta = quill.getContents(); ``` ## getLength <!-- Retrieves the length of the editor contents. Note even when Quill is empty, there is still a blank line represented by '\n', so `getLength` will return 1. --> 返回編輯器內容的長度。注意,當Quill為空時,仍然包含一個由'\n'解析成的空行,所以`getLength`將返回1。 **方法** ```javascript getLength(): Number ``` **示例** ```javascript var length = quill.getLength(); ``` ## getText <!-- Retrieves the string contents of the editor. Non-string content are omitted, so the returned string's length may be shorter than the editor's as returned by [`getLength`](#getlength). Note even when Quill is empty, there is still a blank line in the editor, so in these cases `getText` will return '\n'. The `length` parameter defaults to the length of the remaining document. --> 返回編輯器的字符串內容。由于非字符串內容會被忽略掉,所以返回字符串內容的長度會比[`getLength`](#getlength)返回的長度小。注意,盡管Quill為空,編輯器里仍有一行空行,所以這種情況會返回”\n”。 `length`參數默認為剩下文本的長度。 **方法** ```javascript getText(index: Number = 0, length: Number = remaining): String ``` **示例** ```javascript var text = quill.getText(0, 10); ``` ## insertEmbed <!-- Insert embedded content into the editor, returning a [Delta](../guides/designing-the-delta-format.md) representing the change. [Source](/docs/api/#events) may be `"user"`, `"api"`, or `"silent"`. Calls where the `source` is `"user"` when the editor is [disabled](#disable) are ignored. --> 插入嵌入對象內容到編輯器,返回代表對應變化的[Delta](../guides/designing-the-delta-format.md)數據。 [Source](事件events.md)可能是 `"user"`、 `"api"` 或者 `"silent"`。當編輯器不可用[disabled]#disable且`source`參數為“user”時,調用將被忽略。 **方法** ```javascript insertEmbed(index: Number, type: String, value: any, source: String = 'api'): Delta ``` **示例** ```javascript quill.insertEmbed(10, 'image', 'https://quilljs.com/images/cloud.png'); ``` ## insertText <!-- Inserts text into the editor, optionally with a specified format or multiple [formats](/docs/formats/). Returns a [Delta](../guides/designing-the-delta-format.md) representing the change. [Source](/docs/api/#events) may be `"user"`, `"api"`, or `"silent"`. Calls where the `source` is `"user"` when the editor is [disabled](#disable) are ignored. --> 向編輯器中插入文本,可選帶有指定的文本格式或多個文本[格式](../格式formats.md),返回代表對應變化的[Delta](../guides/designing-the-delta-format.md)數據。 [Source](事件events.md)可能是 `"user"`、 `"api"` 或者 `"silent"`。當編輯器不可用[disabled]#disable且`source`參數為“user”時,調用將被忽略。 **方法** ```javascript insertText(index: Number, text: String, source: String = 'api'): Delta insertText(index: Number, text: String, format: String, value: any, source: String = 'api'): Delta insertText(index: Number, text: String, formats: { [String]: any }, source: String = 'api'): Delta ``` **示例** ```javascript quill.insertText(0, 'Hello', 'bold', true); quill.insertText(5, 'Quill', { 'color': '#ffff00', 'italic': true }); ``` ## pasteHTML ***棄用的*** <!-- This API has been moved into [Clipboard](/docs/modules/clipboard/#dangerouslypastehtml) and renamed. It will be removed as a top level API in 2.0. --> 這個接口已經移動到[Clipboard](../modules/粘貼板clipboard.md)中,并且重命名。在更高版本的2.0API中,它將被移除。 ## setContents <!-- Overwrites editor with given contents. Contents should end with a [newline](#line-formatting). Returns a Delta representing the change. This will be the same as the Delta passed in, if given Delta had no invalid operations. [Source](/docs/api/#events) may be `"user"`, `"api"`, or `"silent"`. Calls where the `source` is `"user"` when the editor is [disabled](#disable) are ignored. --> 用給定的內容覆蓋原編輯器內容。內容將會用[換行符](../增量Delta.md)結尾。返回代表對應變化的Delta數據。如果給定的Delta沒有無效的操作,返回值和傳入的值相同。 [Source](事件events.md)可能是 `"user"`、 `"api"` 或者 `"silent"`。當編輯器不可用[disabled]#disable且`source`參數為“user”時,調用將被忽略。 **方法** ```javascript setContents(delta: Delta, source: String = 'api'): Delta ``` **示例** ```javascript quill.setContents([ { insert: 'Hello ' }, { insert: 'World!', attributes: { bold: true } }, { insert: '\n' } ]); ``` ## setText <!-- Sets contents of editor with given text, returing a [Delta](../guides/designing-the-delta-format.md) representing the change. Note Quill documents must end with a newline so one will be added for you if omitted. [Source](/docs/api/#events) may be `"user"`, `"api"`, or `"silent"`. Calls where the `source` is `"user"` when the editor is [disabled](#disable) are ignored. --> 用給定的文本設置為編輯器的內容,返回代表對應變化的 [Delta](../guides/designing-the-delta-format.md)數據。注意,Quill文檔必須以換行符結尾,如果沒有則會自動添加。 [Source](事件events.md)可能是 `"user"`、 `"api"` 或者 `"silent"`。當編輯器不可用[disabled]#disable且`source`參數為“user”時,調用將被忽略。 **方法** ```javascript setText(text: String, source: String = 'api'): Delta ``` **示例** ```javascript quill.setText('Hello\n'); ``` ## updateContents <!-- Applies Delta to editor contents, returing a [Delta](../guides/designing-the-delta-format.md) representing the change. These Deltas will be the same if the Delta passed in had no invalid operations. [Source](/docs/api/#events) may be `"user"`, `"api"`, or `"silent"`. Calls where the `source` is `"user"` when the editor is [disabled](#disable) are ignored. --> 讓編輯器內容執行Delta數據方法,返回代表對應變化的 [Delta](../guides/designing-the-delta-format.md)數據。如果給定的Delta沒有無效的操作,返回值和傳入的值相同。 [Source](事件events.md)可能是 `"user"`、 `"api"` 或者 `"silent"`。當編輯器不可用[disabled]#disable且`source`參數為“user”時,調用將被忽略。 **方法** ```javascript updateContents(delta: Delta, source: String = 'api'): Delta ``` **示例** ```javascript // Assuming editor currently contains [{ insert: 'Hello World!' }] quill.updateContents(new Delta() .retain(6) // Keep 'Hello ' .delete(5) // 'World' is deleted .insert('Quill') .retain(1, { bold: true }) // Apply bold to exclamation mark }); // Editor should now be [ // { insert: 'Hello Quill' }, // { insert: '!', attributes: { bold: true} } // ] ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看