<commit_before><script lang="coffee">
import Records from '@/shared/services/records'
import Session from '@/shared/services/session'
import AppConfig from '@/shared/services/app_config'
import FileUploader from '@/shared/services/file_uploader'
import FilesList from './files_list.vue'
import EventBus from '@/shared/services/event_bus'
import I18n from '@/i18n'
import { convertToMd } from '@/shared/services/format_converter'

# import { Editor, EditorContent, EditorMenuBar } from 'tiptap'

import Blockquote from '@tiptap/extension-blockquote'
import Bold from '@tiptap/extension-bold'
import BulletList from '@tiptap/extension-bullet-list'
import CodeBlock from '@tiptap/extension-code-block'
import Code from '@tiptap/extension-code'
import CharacterCount from '@tiptap/extension-character-count'
import Document from '@tiptap/extension-document'
import Dropcursor from '@tiptap/extension-dropcursor'
import GapCursor from '@tiptap/extension-gapcursor'
import HardBreak from '@tiptap/extension-hard-break'
import Heading from '@tiptap/extension-heading'
import Highlight from '@tiptap/extension-highlight'
import History from '@tiptap/extension-history'
import HorizontalRule from '@tiptap/extension-horizontal-rule'
import Image from '@tiptap/extension-image'
import Italic from '@tiptap/extension-italic'
import Link from '@tiptap/extension-link'
import ListItem from '@tiptap/extension-list-item'
import Mention from '@tiptap/extension-mention'
import OrderedList from '@tiptap/extension-ordered-list'
import Paragraph from '@tiptap/extension-paragraph'
import Placeholder from '@tiptap/extension-placeholder'
import Strike from '@tiptap/extension-strike'
import TableCell from '@tiptap/extension-table-cell'
import TableHeader from '@tiptap/extension-table-header'
import TableRow from '@tiptap/extension-table-row'
import Table from '@tiptap/extension-table'
import TaskItem from '@tiptap/extension-task-item'
import TaskList from '@tiptap/extension-task-list'
import TextAlign from '@tiptap/extension-text-align'
import TextStyle from '@tiptap/extension-text-style'
import Text from '@tiptap/extension-text'
import Typography from '@tiptap/extension-typography'
import Underline from '@tiptap/extension-underline'

import { Editor, EditorContent } from '@tiptap/vue-2'

# import Collaboration from '@/shared/tiptap_extentions/collaboration.js'

# import ForeColor from '@/shared/tiptap_extentions/fore_color'
# import BackColor from '@/shared/tiptap_extentions/back_color'
# import FormatClear from '@/shared/tiptap_extentions/format_clear'
# import Align from '@/shared/tiptap_extentions/align'
# import Alignment from '@/shared/tiptap_extentions/alignment'
# import Paragraph from '@/shared/tiptap_extentions/paragraph'
# import Heading from '@/shared/tiptap_extentions/heading'
# import Iframe from './iframe'
# import TodoItem from './todo_item'

# import { insertText } from 'tiptap-commands'
# import Image from '@/shared/tiptap_extentions/image.js'

# import {getEmbedLink} from '@/shared/helpers/embed_link.coffee'

# import { CommonMentioning, HtmlMentioning, MentionPluginConfig } from './mentioning.coffee'
# import SuggestionList from './suggestion_list'
# import Attaching from './attaching.coffee'
import {compact, uniq, throttle, difference, reject, uniqBy} from 'lodash'
import TextHighlightBtn from './text_highlight_btn'
import TextAlignBtn from './text_align_btn'

# import io from 'socket.io-client'

export default
  # mixins: [CommonMentioning, HtmlMentioning, Attaching]
  props:
    model: Object
    field: String
    label: String
    placeholder: String
    maxLength: Number
    shouldReset: Boolean
    autofocus: Boolean

  components: {
    EditorContent
    TextAlignBtn
    TextHighlightBtn
  }
    # EditorMenuBar: EditorMenuBar
    # FilesList: FilesList
    # SuggestionList: SuggestionList
    # TextHighlightBtn: TextHighlightBtn
    # TextAlignBtn: TextAlignBtn

  data: ->
    loading: true
    socket: null
    count: 0
    editor: null
    expanded: true
    closeEmojiMenu: false
    linkUrl: ""
    iframeUrl: ""
    linkDialogIsOpen: false
    iframeDialogIsOpen: false
    fetchedUrls: []

  computed:
    format: ->
      @model["#{@field}Format"]

  mounted: ->
    # @expanded = Session.user().experiences['html-editor.expanded']
    @editor = new Editor
      extensions: [
        Document,
        Paragraph
        Text
        Highlight
        Blockquote
        CodeBlock
        Bold
        Italic
        Strike
        Underline
        Heading
        Highlight.configure(multicolor: true)
        History
        HorizontalRule
        Typography
        BulletList
        OrderedList
        ListItem
        Table
        TableHeader
        TableRow
        TableCell
        TextAlign
      ]
      content: @model[@field]
    # @onInit({doc: null, version: 0})
    # @socket = io(@tiptapAddress())
    #   .on('init', (data) => @onInit(data))
    #   .on('update', (data) =>
    #     @nditor.extensions.options.collaboration.update(data)<commit_msg>gap cursor<commit_after><script lang="coffee">
