mirror of
https://github.com/flarum/core.git
synced 2025-07-14 21:36:25 +02:00
Fix 'polyfills' incorrect spelling, add LICENSE text for startsWith polyfill
This commit is contained in:
@ -2,7 +2,7 @@ import { extend } from 'flarum/extend';
|
|||||||
import TextEditor from 'flarum/components/TextEditor';
|
import TextEditor from 'flarum/components/TextEditor';
|
||||||
import MarkdownArea from 'mdarea';
|
import MarkdownArea from 'mdarea';
|
||||||
|
|
||||||
import './pollyfills';
|
import './polyfills';
|
||||||
import MarkdownToolbar from './components/MarkdownToolbar';
|
import MarkdownToolbar from './components/MarkdownToolbar';
|
||||||
import MarkdownButton from './components/MarkdownButton';
|
import MarkdownButton from './components/MarkdownButton';
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
/*! https://mths.be/startswith v0.2.0 by @mathias */
|
||||||
if (!String.prototype.startsWith) {
|
if (!String.prototype.startsWith) {
|
||||||
Object.defineProperty(String.prototype, 'startsWith', {
|
Object.defineProperty(String.prototype, 'startsWith', {
|
||||||
value: function(search, pos) {
|
value: function(search, pos) {
|
@ -1,5 +1,5 @@
|
|||||||
import insertText from './insertText';
|
import insertText from './insertText';
|
||||||
import {blockStyle, isMultipleLines, multilineStyle, orderedList} from "./styles";
|
import { blockStyle, isMultipleLines, multilineStyle, orderedList } from './styles';
|
||||||
|
|
||||||
export const styleSelectedText = (textarea, styleArgs) => {
|
export const styleSelectedText = (textarea, styleArgs) => {
|
||||||
const text = textarea.value.slice(textarea.selectionStart, textarea.selectionEnd);
|
const text = textarea.value.slice(textarea.selectionStart, textarea.selectionEnd);
|
||||||
|
Reference in New Issue
Block a user