import { Node } from 'prosemirror-model';
import toCSSColor from './ui/toCSSColor.js';
var TextColorMarkSpec = {
  attrs: {
    color: ''
  },
  inline: true,
  group: 'inline',
  parseDOM: [{
    style: 'color',
    getAttrs: function getAttrs(color) {
      return {
        color: toCSSColor(color)
      };
    }
  }],
  toDOM: function toDOM(node) {
    var color = node.attrs.color;
    var style = '';
    if (color) {
      style += "color: ".concat(color, ";");
    }
    return ['span', {
      style: style
    }, 0];
  }
};
export default TextColorMarkSpec;
import { bpfrpt_proptype_MarkSpec } from "./Types.js";