import Records from '@/shared/services/records'
import Session from '@/shared/services/session'
import AppConfig from '@/shared/services/app_config'
import FileUploader from '@/shared/services/file_uploader'
import FilesList from './files_list.vue'
import EventBus from '@/shared/services/event_bus'
import I18n from '@/i18n'
import { convertToMd } from '@/shared/services/format_converter'

# import { Editor, EditorContent, EditorMenuBar } from 'tiptap'

import Blockquote from '@tiptap/extension-blockquote'
import Bold from '@tiptap/extension-bold'
import BulletList from '@tiptap/extension-bullet-list'
import CodeBlock from '@tiptap/extension-code-block'
import Code from '@tiptap/extension-code'
import CharacterCount from '@tiptap/extension-character-count'
import Document from '@tiptap/extension-document'
import Dropcursor from '@tiptap/extension-dropcursor'
import GapCursor from '@tiptap/extension-gapcursor'
import HardBreak from '@tiptap/extension-hard-break'
import Heading from '@tiptap/extension-heading'
import Highlight from '@tiptap/extension-highlight'
import History from '@tiptap/extension-history'
import HorizontalRule from '@tiptap/extension-horizontal-rule'
import Image from '@tiptap/extension-image'
import Italic from '@tiptap/extension-italic'
import Link from '@tiptap/extension-link'
import ListItem from '@tiptap/extension-list-item'
import Mention from '@tiptap/extension-mention'
import OrderedList from '@tiptap/extension-ordered-list'
import Paragraph from '@tiptap/extension-paragraph'
import Placeholder from '@tiptap/extension-placeholder'
import Strike from '@tiptap/extension-strike'
import TableCell from '@tiptap/extension-table-cell'
import TableHeader from '@tiptap/extension-table-header'
import TableRow from '@tiptap/extension-table-row'
import Table from '@tiptap/extension-table'
import TaskItem from '@tiptap/extension-task-item'
import TaskList from '@tiptap/extension-task-list'
import TextAlign from '@tiptap/extension-text-align'
import TextStyle from '@tiptap/extension-text-style'
import Text from '@tiptap/extension-text'
import Typography from '@tiptap/extension-typography'
import Underline from '@tiptap/extension-underline'

import { Editor, EditorContent } from '@tiptap/vue-2'

# import Collaboration from '@/shared/tiptap_extentions/collaboration.js'

# import ForeColor from '@/shared/tiptap_extentions/fore_color'
# import BackColor from '@/shared/tiptap_extentions/back_color'
# import FormatClear from '@/shared/tiptap_extentions/format_clear'
# import Align from '@/shared/tiptap_extentions/align'
# import Alignment from '@/shared/tiptap_extentions/alignment'
# import Paragraph from '@/shared/tiptap_extentions/paragraph'
# import Heading from '@/shared/tiptap_extentions/heading'
# import Iframe from './iframe'
# import TodoItem from './todo_item'

# import { insertText } from 'tiptap-commands'
# import Image from '@/shared/tiptap_extentions/image.js'

# import {getEmbedLink} from '@/shared/helpers/embed_link.coffee'

# import { CommonMentioning, HtmlMentioning, MentionPluginConfig } from './mentioning.coffee'
# import SuggestionList from './suggestion_list'
# import Attaching from './attaching.coffee'
import {compact, uniq, throttle, difference, reject, uniqBy} from 'lodash'
import TextHighlightBtn from './text_highlight_btn'
import TextAlignBtn from './text_align_btn'

# import io from 'socket.io-client'

export default
  # mixins: [CommonMentioning, HtmlMentioning, Attaching]
  props:
    model: Object
    field: String
    label: String
    placeholder: String
    maxLength: Number
    shouldReset: Boolean
    autofocus: Boolean

  components: {
    EditorContent
    TextAlignBtn
    TextHighlightBtn
  }
    # EditorMenuBar: EditorMenuBar
    # FilesList: FilesList
    # SuggestionList: SuggestionList
    # TextHighlightBtn: TextHighlightBtn
    # TextAlignBtn: TextAlignBtn

  data: ->
    loading: true
    socket: null
    count: 0
    editor: null
    expanded: true
    closeEmojiMenu: false
    linkUrl: ""
    iframeUrl: ""
    linkDialogIsOpen: false
    iframeDialogIsOpen: false
    fetchedUrls: []

  computed:
    format: ->
      @model["#{@field}Format"]

  mounted: ->
    # @expanded = Session.user().experiences['html-editor.expanded']
    @editor = new Editor
      extensions: [
        Document,
        Paragraph
        Text
        Highlight
        Blockquote
        CodeBlock
        Bold
        Italic
        Strike
        Underline
        Heading
        Highlight.configure(multicolor: true)
        History
        HorizontalRule
        Typography
        GapCursor
        BulletList
        OrderedList
        ListItem
        Table
        TableHeader
        TableRow
        TableCell
        TextAlign
      ]
      content: @model[@field]
    # @onInit({doc: null, version: 0})
    # @socket = io(@tiptapAddress())
    #   .on('init', (data) => @onInit(data))
    #   .on('update', (data) =>
    #     @nditor.extensions.options.collaboration.update(data)
{'fraction_non_alphanumeric': 0.10479309318249479, 'fraction_numerical': 0.0013893023717376203, 'mean_word_length': 4.128753180661578, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '669724', 'n_tokens_mistral': 3100, 'n_tokens_neox': 3027, 'n_words': 743}